https://bugzilla.wikimedia.org/show_bug.cgi?id=25203

Brad Jorsch <[email protected]> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
                 CC|                            |[email protected]

--- Comment #4 from Brad Jorsch <[email protected]> ---
It's sort of API, in that this feature in the parser seems to have been added
solely to support returning this information in the API.

Odd that "byteoffset" is actually the offset in Unicode codepoints.

The problem is that the code pulls out all the <h#> tags from the parsed HTML,
but uses the parsed-to-DOM representation of the original wikitext to try to
calculate the byteoffset. This parsed-to-DOM representation, however, doesn't
include DOM structure for any raw <h#> tags from the original wikitext, so when
it tries to find the DOM node for one of those it searches to the end of the
wikitext without finding it. Which also screws up all subsequent headers.

Roan, it looks like you added this back in 2009, any ideas here? Otherwise I'll
just put together a patch that skips trying to calculate byteoffset when
$sectionIndex === false.

-- 
You are receiving this mail because:
You are the assignee for the bug.
You are watching all bug changes.
_______________________________________________
Wikibugs-l mailing list
[email protected]
https://lists.wikimedia.org/mailman/listinfo/wikibugs-l

Reply via email to