github / markup

Determines which markup library to use to render a content file (e.g. README) on GitHub
MIT License
5.86k stars 3.39k forks source link

Document how header slugs get generated #1326

Open jedwards1211 opened 4 years ago

jedwards1211 commented 4 years ago

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.

UziTech commented 3 years ago

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

zeke commented 3 years ago

Sorry, I don't remember. 🤔

github-actions[bot] commented 21 hours ago

This issue has been automatically marked as stale because it has not had recent activity. It will be closed if no further activity occurs. Thank you for your contributions.