aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorJohn MacFarlane <jgm@berkeley.edu>2018-10-26 21:50:19 -0700
committerJohn MacFarlane <jgm@berkeley.edu>2018-10-26 21:50:19 -0700
commit9defc2545dfc8246f7bc24292f1274ef51dbdd87 (patch)
tree16174b39eed9f5fe6cbea2ab74716149450c745e
parentcbeef9f5caa0b96e4dfaa072d61bc8473865e003 (diff)
downloadpandoc-9defc2545dfc8246f7bc24292f1274ef51dbdd87.tar.gz
Roff tokenizer: allow eof in some places we allowed only newline.
-rw-r--r--src/Text/Pandoc/Readers/Roff.hs6
1 files changed, 3 insertions, 3 deletions
diff --git a/src/Text/Pandoc/Readers/Roff.hs b/src/Text/Pandoc/Readers/Roff.hs
index 6062328f0..183580fce 100644
--- a/src/Text/Pandoc/Readers/Roff.hs
+++ b/src/Text/Pandoc/Readers/Roff.hs
@@ -308,7 +308,7 @@ lexComment = do
try $ string ".\\\""
many Parsec.space
skipMany $ noneOf "\n"
- char '\n'
+ eofline
return mempty
lexMacro :: PandocMonad m => RoffLexer m RoffTokens
@@ -451,7 +451,7 @@ lexConditional = do
-- n means nroff mode
lexNCond :: PandocMonad m => RoffLexer m RoffTokens
lexNCond = do
- char '\n'
+ newline
many1 spacetab
lexGroup <|> manToken
@@ -631,7 +631,7 @@ spaceTabChar = do
return [RoffStr [c]]
lexEmptyLine :: PandocMonad m => RoffLexer m RoffTokens
-lexEmptyLine = char '\n' >> return (singleTok MEmptyLine)
+lexEmptyLine = newline >> return (singleTok MEmptyLine)
manToken :: PandocMonad m => RoffLexer m RoffTokens
manToken = lexComment <|> lexMacro <|> lexLine <|> lexEmptyLine