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

nested_parse is broken for block content #967

Open
flying-sheep opened this issue Aug 26, 2024 · 1 comment
Open

nested_parse is broken for block content #967

flying-sheep opened this issue Aug 26, 2024 · 1 comment

Comments

@flying-sheep
Copy link
Contributor

flying-sheep commented Aug 26, 2024

This doesn’t work:

temp_root_node=node if match_titles else None,

nested_render_text doesn’t seem to be able to handle block content, so if you run the following directive on a document that contains sections, several bugs happen:

  1. it appends nodes while running
  2. it doesn’t return all the nodes in the included fragment
  3. it therefore messes up the order in which things are displayed.
  4. it doesn’t respect the section hierarchy.

Reproducer

(Of course I don’t just want to re-implement the include directive, my actual code includes all files in a directory)

Output:

Warning

index.md.rst:4: WARNING: Non-consecutive header level increase; H1 to H3 [myst.header]

Index

Included

Hi!

inc.md

Expected:

(no warning)

Index

inc.md

Included

Hi!

@flying-sheep
Copy link
Contributor Author

flying-sheep commented Sep 6, 2024

@cclauss I think you replied to the wrong thread. My comment markdown is perfectly formatted and no backtick is out of place.

Is this similar to: #401

not even slightly. Can you please stop spamming this thread with irrelevant stuff?

From how completely unrelated everything you wrote is to the issue at hand, you’re either a bot or extremely sleep deprived.

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