I'm looking for a regex to find HTML comments if the comment is not within a code block (represented by three backticks ```).
So far, I can prevent finding HTML comments if the backticks are in the same line, but I can't find a way to avoid it if there are on the line before.
My regex now: ^((```){0})\s*<!--[\s\S]*?(?:-->)
Some of my tests, the first three should work, not the last three (I can't write them because of the formatting with the backticks)