aboutsummaryrefslogtreecommitdiffstats
path: root/docs/extensions/nl2br.txt
diff options
context:
space:
mode:
authorWaylan Limberg <waylan@gmail.com>2011-06-21 07:57:59 -0400
committerWaylan Limberg <waylan@gmail.com>2011-06-21 07:57:59 -0400
commit8525f57ba7fc10b89c1a679aea1400d258fd0a02 (patch)
tree922b5ca9ce0d216c8454baa96518a27ded8442d5 /docs/extensions/nl2br.txt
parent95e2264dc5cacce6041d94ba731c5b15460b37ac (diff)
downloadmarkdown-8525f57ba7fc10b89c1a679aea1400d258fd0a02.tar.gz
markdown-8525f57ba7fc10b89c1a679aea1400d258fd0a02.tar.bz2
markdown-8525f57ba7fc10b89c1a679aea1400d258fd0a02.zip
Added nl2br extension. Closes #13. Thanks to Brian Neal for writing the code and allowing us to use it.
Diffstat (limited to 'docs/extensions/nl2br.txt')
-rw-r--r--docs/extensions/nl2br.txt19
1 files changed, 19 insertions, 0 deletions
diff --git a/docs/extensions/nl2br.txt b/docs/extensions/nl2br.txt
new file mode 100644
index 0000000..27030f7
--- /dev/null
+++ b/docs/extensions/nl2br.txt
@@ -0,0 +1,19 @@
+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/