Closed clayrisser closed 5 years ago
High-level architecture
Using Markdown I convert the markdown into html. https://github.com/rtfd/recommonmark/pull/138/files#diff-17a9bdc2700f60d92650717d0c63ff4aR25
Using HTMLParser I walk the html AST. https://github.com/rtfd/recommonmark/pull/138/files#diff-17a9bdc2700f60d92650717d0c63ff4aR47 https://github.com/rtfd/recommonmark/pull/138/files#diff-17a9bdc2700f60d92650717d0c63ff4aR60 https://github.com/rtfd/recommonmark/pull/138/files#diff-17a9bdc2700f60d92650717d0c63ff4aR61
This is a huge PR. Did you implement the full RST markdown parser, or did that come from somewhere else?
This also has no user-facing documentation around the differences between the parsers, so that would be the minimum required before merging. It's a lot of code to look at though, so I'm not sure when I'll have time to review it more heavily.
I ended up just forking recommonmark and publishing it with the markdown parser as sphinx-markdown-parser.
This fixes issue #68 This fixes issue #3
This 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 this 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
parser
property in therecommonmark_config
toMarkdown
.For Sphinx-1.3 you can add it by replacing
CommonMarkParser
withMarkdownParser
You can see my code at the link below. https://github.com/codejamninja/recommonmark/tree/codejamninja/python-markdown