Skip to content
Trent Mick edited this page Jul 16, 2011 · 2 revisions

cuddled-lists extra

The cuddled-lists extra allows a list to be cuddled to a preceding paragraph. (Normally a blank line is necessary between a leading paragraph and a bulleted list.) For example, with this extra, this text:

I did these things:
* bullet1
* bullet2
* bullet3

becomes this:

<p>I did these things:</p>

<ul>
<li>bullet1</li>
<li>bullet2</li>
<li>bullet3</li>
</ul>

instead of the normal:

<p>I did these things:
* bullet1
* bullet2
* bullet3</p>

command-line usage

$ python markdown2.py -x cuddled-lists FOO.txt

module usage

>>> markdown2.markdown(text, extras=["cuddled-lists"])

(Return to Extras page.)

Clone this wiki locally