Label parsing should handle embedded escaped chars
In order to allow a user to short-circuit our reference shortcuts (such as #
or !
), the user should be able to escape them, like \#
. The parser does surround escaped chars with <span data-escaped-char></span>
which will short-circuit our references. However it does that for all escaped chars.
So while a label specified as ~c_bug\_
is valid, our label parsing
does not understand ~c_bug<span data-escaped-char>_</span>
. The Banzai::Filter::EscapedCharFitler
filter fixes this by
stripping out any <span data-escaped-char>
that is not one of our references. However this removes important information that the rich text editor needs
in order to handle round-trip markdown.
We need to, somehow, fix our label processing to tolerate embedded
<span data-escaped-char></span>
. Then the filter could be completely removed.
This would most likely need to be fixed in all our reference parsing, not just labels.