Skip to content

feat!: Fix heading ID discrepancy between sidebar and article#19

Merged
valeriansaliou merged 1 commit intocrisp-oss:masterfrom
RemiBardon:fix-underscore-in-headings
Feb 2, 2026
Merged

feat!: Fix heading ID discrepancy between sidebar and article#19
valeriansaliou merged 1 commit intocrisp-oss:masterfrom
RemiBardon:fix-underscore-in-headings

Conversation

@RemiBardon
Copy link
Contributor

This fixes incorrect IDs in the sidebar when a heading contains an underscore (_).

For example, “## branding.api_app_name” gets rendered as

<h2 id="brandingapiappname"><a class="title-anchor" href="#brandingapiappname">branding.api_app_name</a></h2>

in the page, but was rendered as

<a href="#brandingapi_app_name" data-anchor="#brandingapi_app_name" class="nest-navigate-link" data-cshid="98e0cf7f-7cea-a908-2452-f43b1fa1729c"><span class="nest-navigate-link-text">branding.api_app_name</span></a>

in the sidebar.

This meant the sidebar was broken, because it pointed to an inexistent ID.

This fixes incorrect IDs in the sidebar when a heading contains an
underscore (`_`).

For example, “## branding.api_app_name” gets rendered as

```html
<h2 id="brandingapiappname"><a class="title-anchor" href="#brandingapiappname">branding.api_app_name</a></h2>
```

in the page, but was rendered as

```html
<a href="#brandingapi_app_name" data-anchor="#brandingapi_app_name" class="nest-navigate-link" data-cshid="98e0cf7f-7cea-a908-2452-f43b1fa1729c"><span class="nest-navigate-link-text">branding.api_app_name</span></a>
```

in the sidebar.

This meant the sidebar was broken, because it pointed to an inexistent ID.
@valeriansaliou valeriansaliou merged commit 15e7044 into crisp-oss:master Feb 2, 2026
3 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Development

Successfully merging this pull request may close these issues.

2 participants