Entering the character - in a table cell results in the sequence |- which makes a new row, visible after saving (dirty round trip)
Description
Related Objects
- Mentioned In
- rGPAR7b4fdcdf0cfb: Merge "T88318: Fix regression in <nowiki> behavior with nested - in <td>."
rGPAR7a4726ce7ad7: T88318: Fix regression in <nowiki> behavior with nested - in <td>.
rGPARa4b0b11a74f5: T88318: Fix serialization of <p>-wrapped dash within <td>.
rGPAR863f4110e8b9: Merge "T88318: Fix serialization of <p>-wrapped dash within <td>."
T93116: Emit `| -` for `<td>-</td>` rather than nowiki soup
T92416: <p>-wrapping lost inside <td> - Mentioned Here
- T88148: class="wikitable wikitable" corrupted to class="wikitable"
Event Timeline
Can you provide an example where this happens? A test page or a diff?
https://en.wikipedia.org/w/index.php?title=User%3ASSastry_%28WMF%29%2FVE_Test&diff=645371170&oldid=645370967 shows that Parsoid does the right thing.
See T88148, for an instance of the opposite problem.
We should really emit | - (note the space) when <td> contents start with a dash.
Reproduced the bug with https://en.wikipedia.org/w/index.php?title=User%3ACscott%2Ftask88318&diff=649898905&oldid=649898024
But it only applies to the first instance of - in the table cell, which is weird.
Ah ha!
$ echo '<table><tr><td>-</td><td>- </td><td>-<p></p></td><td><p>-</p></td><tr><p>- </p></td></tr></table>' | tests/parse.js --html2wt {| |<nowiki>-</nowiki> |<nowiki>- </nowiki> |<nowiki>-</nowiki> |- |- |}
If you type "-" followed by space you get <p>- </p> -- I think you can get the <p>-</p> (no space) by typing a trailing space and then deleting it.
In any case, the <p>-wrapped - is what's causing the bug here.
Change 194541 had a related patch set uploaded (by Cscott):
WIP: T88318: Fix serialization of <p>-wrapped dash within <td>.
Change 194541 merged by jenkins-bot:
T88318: Fix serialization of <p>-wrapped dash within <td>.
Looks like there was a regression:
http://parsoid-tests.wikimedia.org/resultFlagNew/eaa9d1984b407ff2919669ec955af42600ad89e0/ab1a78ceba524c354208940ce49f33d7fa15c6a2/jawiki/%E3%83%8B%E3%82%B3%E3%83%BB%E3%83%AD%E3%82%BA%E3%83%99%E3%83%AB%E3%82%B0
| [[2015年オーストラリアグランプリ|AUS]]<br /><small>-</small>
went to
| [[2015年オーストラリアグランプリ|AUS]]<br /><small><nowiki>-</nowiki></small>
Looks like the "first child" test isn't strong enough/working.
[subbu@earth tests] echo "<table><td><small>-</small></td></table>" | node parse --html2wt {| |<small><nowiki>-</nowiki></small> |}
From subbu:
subbu: same with http://parsoid-tests.wikimedia.org/resultFlagNew/eaa9d1984b407ff2919669ec955af42600ad89e0/ab1a78ceba524c354208940ce49f33d7fa15c6a2/plwiki/Petric%C4%83_Hogiu subbu: you need to tweak the nowiki fix .. subbu: [subbu@earth tests] echo "<table><td><small>-</small></td></table>" | node parse --html2wt subbu: {| subbu: |<small><nowiki>-</nowiki></small> subbu: |}
Change 195816 had a related patch set uploaded (by Cscott):
T88318: Fix regression in <nowiki> behavior with nested - in <td>.
Change 195816 merged by jenkins-bot:
T88318: Fix regression in <nowiki> behavior with nested - in <td>.