MyST-Parser
MyST-Parser copied to clipboard
directives do not allow arguments without values (booleans)
Describe the bug
context
I observed that boolean arguments that do not require a value on directives do not work with myst-parser, even if they do work well with rst.
expectation
```{command-output} bash --version
:cwd: ..
:returncode: 2
:nostderr:
```
workaround
Apparently adding a true
as value appears to be working, but I am not 100% sure.
```{command-output} bash --version
:cwd: ..
:returncode: 2
:nostderr: true
```
problem
This is problematic, especially for people doing rst2myst conversions.
Reproduce the bug
```{command-output} bash --version
:cwd: ..
:returncode: 2
:nostderr:
```
List your environment
To my surprise this issue appears to happen only on Linux. On MacOS it did work as expected.
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:
@ssbarnea I noticed you have indented the options (similar to rst
)
Could you try:
```{command-output} bash --version
:cwd: ..
:returncode: 2
:nostderr:
```
or using the alternative syntax for listing groups of options
```{command-output} bash --version
---
cwd: ..
returncode: 2
nostderr:
----
```
In fact that was likely the result of conversion script. If that proves to work we should file a bug with it as I bet others will face similar confusions when migrating from rst.
@ssbarnea I mainly want to rule that out as a source of possible issue.
Closing this, since it does work, see e.g.
test.md
```{contents}
:local:
```
# Heading
$ myst-docutils-pseudoxml test.md
<document source="test.md">
<topic classes="contents local" ids="contents" names="contents">
<bullet_list>
<list_item>
<paragraph>
<reference ids="toc-entry-1" refid="heading">
Heading
<section ids="heading" names="heading">
<title refid="toc-entry-1">
Heading
In fact that was likely the result of conversion script. If that proves to work we should file a bug with it as I bet others will face similar confusions when migrating from rst.
FYI, there is https://github.com/executablebooks/rst-to-myst for that