Page MenuHomePhabricator

More robust in-table state tracking needed to disable paragraph wrapping in fosterable position
Closed, ResolvedPublic


Unbalanced table tokens in pages like 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>


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>


Version: unspecified
Severity: normal



Event Timeline

bzimport raised the priority of this task from to High.Nov 22 2014, 1:46 AM
bzimport set Reference to bz53287.

Change 80681 merged by jenkins-bot:
Bug 53287: More robust in-table state tracking in the paragraph wrapper

This patch is now in round-trip testing, and will be deployed next week.

The original test case is fixed: