jgm / pandoc

Universal markup converter
https://pandoc.org
Other
33.3k stars 3.31k forks source link

Add to asciidoc writer support for tables with merged cells #8199

Open trianon1983 opened 1 year ago

trianon1983 commented 1 year ago

When i convert from html to asciidoc page with tables with merged cells lose their merging. It is necessary to add support for colspan and rovspan in assidoc writer. Thanks

trianon1983 commented 1 year ago

image

jgm commented 1 year ago

Can you give the output you'd expect for this input?

trianon1983 commented 1 year ago

yes, sure. in this example i am expecting the following image

trianon1983 commented 1 year ago

full example: example.zip

trianon1983 commented 1 year ago

note that the alignment in the cells also does not work correctly

jgm commented 1 year ago

OK. Currently we convert the table to a "legacy table" which doesn't support colspans. The new pandoc AST does support colspans for tables, but it will take some work to convert the asciidoc writer to use this more complex representation. It's not a high priority for me at the moment, but maybe someone else will want to take this on? The HTML writer uses this already, so lines 1086 and following of src/Text/Pandoc/Writers/HTML.hs may be helpful.