I have markdown documents in Pandoc's standard markdown
format, which i would like to publish on a free wordpress.com blog ("free" implies that i cannot install plugins or modify Wordpress PHP files).
Officially, wordpress.com supports the PHP Markdown Extra variant that it converts into HTML, so theoretically i could just use Pandoc to convert my files into this markdown_phpextra
format (which Pandoc does flawlessly).
However, as described in this SO question i noticed that my paragraphs appear wrong on the blog, because wordpress.com takes markdown-linebreaks literally when converting to HTML and does not reflow/rewrap paragraphs according to the "markdown_phpextra" spec.
For example, this markdown_phpextra
text
This is a sentence.
This is a another sentence.
should become
<p>This is a sentence.
This is a another sentence.</p>
in HTML, but is actually converted by wordpress.com to
<p>This is a sentence.<br>
This is a another sentence.</p>
How can i convert my markdown
files into some format that is compatible with wordpress.com?
- Is it possible to make Pandoc export every paragraph on a single line? This would immediately work around/solve my problem.
- Can i directly export with Pandoc into wordpress.com-syntax-highlight-compatible HTML? I have a lot of code snippets that aren't hightlighted when i use Pandoc to convert directly into HTML.
<div class="sourceCode" id="cb7"><pre class="sourceCode Can Pandoc somehow set bash"><code class="sourceCode bash">...
, whereas wordpress.com expects<div id="highlighter_592305" class="syntaxhighlighter bash"...
. Is there some way to modify the HTML output or the class attributes that Pandoc creates? – manews