Skip to content

Markdown support breaks normal rst docs #9

Description

@andeaseme

I've disabled the markdown support because it messes with the rst code blocks and numbered lists. You can find examples on this page when you compile the docs:
https://i2mint.github.io/epythet/module_docs/epythet.html

This code needs to change
epythet/_static/docsrc/conf.py

import commonmark


def docstring(app, what, name, obj, options, lines):
    md = '\n'.join(lines)
    ast = commonmark.Parser().parse(md)
    rst = commonmark.ReStructuredTextRenderer().render(ast)
    lines.clear()
    lines += rst.splitlines()


def setup(app):
    app.connect('autodoc-process-docstring', docstring)

The markdown parser should not be blindly applied to the entire document.

One possible solution is to have some kind of sentinel or keyword show where md starts and finishes and only apply it to those sections. Even better if you can tell the difference between md and rst without the users knowledge.

Documentation must be added for whatever the solution ends up being.

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

Labels

bugSomething isn't working

Type

No type

Projects

No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions