MyST-Parser: Mistletoe bugs and questions

I’m just playing around with mistletoe, and since your fork doesn’t allow issues (forks generally don’t) I’ll put code-specific comments here.

First thing I found: sometimes you want to have colons in arguments. For example in the default sphinx toctree directive it has :caption: Contents:. Doing this with myst results in this error:

yaml.scanner.ScannerError: mapping values are not allowed here

About this issue

  • Original URL
  • State: closed
  • Created 4 years ago
  • Comments: 18 (18 by maintainers)

Most upvoted comments

From the commonmark discussions, it looks like comment blocks would be best to start with %?

% This is a comment

First thing I found: sometimes you want to have colons in arguments. For example in the default sphinx toctree directive it has :caption: Contents:.

Ermm yeh it just has to be correct YAML lol, as in caption: "Contents:"

seems that directive nesting is a bit finnicky

You control it by the number of backslashes, each block has to have a different number, with the most on the outside, i.e.

`````{outer}
The next info should be nested
````{inner}
Here's my warning
```{more inner}
```
````
`````

But obviously the option to indent would be ideal.

However, I don’t believe anything like .. _myref: syntax exists in markdown, right?

No it doesn’t, I’ve put a few ‘todos’ for syntax extensions, primarily targets (i.e. labels), comments (as you say, preferably not just the HTML type ones), and field lists (e.g. so you can use the sphinx :orphan: option).