Displaying 1 to 3 from 3 results

github-slugger - :octocat: Generate a slug just like GitHub does for markdown headings.

  •    Javascript

Generate a slug just like GitHub does for markdown headings. It also ensures slugs are unique in the same way GitHub does it. The overall goal of this package is to emulate the way GitHub handles generating markdown heading anchors as close as possible. Check test/index.js for more examples.

markdown-it-github-headings - :octocat: Add anchors and links to headings just like Github does

  •    Javascript

The defaults will make the heading anchors behave as close to how GitHub behaves as possible. When using user generated content, its possible to run into DOM Clobbering when heading IDs are generated. Since IDs are used by JavaScript and CSS, a user could craft a page that breaks functionality or styles. A good way to avoid clobbering is to add a prefix to every generated ID to ensure they cannot overlap with existing IDs.