GWicke has submitted this change and it was merged.
Change subject: Code cleanup + bug fix in detection of template range nesting.
......................................................................
Code cleanup + bug fix in detection of template range nesting.
* The code that detected template nesting had a bug where it
would miss nested scenarios in some cases.
For a range r, the code had to look at tpl ranges recorded
for r.start and r.end and look at their intersection to see
if it had any values besides r itself. If yes, r is nested
in the ranges found in the intersection. The code used to
check if the ranges for r.start and r.end were identical
(which need not be always).
The following wikitext extracted from en:Maids with guns
was not RT-ing properly because of this bug.
---
{{col-begin}}
{{Div col}}
* ''[[Underworld Beauty]]'' (1958)
{{Div col end}}
{{col-end}}
---
Now, the snippet and the page RT correctly as do a few other
pages (en:Shotenro Taishi, for one). No change in parser tests
or regressions pages tested in earlier commits.
* Also, cleaned up the code to use Node.data attribute of the
JSDOM object to record tpl-ranges required for the analysis
rather than use data-tpl-ranges attribute as a hack which
had to be cleared out to make sure it was not serialized out.
This should also make the code slightly more efficient.
Change-Id: I6850ea31bb385af58c825e73b274753fa8c624f2
---
M js/lib/mediawiki.DOMPostProcessor.js
1 file changed, 47 insertions(+), 33 deletions(-)
Approvals:
GWicke: Verified; Looks good to me, approved
jenkins-bot: Checked
--
To view, visit https://gerrit.wikimedia.org/r/47328
To unsubscribe, visit https://gerrit.wikimedia.org/r/settings
Gerrit-MessageType: merged
Gerrit-Change-Id: I6850ea31bb385af58c825e73b274753fa8c624f2
Gerrit-PatchSet: 3
Gerrit-Project: mediawiki/extensions/Parsoid
Gerrit-Branch: master
Gerrit-Owner: Subramanya Sastry <[email protected]>
Gerrit-Reviewer: GWicke <[email protected]>
Gerrit-Reviewer: Subramanya Sastry <[email protected]>
Gerrit-Reviewer: jenkins-bot
_______________________________________________
MediaWiki-commits mailing list
[email protected]
https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits