Roff tokenizer: allow eof in some places we allowed only newline.
This commit is contained in:
parent
cbeef9f5ca
commit
9defc2545d
1 changed files with 3 additions and 3 deletions
|
@ -308,7 +308,7 @@ lexComment = do
|
||||||
try $ string ".\\\""
|
try $ string ".\\\""
|
||||||
many Parsec.space
|
many Parsec.space
|
||||||
skipMany $ noneOf "\n"
|
skipMany $ noneOf "\n"
|
||||||
char '\n'
|
eofline
|
||||||
return mempty
|
return mempty
|
||||||
|
|
||||||
lexMacro :: PandocMonad m => RoffLexer m RoffTokens
|
lexMacro :: PandocMonad m => RoffLexer m RoffTokens
|
||||||
|
@ -451,7 +451,7 @@ lexConditional = do
|
||||||
-- n means nroff mode
|
-- n means nroff mode
|
||||||
lexNCond :: PandocMonad m => RoffLexer m RoffTokens
|
lexNCond :: PandocMonad m => RoffLexer m RoffTokens
|
||||||
lexNCond = do
|
lexNCond = do
|
||||||
char '\n'
|
newline
|
||||||
many1 spacetab
|
many1 spacetab
|
||||||
lexGroup <|> manToken
|
lexGroup <|> manToken
|
||||||
|
|
||||||
|
@ -631,7 +631,7 @@ spaceTabChar = do
|
||||||
return [RoffStr [c]]
|
return [RoffStr [c]]
|
||||||
|
|
||||||
lexEmptyLine :: PandocMonad m => RoffLexer m RoffTokens
|
lexEmptyLine :: PandocMonad m => RoffLexer m RoffTokens
|
||||||
lexEmptyLine = char '\n' >> return (singleTok MEmptyLine)
|
lexEmptyLine = newline >> return (singleTok MEmptyLine)
|
||||||
|
|
||||||
manToken :: PandocMonad m => RoffLexer m RoffTokens
|
manToken :: PandocMonad m => RoffLexer m RoffTokens
|
||||||
manToken = lexComment <|> lexMacro <|> lexLine <|> lexEmptyLine
|
manToken = lexComment <|> lexMacro <|> lexLine <|> lexEmptyLine
|
||||||
|
|
Loading…
Reference in a new issue