Page MenuHomePhabricator

Parsoid does not handle SOL correctly in native template expansion
Closed, DuplicatePublic

Description

$ echo '{{1x|* Bar}}' | bin/parse.js --usephppreprocessor=true --normalize
<ul>
<li>Bar</li>
</ul>

vs

$ echo '{{1x|* Bar}}' | bin/parse.js --usephppreprocessor=false --normalize
<p>* Bar</p>

Template expansion ought to insert a newline before templates whose expansion text starts with * # : ; {| to match PHP behavior (T14974).

This isn't a problem in production, since we use the PHP preprocessor, which does do this insertion. However, it causes it us to fail various parser tests (which use Parsoid's native expansion). Might be worth fixing to improve our test coverage and reduce false failures.