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

Tables not supported for gfm output #3

Open
jgm opened this issue Aug 7, 2017 · 3 comments
Open

Tables not supported for gfm output #3

jgm opened this issue Aug 7, 2017 · 3 comments

Comments

@jgm
Copy link

jgm commented Aug 7, 2017

Line 484 of CMarkGFM.hsc:

             TABLE aligns  -> error "constructing table not supported"
             TABLE_ROW     -> error "constructing table row not supported"
             TABLE_CELL    -> error "constructing table cell not supported"

It would be great if tables could be supported. Is there some problem? Perhaps I can help.

Also: this library will abort with an uncatchable runtime error, crashing any program that uses it, if you try to render a table node. That is not good behavior for a library. error should be used only in "should not happen" cases, i.e. for programming errors.

@jgm
Copy link
Author

jgm commented Aug 8, 2017

Looking into this further, I notice that cmark-gfm lacks any good way to programatically construct the nodes provided by extensions. So, for example set_table_alignments is a static function in tables.c, not an exported function. Is there a reason for this?

jgm added a commit to jgm/pandoc that referenced this issue Aug 8, 2017
We bypass the commonmark writer from cmark and construct our
own pipe tables, with better results.  (Note also that cmark-gfm
currently doesn't support rendering table nodes; see
kivikakk/cmark-gfm-hs#3.)
@juhp
Copy link

juhp commented Sep 14, 2020

Not sure if this is not already fixed?

@kivikakk
Copy link
Owner

Not yet, I don't believe.

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

No branches or pull requests

3 participants