context: function BX_key_delete() {    BX_get_selection();    BX_selection.removeAllRanges();    if (BX_range.toString().length == 0  && typeof (BX_range.endContainer.data) != "undefined") {        var rightOfSelection = BX_range.endContainer.data.substring(BX_range.endOffset,BX_range.endContainer.data.length);        var leftOfSelection = BX_range.endContainer.data.substring(0,BX_range.endOffset);        // if there is content left of the selection, replace ending spaces with one space, if nor, delete everything        if (/[^\t\n\r\s]/.test(leftOfSelection)) {            var stripWS = rightOfSelection.replace(/^[\t\n\r\s]+/," ");            /*	maybe this would be a solution for inline handling...            			if (BX_getComputedStyle(BX_range.endContainer.parentNode,"display") == "inline") {            					var stripWS = rightOfSelection.replace(/^[\t\n\r\s]+/," ");            				} else {            					var stripWS = rightOfSelection.replace(/^[\t\n\r\s]+/,"");            				}*/        } else {            var stripWS = rightOfSelection.replace(/^[\t\n\r\s]+$/,"");        }        if (stripWS.length == 0 ) {            var walker = document.createTreeWalker(document,NodeFilter.SHOW_TEXT,                                                   {                                           acceptNode : function(node) {                                                           if (!(/[^\t\n\r ]/.test(node.nodeValue)))                                                               return NodeFilter.FILTER_REJECT;                                                           return NodeFilter.FILTER_ACCEPT;                                                       }                                                   }                                                   ,null);            walker.currentNode = BX_range.endContainer;            var nextNode = walker.nextNode();            if (nextNode) {                BX_range.selectNodeContents(nextNode);                var rightOfSelection = nextNode.data;                var stripWS = rightOfSelection.replace(/^[\t\n\r\s]+$/,"").replace(/^[\t\n\r\s]{2,}/," ");            }            //            BX_range.collapse(true);        }        BX_range.setEnd(BX_range.endContainer, BX_range.endOffset+( rightOfSelection.length - stripWS.length) + 1);    }    BX_range.extractContents();    BX_selection.removeAllRanges();    //    BX_range.collapse(true);    BX_selection.addRange(BX_range);    //        BX_range = BX_selection.getRangeAt( BX_selection.rangeCount-1 ).cloneRange();}
meta: 791	/local1/tlutelli/issta_data/temp/all_js/javascript/2006_temp/2006/791/ffb59be12713348724e09814524fa70b5200d06e/bitfluxeditor_core.js/buggy/src/webapp/lenya/resources/misc/bitflux/bxe/js/bitfluxeditor_core.js