Interesting Issue

Michel Fortin michel.fortin at michelf.com
Fri Dec 10 10:14:09 EST 2004


Le 9 déc. 2004, à 1:01, John Gruber a écrit :

> Some people have suggested that Markdown should only allow emphasis
> to start and end at the beginning of "words", so that you can use
> underscores mid-word without triggering <em> tags.

I just wanted to point out that such a solution wouldn't solve 
everything either.

	The __GNU__ preprocessor symbol is defined by GCC.

Here `__GNU__` is the symbol and there should be no emphasis, but how 
can you tell? I think every bit of code should be clearly identified as 
such, so this and the `PTHREAD_SCOPE_SYSTEM` first issue are non-issues 
as far as I'm concerned.

On a related note, the problem shows when you have a file named as such:

	Please download make_me_laugt.html from another location.

Believe it or not, there is *two* distinct ways of dealing with this. 
You can escape the underscores.

	Please download make\_me\_laugh.html from another location.

But if the block of text you are dealing with contains many cases like 
this, you may prefer to write a paragraph tag directly:

	<p>
	Please download make_me_laugt.html from another location.
	</p>

Isn't this more readable than escaping things? Markdown will not be 
parsed inside the paragraph and so the precious underscores are safe. 
Of course it also has the side effect of disallowing Markdown 
everywhere else in the paragraph.

There are two contradictory issues to keep in mind here:

1.	Will it work in most of the cases?
2.	When it does not work, is it easy to find out why and fix it?

I think the current rules have a fine balance between the two... at 
least for me. But it's true that number one is dependent of your own 
usage of Markdown.


Michel Fortin
michel.fortin at michelf.com
http://www.michelf.com/


More information about the Markdown-discuss mailing list