Closed jenningsb2 closed 2 years ago
@jenningsb2 Thanks for this! I took a peak at the obsidian source and saw that Licat uses this regex and function to sanitize headers. Maybe to be safe we should use this regex? What do you think?
var pg = /[!"#$%&()*+,.:;<=>?@^`{|}~\/\[\]\\]/g;
function pA(t) {
return pg.lastIndex = 0,
t.replace(pg, " ").replace(/\s+/g, " ").trim()
}
That's a great idea! I should have thought to look for that!
Fixes #13