Slugs are created inside empty table rows, creating pawns if used
Closed, ResolvedPublic

Description

At https://en.wikipedia.org/w/index.php?title=Churnet_Valley_Railway&diff=prev&oldid=569277862 it seems that a table ending with trailing new line syntax

-
}

caused pawns to be added to the article. As discussed at https://en.wikipedia.org/w/index.php?title=Wikipedia:VisualEditor/Feedback&oldid=569732999#Chess_pieces_still_happening this syntax, although technically wrong, will continue to be added to articles. VE and Parsoid should therefore deal with this cleanly without the addition of any pawns to the article.


Version: unspecified
Severity: normal

bzimport set Reference to bz53214.
Thryduulf created this task.Via LegacyAug 22 2013, 3:12 PM
GWicke added a comment.Via ConduitAug 22 2013, 3:40 PM

Pawns are firmly VE territory. Moving to the VisualEditor product.

Thryduulf added a comment.Via ConduitAug 23 2013, 6:32 PM

To perhaps clarify, VE and parsoid should accept both

content
-
}

and

content
}

as validly closed templates that should be displayed and rendered identically. Both syntaxes should be retained as is when roundtripping.

GWicke added a comment.Via ConduitAug 23 2013, 10:08 PM

(In reply to comment #2)

To perhaps clarify, VE and parsoid should accept both

|content
|-
|}

and

|content
|}

as validly closed templates that should be displayed and rendered
identically.

We currently don't strip empty table rows, which seems to be done in some conditions in the PHP parser + tidy combo. We could emulate this behavior in templated content and maybe also outside of templated content, but will need to avoid dirty diffs and preserve WYSIWYG behavior even when another row is added in VE.

Both syntaxes should be retained as is when roundtripping.

This should already be the case in Parsoid. I just verified this at http://parsoid.wmflabs.org/_rtform/. Pawn insertion would a DOM modification in VE.

gerritbot added a comment.Via ConduitMar 17 2014, 4:18 PM

Change 119067 had a related patch set uploaded by Esanders:
Only insert slugs where paragraphs are allowed

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

gerritbot added a comment.Via ConduitMar 17 2014, 5:20 PM

Change 119067 merged by jenkins-bot:
Only insert slugs where paragraphs are allowed

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

Jdforrester-WMF changed the title from "VisualEditor: Slugs are created inside empty table rows, creating pawns if used" to "Slugs are created inside empty table rows, creating pawns if used".Via WebNov 24 2014, 2:19 AM
Jdforrester-WMF set Security to None.

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.