Skip to content

fix: Preserve ToC labels for stashed headings#98

Closed
gaoflow wants to merge 1 commit into
pawamoy:mainfrom
gaoflow:fix-97-stashed-heading-toc-labels
Closed

fix: Preserve ToC labels for stashed headings#98
gaoflow wants to merge 1 commit into
pawamoy:mainfrom
gaoflow:fix-97-stashed-heading-toc-labels

Conversation

@gaoflow

@gaoflow gaoflow commented Jun 19, 2026

Copy link
Copy Markdown

Summary:

  • Preserve ToC labels for duplicated headings whose visible text contains stashed inline HTML.
  • Avoid treating heading placeholders as markdown-exec output placeholders.
  • Add a regression test covering a markdown-exec source="material-block" block on the same page as mkdocstrings headings with inline code.

Tests:

  • uv run pytest -q
  • uv run ruff check src/markdown_exec/_internal/processors.py tests/test_headings.py
  • uv run ruff format --check src/markdown_exec/_internal/processors.py tests/test_headings.py
  • uv run python -m compileall -q src/markdown_exec/_internal/processors.py tests/test_headings.py
  • git diff --check

Issue #97: #97

@gaoflow gaoflow force-pushed the fix-97-stashed-heading-toc-labels branch from 29dc9cd to 2e5dbf3 Compare June 19, 2026 01:34
@pawamoy

pawamoy commented Jun 19, 2026

Copy link
Copy Markdown
Owner

Thanks for the PR @gaoflow, however you didn't respect our PR template, so I'm gonna close. Parsing HTML is a no-go anyway.

@pawamoy pawamoy closed this Jun 19, 2026
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