Comments (8)
Don't worry I've already taken care of it in https://github.com/ExecutableBookProject/myst_parser/tree/restructure-testing, PR to come soon
from myst-parser.
Yeh no problem, I’ll look into it
from myst-parser.
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 parse_directive_arguments
method:
def parse_directive_arguments(directive, arg_text):
If I print a type
on each iteration like so:
def parse_directive_arguments(directive, arg_text):
print(type(arg_text))
Then I get these outputs:
- docutils function:
<class 'docutils.statemachine.StringList'>
- MyST function:
<class 'str'>
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
from myst-parser.
It was because the CodeFence
regex was including the line break character as part of the argument string.
from myst-parser.
This PR will also handle the directive option indentation #54
from myst-parser.
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
from myst-parser.
Note - here is an example of code that causes this behavior: #60
from myst-parser.
To clarify this issue: the docutils parser here
does not rigidly specify the structure of the directive block:
.. <name>:: <arguments>
<option block>
<body>
Instead, if no required/optional arguments are specified (by the directive class); the <option block>
can start at <arguments>
or, if no required/optional arguments are specified and no options are specified; the <body>
block can start at <arguments>
. Examples:
.. content:: :depth: 2
.. note:: This is body text
from myst-parser.
Related Issues (20)
- Anchor links to other markdown files produces " WARNING: local id not found in doc..." HOT 8
- DOC BUG: Content child 1 and Content child 2 pages look off HOT 1
- Warning "local id not found in doc" in translated docs since MyST-parser 0.19.0 HOT 4
- Add an extension to support GitHub alerts HOT 2
- Linking to documentation heading
- Numbered headings (for example starting with 1.) are not translated with Sphinx HOT 1
- `parsed-literal` does not preserve code-highlighting HOT 2
- Typo in the documentation
- Open external URLs in a new tab HOT 2
- Create a new release to capture the docutils warnings fixes HOT 2
- Cannot link to RST sections since 0.17.0 HOT 4
- 404 Page not found on "MyST - Markedly Structured Text - Parser" page HOT 1
- inline attribute on hyperlink disappears in LaTeX (but is there in HTML) HOT 1
- Line braks doesn't work. HOT 2
- third occurence of heading with the same title cannot be referenced, `[myst.xref_missing]` HOT 1
- No longer a canonical way to parse a simple snippet HOT 4
- Emit include-read event HOT 1
- Message "inconsistent footnote references in translated message...." HOT 1
- WARNING: 'myst' cross-reference target not found: 'level-4-header-title' [myst.xref_missing] HOT 4
- Equation label of math not work before `make clean` when math_numfig=True HOT 7
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from myst-parser.