markup icon indicating copy to clipboard operation
markup copied to clipboard

Document how header slugs get generated

Open jedwards1211 opened this issue 5 years ago • 2 comments

I have headers in my repo https://github.com/vscodeshift/material-ui-snippets like

### `mui-app-bar-menu`: <AppBar> with menu icon

The slug GitHub generates for this is

#mui-app-bar-menu-appbar-with-menu-icon

But many libs like github-slugger and markdown-toc don't currently strip away HTML entities, instead generating

#mui-app-bar-menu-ltappbargt-with-menu-icon

I PRed a fix to both these libs, but this points to the need for a concrete specification of what GitHub is doing, so that we can guarantee correct output in tools like these.

jedwards1211 avatar Feb 07 '20 06:02 jedwards1211

@zeke wondering if you ever got an answer for https://github.com/Flet/github-slugger/pull/25#issuecomment-511569679

UziTech avatar Mar 31 '21 05:03 UziTech

Sorry, I don't remember. 🤔

zeke avatar Apr 01 '21 00:04 zeke