Query about emphasis

Waylan Limberg waylan at gmail.com
Sun Jun 21 23:14:07 EDT 2009

On Sun, Jun 21, 2009 at 4:20 AM, Simon Bull<waysoftheearth at yahoo.com.au> wrote:


> One possible solution to my issue would be something like this:


>     /some text/         -->  <font style="italic">some text</font>

>     -s-o-m-e-t-e-x-t-   -->  <font style="struckout">some text</font>

>     _some text_         -->  <font style="underline">some text</font>

>     *some text*         -->  <font style="bold">some text</font>


> I anticipate that there probably won't be much appetite for changing the

> markdown tool, so I intend to have a go at implementing the above for my own

> "local" markdown (with approximately zero knowledge of Python).

Python-Markdown [1] (not Markdown2) recently released version 2.0 in
which most of the code has been refactored. The thing about
Python-Markdown (as opposed to any other implementation AFAIK) is that
it is very easy to alter the syntax to your liking via the extension
API. You can find the docs here:


or here (but it looks like the wiki is having some spam issues):


I'd suggest replacing/adding your own "InlinePatterns" to alter the
existing emphasis and strong patterns. If you need any help, feel free
to ask.

[1]: http://pypi.python.org/pypi/Markdown

\X/ /-\ `/ |_ /-\ |\|
Waylan Limberg

More information about the Markdown-Discuss mailing list