aboutsummaryrefslogtreecommitdiff
path: root/src/Text/Pandoc
diff options
context:
space:
mode:
authorJohn MacFarlane <jgm@berkeley.edu>2018-10-20 10:25:50 -0700
committerJohn MacFarlane <jgm@berkeley.edu>2018-10-20 10:46:08 -0700
commit02b33a7d63ed2c930deda358c226031a42b10249 (patch)
tree5cb2a2f9ed9f4469fb13a9409f9bd09cc98fadf2 /src/Text/Pandoc
parent916db81ade8049ae417350b88bbe08e1a4018c79 (diff)
downloadpandoc-02b33a7d63ed2c930deda358c226031a42b10249.tar.gz
Man reader: handle lines with just one period.
Diffstat (limited to 'src/Text/Pandoc')
-rw-r--r--src/Text/Pandoc/Readers/Man.hs3
1 files changed, 2 insertions, 1 deletions
diff --git a/src/Text/Pandoc/Readers/Man.hs b/src/Text/Pandoc/Readers/Man.hs
index ecde31b9f..21325eb4f 100644
--- a/src/Text/Pandoc/Readers/Man.hs
+++ b/src/Text/Pandoc/Readers/Man.hs
@@ -267,11 +267,12 @@ lexMacro :: PandocMonad m => ManLexer m ManToken
lexMacro = do
char '.' <|> char '\''
many spacetab
- macroName <- many1 (letter <|> oneOf ['\\', '"', '&'])
+ macroName <- many (letter <|> oneOf ['\\', '"', '&'])
args <- lexArgs
let joinedArgs = unwords $ fst <$> args
tok = case macroName of
+ "" -> MComment ""
x | x `elem` ["\\\"", "\\#"] -> MComment joinedArgs
"B" -> MStr (joinedArgs, singleton Bold)
"BR" -> MMaybeLink joinedArgs