docs/prettify.js
function isPreformatted(node, content) {
    // PRE means preformatted, and is a very common case, so don't create
    // unnecessary computed style objects.
    if ('PRE' === node.tagName) { return true; }
    if (!newlineRe.test(content)) { return true; }  // Don't care
    var whitespace = '';
    // For disconnected nodes, IE has no currentStyle.
    if (node.currentStyle) {
      whitespace = node.currentStyle.whiteSpace;
    } else if (window.getComputedStyle) {
      // Firefox makes a best guess if node is disconnected whereas Safari
      // returns the empty string.
      whitespace = window.getComputedStyle(node, null).whiteSpace;
    }
    return !whitespace || whitespace === 'pre';
  }
function isPreformatted(node, content) {
    // PRE means preformatted, and is a very common case, so don't create
    // unnecessary computed style objects.
    if ('PRE' === node.tagName) { return true; }
    if (!newlineRe.test(content)) { return true; }  // Don't care
    var whitespace = '';
    // For disconnected nodes, IE has no currentStyle.
    if (node.currentStyle) {
      whitespace = node.currentStyle.whiteSpace;
    } else if (window.getComputedStyle) {
      // Firefox makes a best guess if node is disconnected whereas Safari
      // returns the empty string.
      whitespace = window.getComputedStyle(node, null).whiteSpace;
    }
    return !whitespace || whitespace === 'pre';
  }
function isPreformatted ( node , content ) { // PRE means preformatted, and is a very common case, so don't create // unnecessary computed style objects. if ( 'PRE' === node . tagName ) { return true ; } if ( ! newlineRe . test ( content ) ) { return true ; } // Don't care var whitespace = '' ; // For disconnected nodes, IE has no currentStyle. if ( node . currentStyle ) { whitespace = node . currentStyle . whiteSpace ; } else if ( window . getComputedStyle ) { // Firefox makes a best guess if node is disconnected whereas Safari // returns the empty string. whitespace = window . getComputedStyle ( node , null ) . whiteSpace ; } return ! whitespace || whitespace === 'pre' ; }
Are newlines and adjacent spaces significant in the given node's innerHTML?
Are newlines and adjacent spaces significant in the given node s innerHTML?