mirror of
https://github.com/GenderDysphoria/GenderDysphoria.fyi.git
synced 2025-01-31 07:16:17 +00:00
Fix the broken header links
This commit is contained in:
parent
69c003d008
commit
d542e8b23d
@ -31,10 +31,11 @@ const markdownEngines = {
|
||||
},
|
||||
})
|
||||
.use(mAnchor, {
|
||||
permalink: mAnchor.permalink.ariaHidden({
|
||||
permalink: mAnchor.permalink.linkInsideHeader({
|
||||
class: 'header-link',
|
||||
symbol: '<img src="/images/svg/paragraph.svg">',
|
||||
renderHref: slugify,
|
||||
renderHref: (input) => '#' + slugify(decodeURIComponent(input)),
|
||||
ariaHidden: true,
|
||||
}),
|
||||
})
|
||||
.use(require('./lib/markdown-raw-html'), { debug: false }),
|
||||
|
@ -1,5 +1,6 @@
|
||||
const slugs = require('slugify');
|
||||
|
||||
module.exports = exports = function slugify (s) {
|
||||
return slugs(s, { remove: /[*+~.,()'"!?:@/\\]/g }).toLowerCase();
|
||||
const result = slugs(s, { remove: /[*+~.,()'"!?:@/\\]/g }).toLowerCase();
|
||||
return result;
|
||||
};
|
||||
|
Loading…
x
Reference in New Issue
Block a user