diff options
author | Albert Krewinkel <tarleb@moltkeplatz.de> | 2014-04-12 11:07:38 +0200 |
---|---|---|
committer | Albert Krewinkel <tarleb@moltkeplatz.de> | 2014-04-12 11:07:38 +0200 |
commit | 82d4160bdcc149df020d1f95f4a7d893a9ecb42a (patch) | |
tree | 6e23f6629700535710b156efa14578bce79a1ab6 /src | |
parent | 36066699c31ca50566ca2492a5c112ecbe690a63 (diff) | |
download | pandoc-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.hs | 4 |
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 |