Sophie

Sophie

distrib > Mageia > 4 > x86_64 > by-pkgid > 1b6a90eabb5f81b08f344352d0f11984 > files > 129

python3-markdown-2.3.1-3.mga4.noarch.rpm

title:      New Line to Break Extension
prev_title: Meta-Data Extension
prev_url:   meta_data.html
next_title: Sane Lists Extension
next_url:   sane_lists.html

NL2BR Extension
===============

A Python-Markdown extension to treat newlines as hard breaks; like
StackOverflow and [GitHub][] flavored Markdown do.

Usage:

    >>> import markdown
    >>> text = """
    ... Line 1
    ... Line 2
    ... """
    >>> html = markdown.markdown(text, extensions=['nl2br'])
    >>> print html
    <p>Line 1<br />
    Line 2</p>

[Github]: http://github.github.com/github-flavored-markdown/