MyST-Parser
MyST-Parser copied to clipboard
{eval-rst} throws a NotImplementedError with ".. contents::" directive
Description
Using
```{eval-rst}
.. contents::
```
Inside of a markdown file throws the following exception:
Exception occurred:
File "/home/tomas/tmp/venv/lib/python3.8/site-packages/sphinx/writers/html5.py", line 790, in unknown_visit
raise NotImplementedError('Unknown node: ' + node.__class__.__name__)
NotImplementedError: Unknown node: pending
However, if the following is used instead, no exception is thrown:
```{contents}
```
To Reproduce
- Set up a virtual environment.
- Install
sphinx
andmyst-parser
usingpip
. - Set up a basic project using
sphinx-quickstart
- Include a markdown file in the toctree of
index.rst
, let's saytest.md
. - Put the following in the
test.md
file:
```{eval-rst}
.. contents::
```
- Try to compile it with
make html
- See error.
Expected behavior
The document compiles without error, the same way it does when the following construction is used:
```{contents}
```
Environment
- Python version: 3.8.7
- Sphinx version: 3.5.1
- Myst parser version: 0.13.5
- Operating system: Fedora 32
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: