From: Guenter M. <mi...@us...> - 2022-01-11 16:16:45
|
Dear Komiya Takeshi, Thank you for the fast fix. On 2022-01-09, Komiya Takeshi wrote: > Now I released pycmark-0.9.6 and pycmark-gfm-0.9.6 that contain > renamed "Parser" classes on the top of the modules. > I hope it helps to integrate with docutils. This helps a lot. Now, `docutils-cli.py --parser=pycmark` works and allows to convert an Markdown document to all output formats supported by Docutils (in principle, not tested yet). IMV, the `pycmark` package is the most simple/lightweight way to get Markdown support in Docutils. Do you plan some more work on the package or basically want to retire it in favour of "myst"? Which is your preferred way of raising questions, report bugs, or suggest features/changes? Experimenting with the sample document https://github.com/thephpleague/commonmark/raw/main/tests/benchmark/sample.md I was met with an AssertionError:: File ".../docutils/writers/_html_base.py", line 1427, in visit_reference assert len(node) == 1 and isinstance(node[0], nodes.image) A minimal input example is a link in a list:: * [Overview](http://example.com) The problem is, that pycmark puts inline elements directly into the <list_item> node while the docutils.dtd Document Tree specification says that <list_item> may only contain body elements. https://docutils.sourceforge.io/docs/ref/doctree.html#list-item I don't know which other constructs are affected. Testing the validity of XML documents created by ``docutils-cli --parser=pycmark --writer=xml --indent`` with ``xmllint --valid`` may help to spot problems. Thanks again, Günter |