Newline before </code></pre>

Milian Wolff mail at milianw.de
Sun Jul 2 14:25:17 EDT 2006


Hello!

What's the point in adding a newline before the closing tags of a preformatted
code block? Example:

This is Code

Will become:

<pre><code>This is Code
</code></pre>

(In both PHP and Perl Markdown)

I don't really see the point, especially because this is not what I would want
to see. With a normal stylesheet which has white-space:pre; set on pre/code
blocks, you'll see an empty line after "This is Code". In my eyes that is
wrong.

It's pretty easy to prevent though, you'll just have to remove the newline
before `</code></pre>` in _DoCodeBlocks(_callback).
--
Milian Wolff
http://milianw.de


More information about the Markdown-Discuss mailing list