fletcher / MultiMarkdown-4

This project is now deprecated. Please use MultiMarkdown-6 instead!
https://github.com/fletcher/MultiMarkdown-5
Other
306 stars 59 forks source link

`code` swallows leading whitespace #57

Closed gknops closed 10 years ago

gknops commented 10 years ago

This markdown:

[`  asp   Book`](#aspbook) *property*</br>

produces this HTML:

<p><a href="#aspbook"><code>asp   Book</code></a> <em>property</em></br>

The leading spaces in the code section got swallowed, while the spaces inside were preserved. MultiMarkdown version 4.5.

fletcher commented 10 years ago

This is actually the "standard" behavior for Markdown, and therefore MultiMarkdown. Leading spaces in code blocks(which can span multiple lines) are preserved. I'm not honestly sure it makes sense to preserve leading spaces in code spans. If this becomes the default behavior across the major implementations, I'll consider it, but probably not until then.