cmark-gfm-hs icon indicating copy to clipboard operation
cmark-gfm-hs copied to clipboard

Tables not supported for gfm output

Open jgm opened this issue 8 years ago • 5 comments

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 avatar Aug 07 '17 16:08 jgm

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 avatar Aug 08 '17 16:08 jgm

Not sure if this is not already fixed?

juhp avatar Sep 14 '20 05:09 juhp

Not yet, I don't believe.

kivikakk avatar Sep 14 '20 05:09 kivikakk