Multiline code block within a list
    Thomas Leitner 
    t_leitner at gmx.at
       
    Mon Nov  7 15:55:17 EST 2011
    
    
  
On 2011-11-08 01:08 +0800 Ryan Chan wrote:
> Actually this is one of the limitation that I went to reST...sad to
> hear the suitation is still the same..
Not with every implementation. You can do this easily with kramdown:
~~~~~~~~~~~~~~~~~~~~
* for
* bar
* 
        Code 1 (8 spaces)
        Code 2
        Code 3
* Another list item
~~~~~~~~~~~~~~~~~~~~
will produce
~~~~~~~~~~~~~~~~~~~~
<ul>
  <li>for</li>
  <li>bar</li>
  <li>
    <pre><code>Code 1
Code 2
Code 3
</code></pre>
  </li>
  <li>Another list item</li>
</ul>
~~~~~~~~~~~~~~~~~~~~
The line with the `* ` (after `* bar`) is needed to tell kramdown that
this is a list item and not just an asterisk.
Best regards,
  Thomas
    
    
More information about the Markdown-Discuss
mailing list