Page MenuHomePhabricator

Paragraphs with leading whitespace other than one space become preformatted text on saving, rather than <nowiki>'ed whitespace
Closed, ResolvedPublic

Description

Author: swalling

Description:
Indenting a block of text three spaces in VE produces preformatted text after saving, but this formatting is not shown in edit mode.


Version: unspecified
Severity: normal

Details

Reference
bz49929

Event Timeline

bzimport raised the priority of this task from to Normal.Nov 22 2014, 1:45 AM
bzimport added a project: Parsoid.
bzimport set Reference to bz49929.
bzimport created this task.Jun 21 2013, 5:16 AM

This is a bit concerning; somehow something is 'helpfully' thinking to interpret these as <pre>s rather than <p>s, which shouldn't happen.

<p> Foo</p>

serialises to:

Foo

instead of <nowiki>ing

Parsoid issue; input HTML:

<p>Foo</p>
<p> Bar</p>
<p> Baz</p>
<p> Bang</p>
<p> Boom</p> (tab)

->

Foo
<nowiki> Bar</nowiki>
Baz
Bang
Boom

First two are correct, rest are not. Presumably checking for " " rather than "\w+"?

Related URL: https://gerrit.wikimedia.org/r/70091 (Gerrit Change I925d8ded2da16e0bd107fde77d58beff2aac3782)

https://gerrit.wikimedia.org/r/70091 (Gerrit Change I925d8ded2da16e0bd107fde77d58beff2aac3782) | change APPROVED and MERGED [by jenkins-bot]

Should be resolved. Please reopen if problems remain.

[Parsoid component reorg by merging JS/General and General. See bug 50685 for more information. Filter bugmail on this comment. parsoidreorg20130704]