@sararkin
I’m just a noob with javascript, but I may have found a way to improve a piece of your code.
(I don’t know how to use GitHub yet, otherwise I would make a push request or whatever it is called)
I tried putting a [[wiki-link]] in the first header, thinking the square brackets would automatically get filtered out. Instead, I was confused when only one pair of brackets was removed, and other similarly strange results.
Looking at your code, I found the culprit: the function sanitizeHeading()
(line 231 in main.ts) uses replace(string, '')
instead of replace(regExp, '')
.