rem: if (PR_isRawContent(cs)) { 
add: if (!PR_isRawContent(cs)) { 
context:   function doWork() {    var endTime = new Date().getTime() + 250;    for (; k < elements.length && new Date().getTime() < endTime; k++) {      var cs = elements[k];      if (cs.className && cs.className.indexOf('prettyprint') >= 0) {        // make sure this is not nested in an already prettified element        var nested = false;        for (var p = cs.parentNode; p != null; p = p.parentNode) {          if ((p.tagName == 'pre' || p.tagName == 'code' ||               p.tagName == 'xmp') &&              p.className && p.className.indexOf('prettyprint') >= 0) {            nested = true;            break;          }        }        if (!nested) {          // fetch the content as a snippet of properly escaped HTML.          // Firefox adds newlines at the end.          var content = PR_getInnerHtml(cs);          content = content.replace(/(?:\r\n?|\n)$/, '');          if (!content) { continue; }          // do the pretty printing          var newContent = prettyPrintOne(content);          // push the prettified html back into the tag.          if (PR_isRawContent(cs)) {            // just replace the old html with the new            cs.innerHTML = newContent;          } else {            // we need to change the tag to a <pre> since <xmp>s do not allow            // embedded tags such as the span tags used to attach styles to            // sections of source code.            var pre = document.createElement('PRE');            for (var i = 0; i < cs.attributes.length; ++i) {              var a = cs.attributes[i];              if (a.specified) {                pre.setAttribute(a.name, a.value);              }            }            pre.innerHTML = newContent;            // remove the old            cs.parentNode.replaceChild(pre, cs);          }        }      }    }    if (k < elements.length) {      // finish up in a continuation      setTimeout(doWork, 250);    }  }
meta: 10235	/local1/tlutelli/issta_data/temp/all_js/javascript/2007_temp/2007/10235/f97dca0486465d0ccd8418ef80c4e93d2b955ef5/prettify.js/buggy/src/prettify.js