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

bzimport set Reference to bz54964.
Esanders created this task.Via LegacyOct 4 2013, 9:49 AM
bzimport added a comment.Via ConduitOct 4 2013, 9:55 AM

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]

gerritbot added a comment.Via ConduitOct 31 2013, 3:54 PM

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

gerritbot added a comment.Via ConduitNov 20 2013, 10:45 AM

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

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

Add Comment

Column Prototype
This is a very early prototype of a persistent column. It is not expected to work yet, and leaving it open will activate other new features which will break things. Press "\" (backslash) on your keyboard to close it now.