Should emphasis and bold require whitespace?
Steve Hoelzer
shoelzer at gmail.com
Wed Oct 19 09:31:08 EDT 2005
Hi all,
I just wrote a post that included this line:
7*24 = 6*28 = 168
which produced this in HTML:
7<em>24 = 6</em>28 = 168
In this case I really wanted the asterisks but they were interpreted
as emphasis. I fixed it by adding spaces in the source like so:
7 * 24 = 6 * 28 = 168
Anyway, I'm wondering if it would be a reasonable rule for emphasis
(*) and bold (**) to require leading and trailing whitespace. Some
examples for bold with spaces marked by an underscore (_):
**bold**
this_**is**_bold
**not_bold_**
**_not_bold**
**_not_bold_**
this_is**not_bold**
**not_bold**again
So, starting a bold block requires (whitespace, **, non-whitespace)
and ending it requires (non-whitespace, **, whitespace). Emphasis is
the same with a single *.
Right now I can't think of any cases where this would be a problem
unless you really want to emphasize just part of a word as in
auto*magic*ally. What is the best default?
Steve
More information about the Markdown-Discuss
mailing list