fletcher / peg-multimarkdown

An implementation of MultiMarkdown in C, using a PEG grammar - a fork of jgm's peg-markdown. No longer under active development - see MMD 5.
Other
525 stars 55 forks source link

Markdown syntax is ignored inside <address> #128

Closed elmimmo closed 12 years ago

elmimmo commented 12 years ago

In Gruber's Markdown, several lines wrapped in an address HTML element, each line having 2 spaces at the end, like this (select each line separately to see that there are trailing spaces):

<address>My name  
My e-mail  
My address</address>

will convert to br line breaks at the end of each line (while keeping it all inside the address tag), like this:

<address>My name<br/>
My e-mail<br/>
My address</address>

MMD will not add the br line breaks. As a result, MMD's output HTML will render as a single line.

Is this inconsistency with Markdown wanted or is it a bug?

elmimmo commented 12 years ago

Looking more into it, MMD does not seem to process any Markdown whatsoever inside an address element.

For example, having the following as a source:

<address>
<user@host.com>  
This is **my** address
</address>

Markdown converts it to

<p><address>
<a href="&#109;&#97;&#105;&#x6C;&#x74;&#x6F;:&#117;&#x73;&#x65;&#x72;&#64;&#x68;o&#x73;&#116;&#46;&#99;&#111;&#109;">&#117;&#x73;&#x65;&#x72;&#64;&#x68;o&#x73;&#116;&#46;&#99;&#111;&#109;</a> <br />
This is <strong>my</strong> address
</address></p>

whereas MMD outputs the source untouched.

elmimmo commented 12 years ago

Renamed the issue to better describe the issue from

Line breaks (2-space at end of line) inside

do not convert to

to

Markdown syntax is ignored inside

elmimmo commented 12 years ago

Ouch… I see this is in the documentation How do I create a MultiMarkdown document?, section “Raw HTML”.