Page MenuHomePhabricator

VisualEditor: Outer whitespace of first/last node in document not validated
Closed, ResolvedPublic

Description

Because we don't store the inner whitespace of the document, we can't validate the outer whitespace its first/last children.

  1. Create document with wikitext:

Heading

Foo

  1. Delete 'Heading' and the empty line
  2. You now have:

[{'type':'paragraph', 'internal': {'whitepsace': ['\n']}}, 'F' ....
in the DM

  1. This serialises to

\n
Foo


Version: unspecified
Severity: normal

Details

Reference
bz54964

Event Timeline

bzimport raised the priority of this task from to High.Nov 22 2014, 2:11 AM
bzimport set Reference to bz54964.

Wikifram wrote:

Translation for those looking to file a similar bug but no so well-versed in code-speak :-):

When you have a blank line at the start of an article, before the text of the lead, it is impossible in VE to remove this line or lines. See e.g. [https://en.wikipedia.org/w/index.php?title=User%3AFram%2Fsandbox&diff=575706125&oldid=575706080]

Change 92885 had a related patch set uploaded by Esanders:
Store inner whitespace of the body and compare it on conversion

https://gerrit.wikimedia.org/r/92885

Change 92885 merged by jenkins-bot:
Store inner whitespace of the body and compare it on conversion

https://gerrit.wikimedia.org/r/92885