Importing Markdown posts to WordPress
peasant at gmail.com
Thu Dec 27 21:29:15 EST 2007
On Dec 28, 2007 12:04 PM, Dr. Drang <drdrang at gmail.com> wrote:
> 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.
It's almost certainly [this], in WordPress's MT importer:
$line = trim($line);
If it's needed at all (for removing trailing newlines?), `rtrim` ought
to do the job without destroying your codeblocks.
More information about the Markdown-Discuss