Subramanya Sastry has uploaded a new change for review. Change subject: Dont emit </td> in tokenizer since more td-content might follow. ......................................................................
Dont emit </td> in tokenizer since more td-content might follow. * Templates can lead to td-cell content to be put together from different parsing contexts -- see example below. Input : {{echo|{{!}}foo}}{{echo|bar}} Output: <td>foobar</td> Given this, the tokenizer cannot really close a <td> tag. So, eliminated the </td> token from the tokenizer and letting the tree builder close unclosed tags. * Added a mw:TSRMarker meta tag where the </td> used to be in case the TSR info from that place might be useful. Similarly, added another such marker where </tr> might show up. In theory, we could add these markers to all productions where there is no tsr-bearing tag at the end of the production. However, unsure if these marker-tsr tags make a difference at all. Something worth investigating later and getting rid of them if they are not useful. * We have a purely white-space regression in a html2html test -- the diff is purely syntactic (trailing white-space in td cells) which can be fixed by fixing the html output normalizer. * The following simplified wikitext from en:KingdomOfDenmark now roundtrips correctly: {{col-begin}} {{col-break|width=70%}} foo bar baz {{col-break|width=30%}} <div style="float:right">{{Danish regions}}</div> {{Col-end}} Change-Id: I1ef6a462122e4e72271748e2f339a28e85f3008a --- M js/lib/mediawiki.DOMPostProcessor.js M js/lib/pegTokenizer.pegjs.txt 2 files changed, 28 insertions(+), 8 deletions(-) git pull ssh://gerrit.wikimedia.org:29418/mediawiki/extensions/Parsoid refs/changes/06/30306/1 -- To view, visit https://gerrit.wikimedia.org/r/30306 To unsubscribe, visit https://gerrit.wikimedia.org/r/settings Gerrit-MessageType: newchange Gerrit-Change-Id: I1ef6a462122e4e72271748e2f339a28e85f3008a Gerrit-PatchSet: 1 Gerrit-Project: mediawiki/extensions/Parsoid Gerrit-Branch: master Gerrit-Owner: Subramanya Sastry <ssas...@wikimedia.org> _______________________________________________ MediaWiki-commits mailing list MediaWiki-commits@lists.wikimedia.org https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits