Last modified: 2013-10-09 22:28:59 UTC
The PHP parser strips unopened </noinclude> tags. We should represent them as meta tags so that the rendering and round-tripping works correctly. [subbu@earth lib] echo "foo<noinclude>bar baz" | node parse --fetchConfig false <body data-parsoid='{"tmp":{},"dsr":[0,22,0,0]}'><p data-parsoid='{"dsr":[0,21,0,0]}'>foo<meta typeof="mw:Includes/NoInclude" data-parsoid='{"src":"<noinclude>","dsr":[3,14,null,null]}'>bar baz</p> </body> [subbu@earth lib] echo "foo</noinclude>bar baz" | node parse --fetchConfig false <body data-parsoid='{"tmp":{},"dsr":[0,23,0,0]}'><p data-parsoid='{"dsr":[0,22,0,0]}'>foo</noinclude>bar baz</p> </body> [subbu@earth lib] echo "foo</noinclude>bar baz" | node parse --fetchConfig false --trace peg-tokens TOKS: ["foo",{"type":"EndTagTk","name":"noinclude","attribs":[],"dataAttribs":{"tsr":[3,15],"stx":"html"}},"bar baz"] TOKS: [{"type":"NlTk","dataAttribs":{"tsr":[22,23]}},""] TOKS: [{"type":"EOFTk"}] <body data-parsoid='{"tmp":{},"dsr":[0,23,0,0]}'><p data-parsoid='{"dsr":[0,22,0,0]}'>foo</noinclude>bar baz</p> </body>