Skip to content
This repository has been archived by the owner on Mar 25, 2022. It is now read-only.

Adds support for basic markdown tables using the Markdown parser #138

Closed

Conversation

clayrisser
Copy link
Contributor

@clayrisser clayrisser commented Feb 2, 2019

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 the recommonmark_config to Markdown.

    app.add_config_value('recommonmark_config', {
        'parser': 'Markdown'
    }, True)

For Sphinx-1.3 you can add it by replacing CommonMarkParser with MarkdownParser

from recommonmark.parser import MarkdownParser

source_parsers = {
    '.md': MarkdownParser,
}

source_suffix = ['.rst', '.md']

You can see my code at the link below.
https://github.com/codejamninja/recommonmark/tree/codejamninja/python-markdown

@ericholscher
Copy link
Member

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.

@clayrisser
Copy link
Contributor Author

I ended up just forking recommonmark and publishing it with the markdown parser as sphinx-markdown-parser.

@clayrisser clayrisser closed this Feb 23, 2019
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants