Earlier today I attempted to place a comment on an answer to a question regarding retrieving a file name from a file path. Once I saved the comment, I noticed that weird parts of my comment were formatted incorrectly. Here is an example text:
What I typed: This is a test `\` comment
What I expected: This is a test
\
commentWhat I received: This is a test `` comment (it went bye-bye)
So I started my google-fu and determined that \
is a delimiting character being used by the regex engine that is parsing out the comments section link. So I then went about trying to figure out how I could get my expected output in the comments:
What I typed: This is a test `\\` comment
What I received: This is a test `\` comment (no highlighting)
What I typed: This is a test `\` comment and some other `code` here.
What I received: This is a test
' comment and some other
code` here. (pretend the single quote in the beginning is a backtick)
Feel free to go wild in the comments on this post to see what works and what doesn't. The issue is not present when posting questions or answers, only when posting a comment. Happens on the main site and on meta as far as I can tell. I'm guessing this may not be possible to fix easily, however if someone can figure out how to get \
in a comment formatted correctly, I'd like to know.
\` or ``\`
or\
[ i.e. '\\' or ''\\'' or ''\'' ]