Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Nested directives combined with colon fences do not parse YAML blocks correctly #963

Open
iso2013 opened this issue Aug 19, 2024 · 0 comments
Labels
bug Something isn't working

Comments

@iso2013
Copy link

iso2013 commented Aug 19, 2024

What version of myst-parser are you using?

2.0.0

What version dependencies are you using?

docutils 0.20.1
sphinx 7.4.7

What operating system are you using?

Linux

Describe the Bug

When using this syntax:

::::{outer-directive}
:key: value
:::{inner-directive}
:::
::::

This warning message is displayed:
WARNING: 'outer-directive': Invalid options format (bad YAML) [myst.directive_parse]

This is because the directives.py file from MyST parser determines the end of the YAML block solely by looking at which lines begin with a colon.

I have a proposed fix which I will open a PR for momentarily.

Expected Behavior

No response

To Reproduce

No response

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

1 participant