You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Nodes get recursively parsed when they are part of list items, block quotes, etc. The start/end offset is adjusted after the parse is complete so the nodes reflect actual offset in the text.
However, the adjustment is done for nodes and their children but some nodes include other nodes that are not part of the child list. These do not get adjusted and this causes their offsets to be outside their parent range.
This affects:
FootnoteNode.footnote
TableNode.columns
RefLink.referenceKey
RefImage.referenceKey
I am changing the parser to let AbstractNode.shiftIndices() and AbstractNode.mapIndices() handle the adjustments for children. That way all nodes that have children not in the child list can override the methods and adjust their 'undeclared' child nodes.
The text was updated successfully, but these errors were encountered:
vsch
added a commit
to vsch/pegdown
that referenced
this issue
Jan 3, 2016
vsch
changed the title
Nodes included in other nodes but not in children list do not their start/end offset adjusted for recursive parsing offset
Nodes included in other nodes but not in children list do not adjust start/end offset for recursive parsing offset
Jan 31, 2016
Nodes get recursively parsed when they are part of list items, block quotes, etc. The start/end offset is adjusted after the parse is complete so the nodes reflect actual offset in the text.
However, the adjustment is done for nodes and their children but some nodes include other nodes that are not part of the child list. These do not get adjusted and this causes their offsets to be outside their parent range.
This affects:
I am changing the parser to let AbstractNode.shiftIndices() and AbstractNode.mapIndices() handle the adjustments for children. That way all nodes that have children not in the child list can override the methods and adjust their 'undeclared' child nodes.
The text was updated successfully, but these errors were encountered: