Skip to content

Conversation

@gmilde
Copy link
Contributor

@gmilde gmilde commented Aug 28, 2025

"section" elements can only be children of "document" or "section" elements, not "sidebar".
Cf. https://docutils.sourceforge.io/docs/ref/doctree.html#section

Purpose

Prevent users of the function from producing invalid documents by giving accurate information.

References

"section" elements can only be children of "document" or "section"
elements, not "sidebar".
Cf. https://docutils.sourceforge.io/docs/ref/doctree.html#section
@gmilde
Copy link
Contributor Author

gmilde commented Aug 28, 2025

This is a re-make of my last attempt, fixing a typo in the comment description.

Add warning about possible data loss with `keep_title_context=True` to
`sphinx.utils.parsing.nested_parse_to_nodes()`.
Cf. Sphinx issue sphinx-doc#13845.
Since Docutils 0.22, using `sphinx.utils.parsing.nested_parse_to_nodes()`
with `keep_title_context=True` no longer leads to data loss. Since Docutils 0.22.1,
an error message is reported.
@gmilde gmilde closed this Sep 9, 2025
@gmilde
Copy link
Contributor Author

gmilde commented Sep 9, 2025

Closing because the first commit changes two latin1-encoded files.

I always get

Fehler: Fehler beim Codieren von 'tests/roots/test-root/wrongenc.inc' von UTF-8 nach latin-1
Fehler: Fehler beim Codieren von 'tests/roots/test-warnings/wrongenc.inc' von UTF-8 nach latin-1

and then these files are marked as changed in the working dir.

@github-actions github-actions bot locked as resolved and limited conversation to collaborators Oct 8, 2025
@gmilde gmilde deleted the fix-comment branch October 19, 2025 16:10
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

misleading docstring for sphinx.util.parsing.nested_parse_to_nodes()

1 participant