Skip to content

Instantly share code, notes, and snippets.

@yamgent
Last active January 15, 2019 02:51
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save yamgent/fb5de6afbcadaa6b5ab30a4d1c0f698b to your computer and use it in GitHub Desktop.
Save yamgent/fb5de6afbcadaa6b5ab30a4d1c0f698b to your computer and use it in GitHub Desktop.
GitHub Flavoured Markdown Heading Anchors

GFMD removes special characters (such as the brackets) when generating anchors

Other characters include non alphanumeric characters like colon, semi-colon, etc.

How does GFMD resolves conflicting anchors?

Notice that the anchors for the three headings below all resolve to foo-bar (but subsequent ones will be appended with a unique number).

Foo: Bar

Foo (Bar)

Foo Bar

Does GitHub dasherize?

unicode ♥ is ☢

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment