aboutsummaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorAlbert Krewinkel <tarleb@moltkeplatz.de>2014-04-12 11:07:38 +0200
committerAlbert Krewinkel <tarleb@moltkeplatz.de>2014-04-12 11:07:38 +0200
commit82d4160bdcc149df020d1f95f4a7d893a9ecb42a (patch)
tree6e23f6629700535710b156efa14578bce79a1ab6 /src
parent36066699c31ca50566ca2492a5c112ecbe690a63 (diff)
downloadpandoc-82d4160bdcc149df020d1f95f4a7d893a9ecb42a.tar.gz
Org reader: Read linebreaks
Linebreaks are marked by the string `\\` at the end of a line.
Diffstat (limited to 'src')
-rw-r--r--src/Text/Pandoc/Readers/Org.hs4
1 files changed, 4 insertions, 0 deletions
diff --git a/src/Text/Pandoc/Readers/Org.hs b/src/Text/Pandoc/Readers/Org.hs
index ceac69367..19dd03c6b 100644
--- a/src/Text/Pandoc/Readers/Org.hs
+++ b/src/Text/Pandoc/Readers/Org.hs
@@ -506,6 +506,7 @@ anyLineNewline = (++ "\n") <$> anyLine
inline :: OrgParser Inlines
inline =
choice [ whitespace
+ , linebreak
, link
, str
, endline
@@ -535,6 +536,9 @@ whitespace = B.space <$ skipMany1 spaceChar
<* updateLastForbiddenCharPos
<?> "whitespace"
+linebreak :: OrgParser Inlines
+linebreak = try $ B.linebreak <$ string "\\\\" <* skipSpaces <* newline
+
str :: OrgParser Inlines
str = B.str <$> many1 (noneOf $ specialChars ++ "\n\r ")
<* updateLastStrPos