doc/assets/sh_main.js
function sh_highlightElement(element, language) {
  sh_addClass(element, 'sh_sourceCode');
  var originalTags = [];
  var inputString = sh_extractTags(element, originalTags);
  var highlightTags = sh_highlightString(inputString, language);
  var tags = sh_mergeTags(originalTags, highlightTags);
  var documentFragment = sh_insertTags(tags, inputString);
  while (element.hasChildNodes()) {
    element.removeChild(element.firstChild);
  }
  element.appendChild(documentFragment);
}
function sh_highlightElement(element, language) {
  sh_addClass(element, 'sh_sourceCode');
  var originalTags = [];
  var inputString = sh_extractTags(element, originalTags);
  var highlightTags = sh_highlightString(inputString, language);
  var tags = sh_mergeTags(originalTags, highlightTags);
  var documentFragment = sh_insertTags(tags, inputString);
  while (element.hasChildNodes()) {
    element.removeChild(element.firstChild);
  }
  element.appendChild(documentFragment);
}
function sh_highlightElement ( element , language ) { sh_addClass ( element , 'sh_sourceCode' ) ; var originalTags = [ ] ; var inputString = sh_extractTags ( element , originalTags ) ; var highlightTags = sh_highlightString ( inputString , language ) ; var tags = sh_mergeTags ( originalTags , highlightTags ) ; var documentFragment = sh_insertTags ( tags , inputString ) ; while ( element . hasChildNodes ( ) ) { element . removeChild ( element . firstChild ) ; } element . appendChild ( documentFragment ) ; }
Highlights an element containing source code.  Upon completion of this function,
the element will have been placed in the "sh_sourceCode" class.
@param  element  a DOM <pre> element containing the source code to be highlighted
@param  language  a language definition object
Highlights an element containing source code . Upon completion of this function the element will have been placed in the sh_sourceCode class .