Skip to content

Conversation

@ccjmne
Copy link
Contributor

@ccjmne ccjmne commented Nov 17, 2025

Provide original markdown title in TOC.

This commit introduces the "title_raw" property to the Heading struct,
so that the user may get adequately formatted entries in their table of
contents when the original title contains, for example, code highlight
content.

For example:

### The `<summary>` in the `<details>`

Would offer, in heading.title:

The <summary> in the <details>

And in the newly introduced heading.title_raw:

The <code>&lt;summary&gt;</code> in the <code>&lt;details&gt;</code>

Resolves #3023.


Sanity check:

  • Not already addressed by another ongoing PR
  • PR made against next?
  • Documentation updated?

This commit introduces the "title_raw" property to the Heading struct,
so that the user may get adequately formatted entries in their table of
contents when the original title contains, for example, code highlight
content.

For example:

    ### The `<summary>` in the `<details>`

Would offer, in heading.title:

    The <summary> in the <details>

And in the newly introduced heading.title_raw:

    The <code>&lt;summary&gt;</code> in the <code>&lt;details&gt;</code>

Ref: getzola#3023
@ccjmne ccjmne force-pushed the provide-original-markdown-in-toc branch from e887be2 to 9aa2e77 Compare November 17, 2025 22:34
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.

1 participant