URLs with underscores

Angie Ahl alists at vertebrate.co.uk
Tue Jul 5 13:33:16 EDT 2005


Just to let you know I've changed my copy of markdown (syntax below) to
check for a \b (word break) before the first *|_ as it was becoming a
real problem with my stuff.

We have a lot of URL's with 2 _ in them.

It's working beautifully and will be tested with many different types
of input so I'll let you know if we find any circumstances where it
doesn't work well.

Angie

sub _DoItalicsAndBold {
my $text = shift;

# <strong> must go first:
$text =~ s{ (\*\*|__) (?=\S) (.+?[*_]*) (?<=\S) \1 }
{<strong>$2</strong>}gsx;

$text =~ s{ \b(\*|_) (?=\S) (.+?) (?<=\S) \1 }
{<em>$2</em>}gsx;

return $text;
}



On 5 Jul 2005, at 15:15, John Gruber wrote:


> Alastair Rankine <arsptr at optusnet.com.au> wrote on 07/04/05 at 7:49 pm:

>

>> 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.

>

> I have two ideas about how this could be addressed:

>

> http://six.pairlist.net/pipermail/markdown-discuss/2005-May/001253.html

>

> -J.G.

> _______________________________________________

> Markdown-Discuss mailing list

> Markdown-Discuss at six.pairlist.net

> http://six.pairlist.net/mailman/listinfo/markdown-discuss

>




More information about the Markdown-Discuss mailing list