Solved Bug in code display
-
Hi everyone, I think there is a bug in how code is rendered in the main forum when using escape chars.
This is what I typed:
The preview renders correctly
But the slashes before the square brackets disappear in the final rendering
single line:
QRegularExpression("[(.+)]");
block quote
QRegularExpression("[(.+)]");
Can you confirm the bug?
My setup: Win7, Firefox 64.0
-
Confirmed. Escaping is rather iffy to say the least. Use C-slashes to escape the backslash if needed as a workaround.
E.g:
`\\[Text\\]` produces\[Text\]
-
ping @ollipuu as I think this was introduced by the recent update.
-
Hmm... I think this is how it's been since beginning as we haven't made any changes to Markdown parsing. NodeBB uses package nodebb-plugin-markdown which uses very popular package markdown-it, which renders the provided example similarly: QRegularExpression example
So for now the workaround is to escape the backslashes, like @kshegunov suggested.