problems switching from 1.0b4 to 1.0 - summary

Ian Gregory ianji at zenatode.org.uk
Sat Aug 28 20:27:01 EDT 2004


I just joined this list to report on my experience switching from
Markdown 1.0b4 (which I had been using since March) to the current
version. When I upgraded I had to check that my 145 Markdown files
still gave the same output, so I started off by writing a script
to do a diff of the XHTML output created by the two versions. Here
is what I noticed:

Things which change XHTML but not the result of rendering it:

1. blockquote text indented 2 spaces instead of tab
2. "_" and "*" no longer get entity encoded
3. Block level XHTML tags no longer get enclosed by <p></p>

Things which caused problems and required me to modify
Markdown source files:

4. colon no longer required to introduce code block
   (had to delete some to avoid spurious colons in XHTML)
5. "-" and "+" can now be used as unordered list markers
   (in some paragraphs I had used a hyphen and it happened
   to occur at the beginning of a line which caused the
   remainder of the paragraph to appear as a list item).
6. Handling of parentheses in URL changed

This last point is the only one which requires elaboration.
Here is some Markdown:

    Rough [transcript][1] of a 1999 talk by Noam Chomsky.

    [1]: http://sources.wikipedia.org/wiki/Middle_East_Policy_(Chomsky)

With 1.0b4 this produced:

    <p>Rough <a href="http://sources.wikipedia.org/wiki/
    Middle&#95;East&#95;Policy&#95;(Chomsky)">transcript</a>
    of a 1999 talk by Noam Chomsky.</p>

With 1.0 it produced:

    <p>Rough <a href="http://sources.wikipedia.org/wiki/
    Middle_East_Policy_" title="Chomsky">transcript</a>
    of a 1999 talk by Noam Chomsky.</p>

Note how in the latter case "Chomsky" has been detached from
the URL and interpreted as a title (and incidentally how the
underscores no longer get entity encoded)

Backslash escaping the "(" and ")" did not help, but enclosing
the whole URL in angle brackets fixed it.

Overall the coversion process was relatively painless, and I
guess the syntax is now stable so I won't have to go through
any more such exercises in the future.

Many thanks to John Gruber and everyone else who has
contributed to Markdown.

-- 
Ian Gregory
http://www.zenatode.org.uk/ian/


More information about the Markdown-discuss mailing list