## Auto identifiers (extension) The `auto_identifiers` extension causes identifiers to be added to headings that lack them. Identifiers derive their names from the heading text. The following recipe is used (this derives from the practice on GitHub and is slightly different from legacy pandoc auto identifiers): - Render the textual content of the heading, without any formatting (tags) - Strip leading and trailing space - Convert to lowercase - Convert spaces into hyphens - Remove all punctuation except `-`, `_`, and punctuation in the categories NonSpacingMark, SpacingCombiningMark, EnclosingMark, and ConnectorPunctuation. - Replace emojis with their textual aliases ```````````````````````````````` example # Heading with_two_spaces! .

Heading with_two_spaces!

```````````````````````````````` ```````````````````````````````` example Heading with_two_spaces! ------------------------- .

Heading with_two_spaces!

```````````````````````````````` Auto identifiers are not assigned to headings that have explicit identifiers: ```````````````````````````````` example # Heading {#foo} .

Heading

```````````````````````````````` ```````````````````````````````` example {#foo} # Heading .

Heading

```````````````````````````````` Auto identifiers are not assigned to non-headings: ```````````````````````````````` example Hi .

Hi

```````````````````````````````` Numerical suffixes will be added to avoid duplicate identifiers: ```````````````````````````````` example # Hi # Hi # Hi .

Hi

Hi

Hi

```````````````````````````````` Deduplication should work also when auto identifiers are mixed with explicit identifiers: ```````````````````````````````` example # Hi # Hi {#hi} # Hi Hi == .

Hi

Hi

Hi

Hi

````````````````````````````````