nl_tokens: add previous siblings
pl_tokens: function recurse ( node ) { // first navigate to the first sibling if ( node . previousSibling ) recurse ( node . previousSibling ) ; // then add the string representation of the nodes ('backward' recursion) switch ( node . nodeType ) { case 8 : // comment <mask> += "<!--" + node . nodeValue + "-->" ; break ; // case 10: // doctype: jsDom does not know doctype as previousSibling. } }