markdown2.py

I’ve started a python-markdown2 project: this is another Python implementation of Markdown:

Markdown is a text-to-HTML conversion tool for web writers. Markdown allows you to write using an easy-to-read, easy-to-write plain text format, then convert it to structurally valid XHTML (or HTML).

No release package yet (setup.py, setuptools, easyinstall, ezsetup? — my head is spinning), but you can get the file directly from SVN: markdown2.py.

This is the first project for which I am really using Google Code project hosting. I’m really digging it. Nice bug tracker, nice enough wiki (all wikis should use a source control system as their backend), svn. Goodbye sourceforge.

6 Responses to “markdown2.py”

  1. ash said:

    It’s interesting how markdown broke underscores in your post.

    I know python-markdown2 includes code-extra. I think the better solution is to mimic python-mardown1: it just ignores middle-word emphasis (there’s also some discussion)

  2. ash said:

    I meant code-friendly, sorry: http://code.google.com/p/python-markdown2/wiki/CodeFriendly

  3. trentm said:

    Ash,

    Yes, perhaps ignoring middle-word emphasis (for underscores at least) should be done. However, I’d like to see John Gruber’s comments on that. I think it is important (for Markdown in general) that different Markdown implementations implement the same spec, so I want markdown2.py to produce the same output as Markdown.pl by default.

    Personally I think that the use of underscores for emphasis (both internal to words and not) should be dropped from the Markdown “spec”, because they are an unnecessary duplication of using asterisk for the same thing. Definitely I support dropping internal-word emphasis (for the same reasons as in your discussion link).

    Note that for Python code (which I, of course, commonly work with), variables like __init__, __repr__, __str__, etc. are very common, so just dropping internal-word emphasis still results in the same issue as bug_by_oversight.

  4. ash said:

    John Gruber doesn’t seem to update Markdown.pl very often.
    Maybe this issue (middle-word emphasis) should be raised on the mailing list again.

    I am not so sure that underscores for emphasis should be dropped altogether.
    I don’t use them myself, but I’ve seen people using underscores for this purpose
    in ordinary email. And:

    > …the single biggest source of inspiration for Markdown’s syntax
    > is the format of plain text email.

  5. Massimo said:

    Hi Trent,

    I just wanted to let you know that I have included markdown2 into the
    latest release of web2py under gluon/contrib/. web2py is distributed
    in source and binary forms under GPL2 with a commercial exception.

    I understand the license of markdown2 allows me to include it but I
    wanted to make sure that you are fine with it.

    You are acknowledged in the thanks page:

     http://mdp.cti.depaul.edu/examples/default/thanks
    

    You can also find an example of usage of markdown2 within web2py here

     http://mdp.cti.depaul.edu/examples/default/examples (#14)
    

    Massimo

  6. trentm said:

    @Massimo: Yup, I’m cool with it. :) Thanks for the note.

Leave a Reply