Page MenuHomePhabricator

Initial newline in <pre> is stripped
Closed, ResolvedPublic


For some reason this doesn't happen in /_rtform/ , but if I copypaste the output of /_wikitext/ into /_html/ (which is closer to what happens in VE in practice), I can make it happen.

Wikitext input: <pre>\n\n\nFoo</pre>
HTML output: <pre data-parsoid="{&quot;stx&quot;:&quot;html&quot;,&quot;tsr&quot;:[0,5],&quot;dsr&quot;:[0,17]}">\n\n\nFoo</pre>

HTML input: (same)
Wikitext output: <pre>\n\nFoo</pre>

Version: unspecified
Severity: normal



Event Timeline

bzimport raised the priority of this task from to Needs Triage.Nov 22 2014, 12:44 AM
bzimport set Reference to bz42666.

This is the same issue as bug 42667. Our HTML parser eats the newline too, so we need to restore it based on data-parsoid rt data. _rtform does not serialize the HTML DOM to parse it back immediately, so this issue does not occur there.