Importing Markdown posts to WordPress
Sam Angove
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][1], 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.
[1]: http://trac.wordpress.org/browser/trunk/wp-admin/import/mt.php#L281
More information about the Markdown-Discuss
mailing list