asterisks as bold or italic?
gruber at fedora.net
Mon Mar 15 21:11:34 EST 2004
Merlin Mann <markdown at undisclosedlocation.com> wrote on 03/15/04 at 8:10p:
> > Markdown treats asterisks (*) and underscores (_) as indicators of
> > emphasis. Text wrapped with one * or _ will be wrapped with an HTML
> > <em> tag; double *ís or _ís will be wrapped with an HTML <strong>
> > tag.
> It's probably late in the game for a syntax suggestion, but I'm having a
> hard time getting used to "*foo*" making text <em> instead of <strong>.
It is late in the game for a change like this, but, trust me, even
if would have had the opportunity to make this case months ago, you
wouldn't have succeeded.
It's not that I think you're *wrong*, per se. But the very first
feature in Markdown -- before it could even wrap `<p>` tags around
paragraphs, even -- was a regex pattern that turned:
In short, you're sort of screwed, because that's how I write, and
it's how I've written since around 1992.
> I wonder if my experience is unique, but I've always seen and used
> asterisks to make something bold while wrapping with the space/underscore
> would style text as italic. This goes for wikis I've used as well as text
> mail from my provider (http://www.fastmail.fm) (among others, I'm pretty
It wasn't just based on my personal whim. If you look around, you
can find support for both ways of interpretting single asterisks (em
vs. strong). Textile agree with you, for example.
reStructuredText, however, agrees with me:
The actual spec for Setext says that **double** asterisks are
equivalent to strong emphasis, but uses ~tildas~ for italics. (But
neither of the two Setext-formatted newsletters I read, TidBITS and
MDJ, use tildas for emphasis.)
I also searched through an awful lot of my email, and what I found
is that both _underscores_ and *asterisks* are in wide use, but both
styles tend to be used to imply normal word emphasis. E.g., if you
stop thinking about "italics" and "bold", and think instead of
"emphasis" and "strong emphasis", I think it's very fair to say that
_this_ and *this* both imply normal emphasis.
> It would certainly be faster and less-error-prone to type a single
> character in each case, plus it might open up the double characters for
> use as "\-like" escape characters in the future.
I can see the case for `**` and `__` being somewhat reasonable
escape sequences to generate single-literal characters, but I'm not
the least bit persuaded by the idea that it's faster to type *this*
instead of **this**.
> If it's just my own peculiar habit, I can certainly un-learn it, but I'm
> curious if anyone else had this experience when using Markdown.
I'll emphasize that I don't think there's anything peculiar about
your habit; and I'm sure others share it. And I sympathize with the
fact that my decision has broken your habit. But I'm also sure that
there are others whose habits match mine.
Now, of course, the other route would be to make these emphasis
sequences configurable. Or, at least, to offer a few preset
variations on how to interpret them.
The advantage would be that most people could get Markdown to treat
word emphasis exactly how they prefer. That'd be good.
The downside would be that Markdown's format would no longer be the
same everywhere. If there's just once consistent style, Markdown
should work exactly the same everywhere.
It's also the case that this would add an entire layer of complexity
to the software.
Sorry to disappoint,
More information about the Markdown-discuss