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
{{ message }}
Repository navigation
Setext heading's end position is on the line after its underline #659
With --sourcepos, a setext heading that isn't at the end of the document gets an end position on the line after its underline, which belongs to the next block (or is blank).
Reproduced on cmark 0.31.2 (Homebrew, macOS) and on master at d56b4bd.
The heading ends at 3:0, column 0 of the blank line, which isn't a position of any character.
At the end of the document it's right: Foo\n---\n gives 1:1-2:3.
Expected 1:1-2:3 in all three cases: the underline's line and last column. commonmark.js 0.31.2 gives [[1,1],[2,3]] for both g.md and h.md, and commonmark-java 0.31.0 gives source spans on lines 1 and 2 only.
Not the same as #141 (whether the underline is included at all, which it is, as expected) or #296 (inline positions). Possibly related: #656, another heading whose end position is wrong (an empty ATX heading's ends before its start).
Activity
Plan reading Markdown with cmark-gfm on every platform (read-markdown…
Markdown tables, read as GitHub reads them (#25)