evylang / todo

0 stars 0 forks source link

Add copy-able anchors to rendered docs headings #61

Closed juliaogris closed 4 months ago

juliaogris commented 4 months ago

Follow GitHubs un-documented rules for header anchor generation so that we can transfer anchor hrefs from GitHub to docs.evy.dev.

Rules:

  1. All text is converted to lowercase
  2. All non-word text (e.g., punctuation, HTML) is converted to hyphens
  3. All spaces are converted to hyphens
  4. Two or more hyphens in a row are converted to one
  5. If a header with the same ID has already been generated, a unique incrementing number is appended, starting at 1.

See: https://stackoverflow.com/questions/43273842/what-are-the-rules-of-converting-one-markdown-title-into-an-html-anchor/44443100#44443100

juliaogris commented 4 months ago

I just can't remember to add the right Fixes #ISSUE_ID to the PRs :( Anyway, this got done in

https://github.com/evylang/evy/pull/272