aboutsummaryrefslogtreecommitdiff
path: root/src/Text/Pandoc/Readers
diff options
context:
space:
mode:
authorJohn MacFarlane <jgm@berkeley.edu>2012-08-06 22:13:24 -0700
committerJohn MacFarlane <jgm@berkeley.edu>2012-08-06 22:14:35 -0700
commit8a101cffe36f4d6301ff45fd1b491bad1fcf1244 (patch)
tree30613e2563ded117b6aa0bb5f0c08d872edf3517 /src/Text/Pandoc/Readers
parentdc071f807dcc0cfc2f6d9860a7c0878db6aded0c (diff)
downloadpandoc-8a101cffe36f4d6301ff45fd1b491bad1fcf1244.tar.gz
Support hard_line_breaks markdown extension.
* Added Ext_hard_line_breaks. * Added section in README on non-pandoc extensions. * Exported pandocExtensions and strictExtensions in Text.Pandoc.Options. Closes #514.
Diffstat (limited to 'src/Text/Pandoc/Readers')
-rw-r--r--src/Text/Pandoc/Readers/Markdown.hs3
1 files changed, 2 insertions, 1 deletions
diff --git a/src/Text/Pandoc/Readers/Markdown.hs b/src/Text/Pandoc/Readers/Markdown.hs
index 795935860..030e677c8 100644
--- a/src/Text/Pandoc/Readers/Markdown.hs
+++ b/src/Text/Pandoc/Readers/Markdown.hs
@@ -1321,7 +1321,8 @@ endline = try $ do
when (stateParserContext st == ListItemState) $ do
notFollowedBy' bulletListStart
notFollowedBy' anyOrderedListStart
- return $ return B.space
+ (guardEnabled Ext_hard_line_breaks >> return (return B.linebreak))
+ <|> (return $ return B.space)
--
-- links