Page MenuHomePhabricator

VisualEditor: nowiki tags thrown right after a template
Open, MediumPublic


I am filing a related common problem we meet at it.wp.

We had troubles with nowikis being thrown right after some templates when the
user did not add an extra space there, but simply edited something in that
page. See

We actually found a workaround for this:
but since this addition is apparently a nonsense, users demand that VE prevents
that behaviour instead.

They also think this is related to templates featuring some kind of table.

I did some tests as well.
I was able to reproduce an unwanted situation where the first line and the
table (which is actually a template) were mingled in a non-editable block

But I was also able to avoid nowikis, even if the extra span tags were not
added to the template: as you can see here,
if the first letter of the line is actually closer to the template's final
brace (with no space between), VEditing that page will result in the text
getting automatically placed in a better position, and no nowikis in sight,
even after multiple saves of the page.


Version: unspecified
Severity: normal



Event Timeline

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

Related Parsoid behavior (this is serialization of new content):

[subbu@earth lib] echo "<table><tbody><tr><td>foo</td></tr></tbody></table> a" | node parse --html2wt


<nowiki> </nowiki>a

The following is for existing content in wikitext

[subbu@earth lib] echo "{|\n|a\n|} a" | node parse --wt2wt

} a

So, Parsoid does not split the line after the table if it is old content, but does if it is new content and can introduce a <nowiki> Since the report states that happens no matter what is edited on the page, my suspicion is that the HTML has a newline break after the <table> added by VE. Requires further investigation that I cannot do right now, but hope this is good for starters. Adding others who might have time to investigate.

Jdforrester-WMF lowered the priority of this task from High to Medium.Jan 15 2015, 12:36 AM
Jdforrester-WMF set Security to None.