Page MenuHomePhabricator

Blank lines are dropped from <pre>s by the serializer
Closed, ResolvedPublic

Description

As can be seen here: https://en.wikipedia.org/w/index.php?title=User:Bevo&diff=prev&oldid=563114549

When you edit a <pre> block all blank lines are removed from the block.


Version: unspecified
Severity: normal

Details

Reference
bz50906

Event Timeline

bzimport raised the priority of this task from to High.Nov 22 2014, 1:55 AM
bzimport added a project: Parsoid.
bzimport set Reference to bz50906.

Appears parsoid is stripping extra linebreaks in <pre> tags. Maybe even a regression?

Verified that this bug is still around. This is not a selser issue, but a generic wikitext serialization issue.

[subbu@earth tests] echo "<pre>a\n\nb</pre>" | node parse --html2wt
a

b
[subbu@earth tests] echo "<pre>a\n\nb\n\nc</pre>" | node parse --html2wt
a
b
c

This has been merged and deployed.