mirror of
https://github.com/Ellpeck/ObsidianJustSharePlease.git
synced 2024-11-23 02:48:34 +01:00
better slugify
This commit is contained in:
parent
8437518451
commit
7337feeab6
1 changed files with 1 additions and 1 deletions
|
@ -47,7 +47,7 @@
|
||||||
ariaHidden: true
|
ariaHidden: true
|
||||||
}),
|
}),
|
||||||
// prepend current file id to the anchor permalink (see getId)
|
// prepend current file id to the anchor permalink (see getId)
|
||||||
slugify: s => `${getId() ?? ""}-${encodeURIComponent(String(s).trim().toLowerCase().replace(/\s+/g, "-"))}`
|
slugify: s => `${getId() ?? ""}-${encodeURIComponent(String(s).trim().toLowerCase().replace(/\s+/g, "-").replace(/[^A-Za-z0-9_-]/g, ""))}`
|
||||||
});
|
});
|
||||||
|
|
||||||
let main = $("#main");
|
let main = $("#main");
|
||||||
|
|
Loading…
Reference in a new issue