executablebooks / MyST-Parser

An extended commonmark compliant parser, with bridges to docutils/sphinx
https://myst-parser.readthedocs.io
MIT License
760 stars 196 forks source link

Autoclass directive works in rST but not Markdown #587

Open felixvd opened 2 years ago

felixvd commented 2 years ago

Describe the bug

When I try to use autodoc directives like autoclass in Markdown format, they do not work properly. If they are used inside an {eval-rst} block, they work fine.

Comparing the output looks like this:

Screenshot from 2022-06-15 16-06-41

I may be making a formatting or other mistake, but {note} and other directives appear to work fine.

Reproduce the bug

  1. Create a Markdown file with this content, where the autoclass directive is used once inside an eval-rst block which succeeds, and once as a directive from MyST as described here, which fails.
  2. Build it with Sphinx and Myst enabled.
  3. It will look like the screenshot further up.

List your environment

Sphinx 1.8.5, myst-parser 0.15.2

welcome[bot] commented 2 years ago

Thanks for opening your first issue here! Engagement like this is essential for open source projects! :hugs:
If you haven't done so already, check out EBP's Code of Conduct. Also, please try to follow the issue template as it helps other community members to contribute more effectively.
If your issue is a feature request, others may react to it, to raise its prominence (see Feature Voting).
Welcome to the EBP community! :tada: