commonmark / cmark

CommonMark parsing and rendering library and program in C
Other
1.62k stars 539 forks source link

incorrect start_column & end_column #442

Open Parth opened 2 years ago

Parth commented 2 years ago

The text: - \na

Creates the following hierarchy:

This AST has the following {start_line, end_line, start_column, end_column}

{2, 2, 3, 3} (the Text bounds) exceed the bounds for the document, and violates some assumptions which cause my application to panic.

I couldn't find any documentation which makes it clear whether this is a bug or not, but my intuition says that this is a bug.

jgm commented 2 years ago

I agree, looks like a bug. I didn't write the code for inline source positions, but you should probably look at make_literal in inlines.c.