-
Notifications
You must be signed in to change notification settings - Fork 252
recommonmark will never support table, what can I do #103
Comments
recommonmark
will **never** support table
Seems like a situation where AutoStructify should help - use the
|
@maxgrenderjones |
Are there any automation tools? |
Emacs has some tools to edit ASCII tables (https://www.gnu.org/software/emacs/manual/html_node/emacs/Text-Based-Tables.html) But if you are just writing a simple n x m table where no cells extend beyond their width or hight, it's much easier to use a list table (also goes in an Or, alternately, you can write the table in pure HTML, since Markdown supports HTML directly inline. |
Hi @leniy I have solved using https://github.com/ryanfox/sphinx-markdown-tables |
@aborruso, (sphinx-markdown-tables)[https://github.com/ryanfox/sphinx-markdown-tables] is not true sphinx/docutils table support. It simply converts the tables to html tables. This creates major issues when writing custom sphinx builders/writers. For example when building the sphinx-markdown-builder, I walk the docutils tree to build markdown tables. However, this fails to work with an html table. So, I have to build a custom exception that detects html tables to convert it to a markdown table. This is certainly not ideal, because someone might explicitly define their table in html and want it kept in html. In summary, html tables should be separate from a docutils table, and recommonmark should build a docutils table from markdown tables to ensure this separation. Sadly, the commonmark python module does not support parsing markdown tables. It has been suggested to rebuild the recommonmark parser to use the Markdown python module. This parser supports extensions and has a very solid extension for parsing markdown tables. I have created a pull request to add the Markdown parser. It not only enables full markdown support using the Markdown python module but also opens the door for more features supported by the Markdown modules various extensions. I have ensured the pull request is fully backward compatible with the CommonMark parser. In order to use the Markdown parser this pull request implements, you have to explicitly set the app.add_config_value('recommonmark_config', {
'parser': 'Markdown'
}, True) You can see my code at the link below. |
@aborruso Link worked very well! Thanks! |
I know
recommonmark
will never supporttable
, cause this is a major feature thanmarkdown
, to let people to use rst.So,is there any other
Parser
forsphinx
to use ?The text was updated successfully, but these errors were encountered: