Last modified: 2013-08-24 00:06:35 UTC

Wikimedia Bugzilla is closed!

Wikimedia migrated from Bugzilla to Phabricator. Bug reports are handled in Wikimedia Phabricator.
This static website is read-only and for historical purposes. It is not possible to log in and except for displaying bug reports and their history, links might be broken. See T55287, the corresponding Phabricator task for complete and up-to-date bug report information.
Bug 53287 - More robust in-table state tracking needed to disable paragraph wrapping in fosterable position
More robust in-table state tracking needed to disable paragraph wrapping in f...
Status: RESOLVED FIXED
Product: Parsoid
Classification: Unclassified
token-stream transforms (Other open bugs)
unspecified
All All
: High normal
: ---
Assigned To: Gabriel Wicke
:
Depends on:
Blocks:
  Show dependency treegraph
 
Reported: 2013-08-23 23:07 UTC by Gabriel Wicke
Modified: 2013-08-24 00:06 UTC (History)
2 users (show)

See Also:
Web browser: ---
Mobile Platform: ---
Assignee Huggle Beta Tester: ---


Attachments

Description Gabriel Wicke 2013-08-23 23:07:03 UTC
Unbalanced table tokens in pages like http://fi.wikipedia.org/wiki/Kypros throw off the in-table tracking in the paragraph wrapper. This causes newlines in fosterable position to be paragraph-wrapped, which is then fostered out.

Broken behavior:

echo -ne '{|\n<td><td>fo</td>\n\n\n\n|}' | node parse
WARNING: DSR inconsistency: cs/s mismatch for node: BODY s: 0; cs: -1
<body><p data-parsoid='{"autoInsertedEnd":true,"dsr":[-1,-1,0,0]}'><br data-parsoid='{"dsr":[-1,-1,0,0]}'></p>
<table data-parsoid='{"dsr":[0,24,2,2]}'>
<tbody data-parsoid='{"dsr":[3,22,0,0]}'><tr data-parsoid='{"dsr":[3,19,0,0]}'><td data-parsoid='{"stx":"html","autoInsertedEnd":true,"dsr":[3,7,4,0]}'></td><td data-parsoid='{"stx":"html","dsr":[7,18,4,5]}'>fo</td></tr>


</tbody></table></body>


Correct behavior:

echo -ne '{|\n<td><td>fo</td>\n\n\n\n|}' | node parse
<body data-parsoid='{"dsr":[0,24,0,0]}'><table data-parsoid='{"dsr":[0,24,2,2]}'>
<tbody data-parsoid='{"dsr":[3,22,0,0]}'><tr data-parsoid='{"autoInsertedEnd":true,"dsr":[3,18,0,0]}'><td data-parsoid='{"stx":"html","autoInsertedEnd":true,"dsr":[3,7,4,0]}'></td><td data-parsoid='{"stx":"html","dsr":[7,18,4,5]}'>fo</td></tr>



</tbody></table></body>
Comment 1 Gabriel Wicke 2013-08-23 23:23:50 UTC
https://gerrit.wikimedia.org/r/#/c/80681/ addresses this.
Comment 2 Gerrit Notification Bot 2013-08-23 23:50:05 UTC
Change 80681 merged by jenkins-bot:
Bug 53287: More robust in-table state tracking in the paragraph wrapper

https://gerrit.wikimedia.org/r/80681
Comment 3 Gabriel Wicke 2013-08-24 00:06:35 UTC
This patch is now in round-trip testing, and will be deployed next week.

The original test case is fixed:

http://parsoid.wmflabs.org/fi/Kypros

Note You need to log in before you can comment on or make changes to this bug.


Navigation
Links