Ran
|
Files
153
|
Run time
13s
|
Badge
Embed ▾
README BADGES
|
push
travis-ci
<a href="https://github.com/wikimedia/parsoid/commit/6fbdd7038">Clear invalid DSRs in <poem> The poem extension munges its contents before parsing it as wikitext. This means that the parsed content doesn't appear literally in the source document -- therefore we need a new parsing frame. In addition, we should clear the DSR in the result, since we are not currently correctly mapping these DSRs to offsets in the source document, and so they can't be used for selser. If we ever implement selser on the <poem> contents, we simply need to record the mapping to original $contents as we preprocess it, and then apply this mapping to the DOM result, the same way we do for the gallery extension. This off-by-one error was present in both the PHP and JS implementations, although only the PHP implementation triggered an assertion failure because (a) in JavaScript you'd have to use emojis or other astral symbols, and (b) the JavaScript implementation doesn't do unicode offset consistency checks, so you'd have to examine the DSR offsets directly to see the bug; since we don't do selser on <poem> contents the bad DSR offsets can't actually cause a bad html2wt result. You can see the bad DSR and one-character-shifted template parameter data-mw contents in the HTML generated by the JavaScript implementation before this patch, however. Parser test added to document/prevent regression. Bug: T231945 Change-Id: I</a><a class="double-link" href="https://github.com/wikimedia/parsoid/commit/86f5c27bf">86f5c27bf</a>
9641 of 12141 branches covered (79.41%)
15073 of 17775 relevant lines covered (84.8%)
31762.39 hits per line
Coverage | ∆ | File | Lines | Relevant | Covered | Missed | Hits/Line | Branch Hits | Branch Misses |
---|