Last modified: 2012-12-06 01:31:04 UTC

Wikimedia Bugzilla is closed!

Wikimedia migrated from Bugzilla to Phabricator. Bug reports are handled in Wikimedia Phabricator.
This static website is read-only and for historical purposes. It is not possible to log in and except for displaying bug reports and their history, links might be broken. See T44666, the corresponding Phabricator task for complete and up-to-date bug report information.
Bug 42666 - Initial newline in <pre> is stripped
Initial newline in <pre> is stripped
Status: RESOLVED FIXED
Product: Parsoid
Classification: Unclassified
serializer (Other open bugs)
unspecified
All All
: Unprioritized normal
: ---
Assigned To: Gabriel Wicke
:
Depends on:
Blocks: 42469
  Show dependency treegraph
 
Reported: 2012-12-04 01:14 UTC by Roan Kattouw
Modified: 2012-12-06 01:31 UTC (History)
4 users (show)

See Also:
Web browser: ---
Mobile Platform: ---
Assignee Huggle Beta Tester: ---


Attachments

Description Roan Kattouw 2012-12-04 01:14:26 UTC
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>
Comment 1 Gabriel Wicke 2012-12-04 01:51:49 UTC
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.
Comment 2 Roan Kattouw 2012-12-06 01:31:04 UTC
Fixed per bug 42667.

Note You need to log in before you can comment on or make changes to this bug.


Navigation
Links