Subramanya Sastry has uploaded a new change for review. Change subject: Look for tsr only on start-elem when collecting tpl ranges. ......................................................................
Look for tsr only on start-elem when collecting tpl ranges. * findWrappableTemplateRanges was only looking for tpls that had valid tsr set. However, it was testing both start and end tags. But, in the presence of wikitext errors, the end-tag may not have a valid tsr even if the start tag did. This led to some top-level tpl ranges not getting wrapped. Ex: <ref>{{echo|bar}}<!--bad-></ref> * Fixed the check to only look for tsr on the start-tag, not the end tag. * This fixes the RT-ing of the snippet above as well as on other pages like: en:Turkish Yeni Lira * No change in parser tests (TODO: Add variant of above) Change-Id: I183c7c7065d784b8a52cf2bf66c3a519c35fd136 --- M js/lib/mediawiki.DOMPostProcessor.js 1 file changed, 12 insertions(+), 4 deletions(-) git pull ssh://gerrit.wikimedia.org:29418/mediawiki/extensions/Parsoid refs/changes/96/47096/1 -- To view, visit https://gerrit.wikimedia.org/r/47096 To unsubscribe, visit https://gerrit.wikimedia.org/r/settings Gerrit-MessageType: newchange Gerrit-Change-Id: I183c7c7065d784b8a52cf2bf66c3a519c35fd136 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