I would like to reopen this discussion as this behavior is annoying.
Often in chat (like Discord) or forums I end up posting something like:
The formula for getting the perimeter of a circle is 2piradius.
Or (this also occurs with double asterisks that represent the “power” operator in languages like Python) :
A googleplex is 1010100.
Or even:
The player score calculation is now killspower - deaths. It was changed from 1.3, where it was killsassists - deaths.
As you can see, the asterisks break the meaning of the message, with a part of the sentence being italicized. If the reader isn’t familiar with markdown quirks, then he will very likely won’t get what is “killspower”, and why I seemingly randomly put a part of the message in italics. I then have to go back and make sure to backslash every instance of “*”, which is annoying with long posts.
The solution is to require a word boundary on the left of the left asterisk, and on the right of the right asterisk.
For the CJK problem that has been mentioned earlier in this thread, it indeed wouldn’t italicize the “由” character in 是*由*日
. I do not speak Chinese, but it seems from http://hua.umf.maine.edu/Chinese/topics/math/douying.html that Chinese do not use the “*” character for multiplication, and as such do not have the confusion that English and other latin languages have.
The solution would then be to require that the left asterisk does not have a latin character to its left, and the right asterisk does not have a latin character to its right.
This makes it so:
A*B*C
is displayed as A*B*C是*由*日
is displayed as 是由日
As I understand it, Markdown is just a way to properly render the pseudo-syntax that was used in emails. But in emails, if a human sees A*B*C
, he would parse it as a multiplication and not italics. Markdown parsers should therefore not parse that as italics, in order to be more intuitive.
Thanks