-
Notifications
You must be signed in to change notification settings - Fork 330
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
Update to cmark 0.30.2 #278
Comments
@johnxnguyen we've run into a bug which is present on 0.29, but not present on 0.30: If you try to render a single tick (`) on 0.30.2 with the following C code: char *content = "`";
int opts = 0;
cmark_node *doc = cmark_parse_document(content, strlen(content), opts);
printf("%d, %d\n", doc->start_column, doc->end_column);
printf("%d, %d\n", doc->first_child->start_column, doc->first_child->end_column);
printf("%d, %d\n", doc->first_child->first_child->start_column, doc->first_child->first_child->end_column); you get:
as expected, but if you do so with 0.29 (Down's current version which is 3 years old) you get:
which exceeds the document bounds and depending on what you're doing with the AST you'll experience crashes |
if you need it here is what the debug visitor sees:
(which is fine) |
Here is a small C program you can use for testing: if you go into the cmark folder and checkout the most recent commit and regen the libs you'll find that the problem goes away and we're returned valid ranges. |
Thanks for lending a hand with the C code @steverusso |
I updated on my fork, and everything seems to be working fine, will report back as I explore more: https://github.com/Parth/Down |
Update to cmark 0.30.2
The text was updated successfully, but these errors were encountered: