[Kramdown-users] Markdown processing within HTML

Eric Sunshine sunshine at sunshineco.com
Sun Nov 29 17:56:29 EST 2009


Further observations on this thread (see quoted message below for 
original problem description): Apparently, Markdown processing is in 
fact active to some extent in the <dd>..</dd> element. Given the input:

   <dl markdown="1">
   <dt>Foo</dt>
   <dd markdown="1">
   Paragraph *1*

   Paragraph **2**

   Paragraph 3 [link](http://example.com/)
   </dd>
   </dl>

kramdown emits:

   <dl>
   <dt>Foo</dt>
   <dd>
   Paragraph <em>1</em>

   Paragraph <strong>2</strong>

   Paragraph 3 <a href="http://example.com/">link</a>
   </dd>
   </dl>

So, it did correctly recognize and emit some directives (<em>, <strong>, 
<a>), but did not recognize multiple paragraphs.

-- ES


Eric Sunshine wrote:
> 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">
>   <dt>Foo</dt>
>   <dd markdown="1">
>   Paragraph 1
> 
>   Paragraph 2
> 
>   Paragraph 3
>   </dd>
>   </dl>
> 
> For this input, I would have expected the w3c.org-valid output:
> 
>   <dl>
>   <dt>Foo</dt>
>   <dd>
>   <p>Paragraph 1</p>
>   <p>Paragraph 2</p>
>   <p>Paragraph 3</p>
>   </dd>
>   </dl>
> 
> but kramdown instead emitted:
> 
>   <dl>
>     <dt>Foo</dt>
>     <dd>
>   Paragraph 1
> 
>   Paragraph 2
> 
>   Paragraph 3
>   </dd>
>   </dl>
> 
> 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
> _______________________________________________
> Kramdown-users mailing list
> Kramdown-users at rubyforge.org
> http://rubyforge.org/mailman/listinfo/kramdown-users
> 


More information about the Kramdown-users mailing list