markdown-js icon indicating copy to clipboard operation
markdown-js copied to clipboard

Inline Maruku attribute lists don't seem to work

Open aendra-rininsland opened this issue 11 years ago • 3 comments

According to the Maruku metadata proposal, the following:

### Header ###     {: #myid}

...Should translate to:

<h3 id="myid">Header</h3>

However:

markdown.toHTML('### Header ###     {: #myid}', 'Maruku');

...Instead yields:

"<h3>Header ###     {: #myid}</h3>"

...Leading me to believe something's broken in 0.6.0-beta1.

Worth noting that adding a newline before the metadata makes everything work swimmingly.

aendra-rininsland avatar Mar 17 '14 13:03 aendra-rininsland

Experimenting with it a bit more, images, links and other inline content requires that the metadata block be right next to the element, without any whitespace. You in fact need to do this, or else the metadata will get applied to the next paragraph.

Even if the implementation is left as-is, there really needs to be some documentation about it.

aendra-rininsland avatar Mar 17 '14 17:03 aendra-rininsland

Okay yes one of two things need fixing there.

Form what I remember of the maruku docs properties for block level elements (i.e. the h3) need to be the line below the element.

Could you work out how the official ruby maruku gem behaves for these cases please?

ashb avatar Mar 17 '14 18:03 ashb

Oh header is right there in the example - yeah so that looks like a bug then.

ashb avatar Mar 17 '14 18:03 ashb