|
From: Waylan L. <wa...@gm...> - 2009-03-24 18:10:08
|
On Tue, Mar 24, 2009 at 12:50 AM, Ron Garret <ro...@fl...> wrote:
>
> On Mar 23, 2009, at 6:05 PM, Waylan Limberg wrote:
>
>>
>>> Wikipedia allows wikilinks that start with an underscore;
>>> markdown.py doesn't.
>>
>> Yes it does. Any allowed character it allowed at any location in the
>> link.
>>
>
> Ah. There is a bug there, but it's not what I thought:
>
> >>> markdown.markdown('[[foo _baz_]]',['wikilinks'])
> u'<p>[[foo <em>baz</em>]]</p>'
>
> Apparently it doesn't like _emphasis_ inside a wikilink.
>
So, before I fixed this, I addressed the multiple spaces issue.
Multiple spaces become one underscore in the url. That was easy. But,
moving on to this; I am of the assumption that emphasis doesn't belong
in a wikilink. If you want emphasis, then either wrap the entire link
(``_[[foo]]_``) or use regular markdown link syntax. So, then Ron's
above example becomes:
<p><a class="wikilink" href="/foo__baz_/">foo _baz_</a></p>
If a space is adjacent to an underscore, then we get double
underscores in the url. Should I try to work around this or not?
Thoughts?
I should point out that if I do work around it, then it would be
impossible to generate a url with double underscores. For example
``[[foo__bar]]`` becomes ``/foo_bar/``. I'm not as comfortable with
that as I am with combining spaces.
--
----
\X/ /-\ `/ |_ /-\ |\|
Waylan Limberg
|