private Node appendNormalized(Node pending,Node current,DocumentFragment parent){
  if (pending == null) {
    return current;
  }
  if (pending.getNodeType() != Node.TEXT_NODE || current.getNodeType() != Node.TEXT_NODE) {
    parent.appendChild(pending);
    return current;
  }
  Text a=(Text)pending, b=(Text)current;
  Text combined=doc.createTextNode(a.getTextContent() + b.getTextContent());
  if (needsDebugData) {
    Nodes.setFilePositionFor(combined,FilePosition.span(Nodes.getFilePositionFor(a),Nodes.getFilePositionFor(b)));
    Nodes.setRawText(combined,Nodes.getRawText(a) + Nodes.getRawText(b));
  }
  return combined;
}

private Node appendNormalized ( Node pending , Node current , DocumentFragment parent ) { if ( pending == null ) { return current ; } if ( pending . getNodeType ( ) != Node . TEXT_NODE || current . getNodeType ( ) != Node . TEXT_NODE ) { parent . appendChild ( pending ) ; return current ; } Text a = ( Text ) pending , b = ( Text ) current ; Text combined = doc . createTextNode ( a . getTextContent ( ) + b . getTextContent ( ) ) ; if ( needsDebugData ) { Nodes . setFilePositionFor ( combined , FilePosition . span ( Nodes . getFilePositionFor ( a ) , Nodes . getFilePositionFor ( b ) ) ) ; Nodes . setRawText ( combined , Nodes . getRawText ( a ) + Nodes . getRawText ( b ) ) ; } return combined ; }
given one or two nodes , see if the two can be combined . if two are passed in , they might be combined into one and returned , or the first will be appended to parent , and the other returned .
