mirror of
https://github.com/xoofx/markdig.git
synced 2026-02-03 21:36:36 +00:00
LineBreakInline at the end of a paragraph has wrong Span Start and End #619
Reference in New Issue
Block a user
Delete Branch "%!s()"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
Originally created by @zickb on GitHub (Aug 17, 2023).
There is an issue with the
Inline.Span.End(and Start) of a LineBreakInline when the LineBreakInline is the last inline in a paragraph.Example Input: "a\n"
Expected behavior: The Span.Start and Span.End of the LineBreakInline should be 1.
Actual behavior: The Span.Start of the LineBreakInline is 0 and the Span.End is -1.
If the LineBreakInline is not the last inline in the paragraph then Span.Start and Span.End are set correctly.
Workaround: Calculate the Span.Start and Span.End based on PreviousSibling.Span for LineBreakInlines where Span.End is -1 manually.