rem: } 
add: } 
context: function PR_recombineTagsAndDecorations(    sourceText, extractedTags, decorations) {  var html = [];  var outputIdx = 0;  // index past the last char in sourceText written to html  var openDecoration = null;  var currentDecoration = null;  var tagPos = 0;  // index into extractedTags  var decPos = 0;  // index into decorations  var tabExpander = PR_tabExpander(PR_TAB_WIDTH);  // A helper function that is responsible for opening sections of decoration  // and outputing properly escaped chunks of source  function emitTextUpTo(sourceIdx) {    if (sourceIdx > outputIdx) {      if (openDecoration && openDecoration !== currentDecoration) {        // Close the current decoration        html.push('</span>');        openDecoration = null;      }      if (!openDecoration && currentDecoration) {        openDecoration = currentDecoration;        html.push('<span class="', openDecoration, '">');      }      // This interacts badly with some wikis which introduces paragraph tags      // into pre blocks for some strange reason.      // It's necessary for IE though which seems to lose the preformattednes      // of <pre> tags when their innerHTML is assigned.      // http://stud3.tuwien.ac.at/~e0226430/innerHtmlQuirk.html      // and it serves to undo the conversion of <br>s to newlines done in      // chunkify.      var htmlChunk = PR_textToHtml(          tabExpander(sourceText.substring(outputIdx, sourceIdx)))          .replace(/(\r\n?|\n| ) /g, '$1&nbsp;')          .replace(/\r\n?|\n/g, '<br>');      html.push(htmlChunk);      outputIdx = sourceIdx;    }  }  while (true) {    // Determine if we're going to consume a tag this time around.  Otherwise we    // consume a decoration or exit.    var outputTag;    if (tagPos < extractedTags.length) {      if (decPos < decorations.length) {        // Pick one giving preference to extractedTags since we shouldn't open        // a new style that we're going to have to immediately close in order        // to output a tag.        outputTag = extractedTags[tagPos] <= decorations[decPos];      } else {        outputTag = true;      }    } else {      outputTag = false;    }    // Consume either a decoration or a tag or exit.    if (outputTag) {      emitTextUpTo(extractedTags[tagPos]);      if (openDecoration) {        // Close the current decoration        html.push('</span>');        openDecoration = null;      }       html.push(extractedTags[tagPos + 1]);      tagPos += 2;    } else if (decPos < decorations.length) {      emitTextUpTo(decorations[decPos]);      currentDecoration = decorations[decPos + 1];      decPos += 2;    } else {      break;    }  }  emitTextUpTo(sourceText.length);  if (openDecoration) {    html.push('</span>');  }  return html.join('');}
meta: 10235	/local1/tlutelli/issta_data/temp/all_js/javascript/2007_temp/2007/10235/87bc54d81a1823e95306f270cafed4497a76e6b8/prettify.js/clean/src/prettify.js