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

Blocks nested in Admonitions are not respected #1573

Open
fwkoch opened this issue Oct 7, 2024 · 0 comments
Open

Blocks nested in Admonitions are not respected #1573

fwkoch opened this issue Oct 7, 2024 · 0 comments

Comments

@fwkoch
Copy link
Collaborator

fwkoch commented Oct 7, 2024

If you put a block break inside an admonition (or other content container), it is not respected and converted into a block. Instead, it remains a blockBreak in the final AST. This is easy to recreate, simply something like:

```{note}

This sentence is not in a block.

+++

This sentence should be in a block.
```

Currently this blockBreak -> block transformation occurs very early during processing, in myst-parse: https://github.com/jupyter-book/mystmd/blob/main/packages/myst-parser/src/tokensToMyst.ts#L574-L594

We will need to refactor that to traverse the entire tree for blockBreaks rather than just looking at top-level children. Hopefully we can still keep this in myst-parse, as much of the later processing already assumes block nodes exist.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant