Importing Markdown posts to WordPress
drdrang at gmail.com
Thu Dec 27 20:04:49 EST 2007
Jan: It's indented blocks that *should be* converted to <pre><code>
blocks that are causing the problem.
Milian: The leading whitespace *is* preserved in the export from Movable Type.
Michel: New posts (written directly in the WP entry field) with code
blocks are correctly formatted, so PHP Markdown Extra is installed and
working. Imported posts, however, are screwed up. Interestingly,
*only* code blocks seem to be wrong: unordered lists, links, bold, and
inline code (backticks) are all formatted just fine. (There were no
ordered lists or italics in my imported posts, so I can't comment on
them.) As I said in the original post, the code blocks are wrapped in
<p></p> tags instead of <pre><code></code></pre>.
The file I import from Movable Type is just a series of
Markdown-formatted posts with headers that give the author, title,
date, etc. Lines of hyphens separate the posts. WP seems to be
separating the posts and handling the header information correctly.
This evening, I exported all the posts from WP, and got an XML file.
In this XML file, the incorrectly-imported posts have their code
blocks shoved up against the left margin instead of indented 4 spaces.
Not surprising, given that WP thinks they are regular paragraphs.
Again, I realize this is a WordPress issue, but I thought someone on
the list might have run into this problem. Any insight would be
More information about the Markdown-Discuss