Skip to content

Conversation

Copy link
Contributor

Copilot AI commented Jan 28, 2026

Two docutils build errors occurred from constructs that cannot be nested inside body elements:

  • Transition (---) in cross-referencing.md:418 inside a myst-example directive
  • contents directive in organising_content.md:31 inside a myst-example directive

The myst-example directive renders content inside divs, but docutils transitions must be direct children of documents/sections, and the contents directive cannot be used within topics or body elements.

Changes:

  • cross-referencing.md: Removed --- separator between reference syntax examples (blank line suffices)
  • organising_content.md: Replaced myst-example with plain code fence to show contents directive syntax without rendering it
- :::{myst-example}
+ ````md
  ```{contents} Table of Contents
  :depth: 3
  • :::

> [!WARNING]
>
> <details>
> <summary>Firewall rules blocked me from connecting to one or more addresses (expand for details)</summary>
>
> #### I tried to connect to the following addresses, but was blocked by firewall rules:
>
> - `api.crossref.org`
>   - Triggering command: `/home/REDACTED/work/MyST-Parser/MyST-Parser/.tox/docs-clean/bin/sphinx-build /home/REDACTED/work/MyST-Parser/MyST-Parser/.tox/docs-clean/bin/sphinx-build -nW --keep-going -b html docs/ docs/_build/html -P` (dns block)
> - `docs.python.org`
>   - Triggering command: `/home/REDACTED/work/MyST-Parser/MyST-Parser/.tox/docs-clean/bin/sphinx-build /home/REDACTED/work/MyST-Parser/MyST-Parser/.tox/docs-clean/bin/sphinx-build -nW --keep-going -b html docs/ docs/_build/html -P` (dns block)
> - `markdown-it-py.readthedocs.io`
>   - Triggering command: `/home/REDACTED/work/MyST-Parser/MyST-Parser/.tox/docs-clean/bin/sphinx-build /home/REDACTED/work/MyST-Parser/MyST-Parser/.tox/docs-clean/bin/sphinx-build -nW --keep-going -b html docs/ docs/_build/html -P` (dns block)
> - `readthedocs.org`
>   - Triggering command: `/home/REDACTED/work/MyST-Parser/MyST-Parser/.tox/docs-clean/bin/sphinx-build /home/REDACTED/work/MyST-Parser/MyST-Parser/.tox/docs-clean/bin/sphinx-build -nW --keep-going -b html docs/ docs/_build/html -P` (dns block)
> - `www.sphinx-doc.org`
>   - Triggering command: `/home/REDACTED/work/MyST-Parser/MyST-Parser/.tox/docs-clean/bin/sphinx-build /home/REDACTED/work/MyST-Parser/MyST-Parser/.tox/docs-clean/bin/sphinx-build -nW --keep-going -b html docs/ docs/_build/html -P` (dns block)
>
> If you need me to access, download, or install something from one of these locations, you can either:
>
> - Configure [Actions setup steps](https://gh.io/copilot/actions-setup-steps) to set up my environment, which run before the firewall is enabled
> - Add the appropriate URLs or hosts to the custom allowlist in this repository's [Copilot coding agent settings](https://github.com/executablebooks/MyST-Parser/settings/copilot/coding_agent) (admins only)
>
> </details>

<!-- START COPILOT CODING AGENT SUFFIX -->



<!-- START COPILOT ORIGINAL PROMPT -->



<details>

<summary>Original prompt</summary>

> Fix these new issue in the docs build:
> 
> ```
> 2026-01-26T13:16:19.4573013Z �[91m/home/runner/work/MyST-Parser/MyST-Parser/docs/syntax/cross-referencing.md:418: WARNING: Transition must be child of <document> or <section>. [docutils]�[39;49;00m
> 2026-01-26T13:16:19.4575503Z �[31m/home/runner/work/MyST-Parser/MyST-Parser/docs/syntax/organising_content.md:31: ERROR: The "contents" directive may not be used within topics or body elements. [docutils]�[39;49;00m
> 202
> ```


</details>



<!-- START COPILOT CODING AGENT TIPS -->
---

💡 You can make Copilot smarter by setting up custom instructions, customizing its development environment and configuring Model Context Protocol (MCP) servers. Learn more [Copilot coding agent tips](https://gh.io/copilot-coding-agent-tips) in the docs.

…ntent

Co-authored-by: chrisjsewell <2997570+chrisjsewell@users.noreply.github.com>
Copilot AI changed the title [WIP] Fix issues in documentation build Fix docutils errors from directives nested in myst-example blocks Jan 28, 2026
Copilot AI requested a review from chrisjsewell January 28, 2026 02:16
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

Successfully merging this pull request may close these issues.

2 participants