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

Odd commonmark reader/writer regressions #3841

Closed
jgm opened this issue Aug 8, 2017 · 3 comments
Closed

Odd commonmark reader/writer regressions #3841

jgm opened this issue Aug 8, 2017 · 3 comments
Labels
Milestone

Comments

@jgm
Copy link
Owner

jgm commented Aug 8, 2017

% pandoc -t commonmark
hi\
there
Assertion failed: (false), function S_render_node, file cbits/commonmark.c, line 467.
Abort trap: 6
% pandoc -f commonmark
hi\
there
% pandoc -f commonmark
hi\
there
pandoc: Unknown node type: 32769
CallStack (from HasCallStack):
  error, called at CMark.hsc:258:13 in cmark-0.5.6.1-Ap7zcscAnKKJGfqwJCIrL1:CMark

This does not happen with the released version.

@jgm jgm added this to the pandoc 2.0 milestone Aug 8, 2017
@jgm jgm added the bug label Aug 8, 2017
@jgm
Copy link
Owner Author

jgm commented Aug 8, 2017

Same results when compiling against cmark-0.5.5.1, so the new cmark release doesn't seem to be the culprit.

@jgm
Copy link
Owner Author

jgm commented Aug 8, 2017

Problem goes away if I revert commit 089db59c23707468af849b4639dd47a015720836.

I infer that the problem comes from using two libraries which bind variants of cmark simultaneously (cmark, cmark-gfm). Possibly cmark-gfm's version of the C library is getting used in the CommonMark reader and writer, instead of cmark's. There's undoubtedly a way around this. Perhaps the easiest would be to just use cmark-gfm for both GFM and CommonMark, turning off the GitHub extensions for regular CommonMark. Another way might be to rename the source files for cmark-gfm.

@jgm
Copy link
Owner Author

jgm commented Aug 8, 2017

If we did just use cmark-gfm, we could consolidate and get rid of the separate GFM modules.
We could just test for extensions. gfm would just be a synonym of commonmark+strikeout+pipe_tables, and we'd test for hard_line_breaks, smart, etc.

@jgm jgm closed this as completed in 91c989d Aug 8, 2017
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

1 participant