Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

ContainerInline with a ParentBlock has a wrong Span End #731

Closed
zickb opened this issue Aug 17, 2023 · 0 comments · Fixed by #733
Closed

ContainerInline with a ParentBlock has a wrong Span End #731

zickb opened this issue Aug 17, 2023 · 0 comments · Fixed by #733

Comments

@zickb
Copy link

zickb commented Aug 17, 2023

There is an issue with the Inline.Span.End in case of a container inline with a parent block.
Example Input: "a\n"
Expected behavior: The Span.End of the container inline should be 1.
Actual behavior: The Span.End of the container inline is 0.

Workaround (does not work trivially if #730 is hit):

if (inline is ContainerInline { ParentBlock: not null } containerInline)
    return new SourceSpan(containerInline.FirstChild?.Span.Start ?? 0, containerInline.LastChild?.Span.End ?? 0);

Related issue: #702

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants