obsidian-latex-suite
obsidian-latex-suite copied to clipboard
[FEATURE] Uncaptured group replaced with empty string in Regex
Under normal circumstances, this snippet should replace both 1234-56-78
and 56/78/1234
with 78561234
.
{
trigger: "(\\d{4})-(\\d{2})-(\\d{2})|(\\d{2})/(\\d{2})/(\\d{4})",
replacement: "[[2]][[1]][[0]][[4]][[3]][[5]]", options: "rtA"
}
But in fact it outputs 78561234undefinedundefinedundefined
and undefinedundefinedundefined78561234
I think having an uncaptured group return an empty string instead of undefined solves this