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

Incorrect sourcepos for Setext headings #378

Closed
digitalmoksha opened this issue Apr 18, 2024 · 1 comment · Fixed by #381
Closed

Incorrect sourcepos for Setext headings #378

digitalmoksha opened this issue Apr 18, 2024 · 1 comment · Fixed by #381

Comments

@digitalmoksha
Copy link
Collaborator

digitalmoksha commented Apr 18, 2024

It looks like the returned data-sourcepos for setext headings are off by one line.

header
---
this

gives

<h2 data-sourcepos="1:1-3:4">header</h2>
<p data-sourcepos="3:1-3:4">this</p>

I think it should be

<h2 data-sourcepos="1:1-2:3">header</h2>
<p data-sourcepos="3:1-3:4">this</p>

I'll try to spin up a PR in a couple days.

@kivikakk
Copy link
Owner

Wrong indeed; thanks so much!

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

Successfully merging a pull request may close this issue.

2 participants