URLs with underscores

Alastair Rankine arsptr at optusnet.com.au
Mon Jul 4 05:49:37 EDT 2005


Alastair Rankine wrote:


> http://foo_bar_baz.com becomes <p>http://foo<em>bar</em>baz.com</p>

>

> ... which seems somewhat counterintuitive.



Thanks for the replies. I am aware of the workarounds for this
behaviour. However, let me just explain a bit more about how this came
about.

I use the Markdown plugin on my Wordpress blog and it is applied to
comments as well as to posts by me. So this particular problem was found
by a commenter, someone obviously not familiar with the Markdown syntax.

Now it seems there are several valid responses here:

1. Get the Wordpress Markdown plugin applied to posts and not comments.
I'm not sure if this is easy or not.

2. Inform the users about the markdown syntax so that they know how to
use it (specifically the workarounds for posting raw URLs), and live
with the cases where they don't read the doco. Given that this behaviour
only occurs when you have two or more underscores in the URL, it seem
likely to be a special case that can be easily overlooked.

3. Change the behaviour of Markdown.

Obviously this isn't the right forum for 1 and 2, but I wanted to get
feedback on 3.

The reason I favour option 3 is that it seems consistent with the stated
goal of making a "Markdown-formatted document should be publishable
as-is, as plain text, without looking like it’s been marked up with tags
or formatting instructions" (see website).

The way I read this is that it minimises the number of unexpected
transformations on the source text. If it were to achieve this goal (and
IMHO, apart from the above issue, it mostly does), it would seem
appropriate for deploying as the default format for comments to a blog.

Hope this explains my concerns better.


More information about the Markdown-Discuss mailing list