[Kramdown-users] Markdown processing within HTML

Eric Sunshine sunshine at sunshineco.com
Fri Nov 27 10:53:43 EST 2009

Hi Thomas,

Thomas Leitner wrote:
>> For instance, given the legitimate embedded HTML:
>> <ul>
>> <li>Item</li>
>> </ul>
>> <dl>
>> <dt>Foo</dt>
>> <dd>cow</dd>
>> </dl>
> I have added li, dt and dd to the list of HTML tags recognized as block
> level HTML tags. With this change the above works as expected.

Using repository commit 3966cac694de1a58f8472f5366da0a1eb1b60475, I was 
able to remove all the ugly {::nokramdown:} invocations. Thank you.

>> > The implementation of the markdown="0|1|block|span" feature is on my
>> > TODO list and will make it into the 0.2.0 release. I will also add an
>> > option for setting whether block and span HTML tags are automatically
>> > parsed by kramdown.
>> > I will probably just change the default
>> > kramdown-syntax-in-HTML-parsing to false. 
> I have implemented the changes which are available at the github
> repository http://github.com/gettalong/kramdown. Could you please try
> out this updated version and tell me if it works like expected?

Things are looking a lot better with the latest commits. I did, however, 
notice a problem where it was not possible to re-enable Markdown 
processing in one of my test cases:

   <dl markdown="1">
   <dd markdown="1">
   Paragraph 1

   Paragraph 2

   Paragraph 3

For this input, I would have expected the w3c.org-valid output:

   <p>Paragraph 1</p>
   <p>Paragraph 2</p>
   <p>Paragraph 3</p>

but kramdown instead emitted:

   Paragraph 1

   Paragraph 2

   Paragraph 3

Even with {::kdoptions:: parse_block_html="true"} and/or {::kdoptions:: 
parse_span_html="true"}, kramdown stubbornly refused to process the 
paragraphs in the above <dd>...</dd> element.

Experience would suggest that multi-paragraph <dd>..</dd> and 
<li>..</li> are not entirely uncommon, so one can foresee demand for 
this to work as expected (especially in the absence of built-in kramdown 
definition list support).

-- ES

More information about the Kramdown-users mailing list