Fixes id creator making inaccurate ids
This commit is contained in:
parent
f6fc85bf7e
commit
3417fdd3d7
@ -802,7 +802,7 @@ export const buildOnlyDefaultElements = () => {
|
||||
// on-demand resolver
|
||||
registerIdentifier(
|
||||
"on-demand resolver",
|
||||
/\?\?\[.*?\]\(.*?\)<<(.*?)>>/g,
|
||||
/\?\?\[.*?\](\(.*?\))<<(.*?)>>/g,
|
||||
(s) => {
|
||||
const inp = s.match(/(?<=<<)(.*?)(?=>>)/)![0];
|
||||
const title = s.match(/(?<=\?\?\[)(.*?)(?=\])/)![0];
|
||||
@ -931,7 +931,7 @@ function search(
|
||||
function generateId(t: string, usedIds: string[]) {
|
||||
let id = t
|
||||
.toLowerCase()
|
||||
.replace(/[^a-z\s]/gi, "")
|
||||
.replace(/[^a-z\s-\d]/gi, "")
|
||||
.trim()
|
||||
.replaceAll(" ", "-");
|
||||
let idNum = 1;
|
||||
|
@ -12,4 +12,9 @@
|
||||
3. my
|
||||
4. name
|
||||
5. is
|
||||
6. welcome
|
||||
6. welcome
|
||||
|
||||
- [-\_hello1234!@#$%^\&\*()-](#-_hello1234-)
|
||||
|
||||
|
||||
# -_hello1234!@#$%^&*()-
|
||||
|
Loading…
x
Reference in New Issue
Block a user