mirror of
https://github.com/Ellpeck/ObsidianJustSharePlease.git
synced 2024-11-23 02:48:34 +01:00
improve slugify function
This commit is contained in:
parent
b680280ee3
commit
fb6094a1b8
1 changed files with 2 additions and 1 deletions
|
@ -48,7 +48,8 @@
|
|||
ariaHidden: true
|
||||
}),
|
||||
// prepend current file id to the anchor permalink
|
||||
slugify: s => `${getId() ?? ""}-${encodeURIComponent(String(s).trim().toLowerCase().replace(/\s+/g, "-").replace(/[^A-Za-z0-9_-]/g, ""))}`
|
||||
slugify: s => `${getId() ?? ""}-${encodeURIComponent(String(s).trim().toLowerCase().normalize("NFKD").replace(/\p{M}/g, "").replace(/\s+/g, "-").replace(/[^a-z0-9_-]/g, "")
|
||||
)}`
|
||||
});
|
||||
md.use(markdownitFootnote);
|
||||
|
||||
|
|
Loading…
Reference in a new issue