Last modified: 2013-09-16 23:28:44 UTC
Test case: echo '<table>{{echo|foo<tr><td>bar</td></tr>}}</table>' | node parse WARNING: DSR inconsistency: cs/s mismatch for node: BODY s: 0; cs: -3 <body data-parsoid='{"dsr":[0,49,0,0]}'>foo<table data-parsoid='{"stx":"html","dsr":[0,48,7,8]}'><tbody about="#mwt1" typeof="mw:Transclusion" data-mw='{"target":{"wt":"echo","href":"./Template:Echo"},"params":{"1":{"wt":"foo<tr><td>bar</td></tr>"}},"i":0}' data-parsoid='{"dsr":[7,40,null,null],"pi":[[{"k":"1","spc":["","","",""]}]]}'><tr data-parsoid='{"stx":"html"}'><td data-parsoid='{"stx":"html"}'>bar</td></tr></tbody></table> </body> The foster-parented 'foo' is not marked as transclusion-affected, which will cause a dirty diff on round-trip: echo '<table>{{echo|foo<tr><td>bar</td></tr>}}</table>' | node parse --wt2wt WARNING: DSR inconsistency: cs/s mismatch for node: BODY s: 0; cs: -3 foo<table>{{echo|foo<tr><td>bar</td></tr>}}</table>
Change 82647 had a related patch set uploaded by Arlolra: WIP: Discard foster-parented transclusion content https://gerrit.wikimedia.org/r/82647
An edge case that I noticed here, echo "{{echo|<table><tr>}}foo<td>bar</td></tr></table>" | node parse echo "{{echo|<table><tr>}}<p>foo</p><td>bar</td></tr></table>" | node parse echo "{{echo|<table><tr>foo}}<td>bar</td></tr></table>" | node parse the transclusion info gets added to the fostered content resulting in an error, ERROR: Do not have necessary info. to encapsulate Tpl: 0
Change 82647 merged by Arlolra: Encapsulate foster-parented transclusion content. https://gerrit.wikimedia.org/r/82647