-
Notifications
You must be signed in to change notification settings - Fork 197
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
Replicate directive parsing behaviour of RST parser(?) #55
Comments
Yeh no problem, I’ll look into it |
I have been trying to figure out what"s going on, and the only difference I can find between the MyST and the docutils statemachine seems to be in the
If I print a
Then I get these outputs:
No idea if that has something to do with this error, but I"m just trying to figure out where behavior is different between the two packages |
Don"t worry I"ve already taken care of it in https://github.com/ExecutableBookProject/myst_parser/tree/restructure-testing, PR to come soon |
It was because the |
This PR will also handle the directive option indentation #54 |
In this PR I have: 1. Restructured the test folder and added an `AstRenderer` and lower level tests for the source text to Markdown (mistletoe) AST. 2. Added `docs/develop/test_infrastructure.md` to explain the testing inrastructure. 3. Restructured the directive block parsing, to make it more modular/understandable and improved error checking and reporting. fixes #54, fixes #55, fixes #51
Note that this doesn"t seem to be fixed. Now when I run the same code (after a rebase), I get a warning instead of a break, but it"s the same warning (1 argument passed while 0 expected). Gonna re-open this so we don"t lose track of it, in case there is an underlying issue that"s causing this |
Note - here is an example of code that causes this behavior: #60 |
To clarify this issue: the docutils parser here .. <name>:: <arguments>
<option block>
<body> Instead, if no required/optional arguments are specified (by the directive class); the .. content:: :depth: 2 .. note:: This is body text |
* Move directive parsing code to separate module * Allow content to start on argument block (if no arguments allowed) * Update syntax.md fixes #55
I was looking into using this sphinx extension to handle the MyST vs. rST comparison:
https://github.com/djungelorm/sphinx-tabs
It uses a top-level directive
.. tabs::
that should take no arguments. However, I found that when I use this directive in MyST with:I am getting an error that arguments are passed to the
tabs
directive. The error shows because the directive says it takes zero arguments.I am wondering if we are passing an empty argument, or something like this?
Here"s a PR that shows off this behavior: #60
The text was updated successfully, but these errors were encountered: