← Back to context

Comment by vortico

6 years ago

About the header slugs: I don't think the content of the header should be the anchor ID. Readers will link to it, the author will fix a spelling issue or whatever, and the link will break and other readers will arrive at the top of the page when the browser doesn't find the old ID.

My solution that works with most Markdown variants is to use inline HTML to define an anchor directly before (or after) the header.

  <a id="stuff"></a>
  ### Things about stuff

But of course this isn't much cleaner than just using inline HTML for the header itself.

  <h3 id="stuff">Things about stuff</h3>

as an author i'd say its rare to change headers, while its easy for the user to guess the right link if the id is broken.

careful not to penalize the 99% usecase for a slightly better 1% usecase.