Skip to content

Use anchor ids generated by markdown parser

Note: this is a breaking change announced in !144285 (merged)

What does this MR do and why?

Feature flag: native_header_anchors

We're updating the way we calculate header anchor ids. For example, previously # This - and that would generate #this-and-that. Now it will generate #this---and-that

MR acceptance checklist

Please evaluate this MR against the MR acceptance checklist. It helps you analyze changes to reduce risks in quality, performance, reliability, security, and maintainability.

How to set up and validate locally

  • Enable the feature flag :native_header_anchors

  • In an issue description, enter the following markdown: ## This - and only this

  • Preview the markdown, the hover over the link icon when mousing over the header. It should show #this---and-only-this

  • You know it's working when you see --- in the anchor

  • To test the table of contents functionality (to make sure it's not broken)

    Enter this markdown

    [toc]
    
    # Level 1
    
    Lorem ipsum dolor sit amet
    
    ## This - and only this
    
    #### Level 4

    The preview should show this

    Screenshot_2024-04-18_at_5.48.47_PM

Related to #440733 (closed)

Edited by Brett Walker

Merge request reports