aboutsummaryrefslogtreecommitdiff
path: root/src/Text/Pandoc/Readers/Man.hs
diff options
context:
space:
mode:
authorJohn MacFarlane <jgm@berkeley.edu>2018-10-24 23:21:35 -0700
committerJohn MacFarlane <jgm@berkeley.edu>2018-10-24 23:21:35 -0700
commitbc7b4d944ad4d8b6a1abf7fda6a345864212f0e3 (patch)
tree38c344af76c8b71a9074c16f6e4938a1261509f6 /src/Text/Pandoc/Readers/Man.hs
parentc5a42e695e13ff096b75e1360d3f2b69f664bcbe (diff)
downloadpandoc-bc7b4d944ad4d8b6a1abf7fda6a345864212f0e3.tar.gz
T.P.Readers.Groff: use FontSpec, not list of FontKind.
Diffstat (limited to 'src/Text/Pandoc/Readers/Man.hs')
-rw-r--r--src/Text/Pandoc/Readers/Man.hs15
1 files changed, 7 insertions, 8 deletions
diff --git a/src/Text/Pandoc/Readers/Man.hs b/src/Text/Pandoc/Readers/Man.hs
index 4fefb0e66..d7e65abec 100644
--- a/src/Text/Pandoc/Readers/Man.hs
+++ b/src/Text/Pandoc/Readers/Man.hs
@@ -174,16 +174,15 @@ parseTitle = do
return mempty
linePartsToInlines :: [LinePart] -> Inlines
-linePartsToInlines = go []
+linePartsToInlines = go
where
- go :: [[FontKind]] -> [LinePart] -> Inlines
- go _ [] = mempty
- go fs (MacroArg _:xs) = go fs xs -- shouldn't happen
- go fs (RoffStr s : xs) = text s <> go fs xs
- go (_:fs) (Font [] : xs) = go fs xs -- return to previous font
- go fs (Font _newfonts : xs) = go fs xs
- go fonts (FontSize _fs : xs) = go fonts xs
+ go :: [LinePart] -> Inlines
+ go [] = mempty
+ go (MacroArg _:xs) = go xs -- shouldn't happen
+ go (RoffStr s : xs) = text s <> go xs
+ go (Font _newfonts : xs) = go xs
+ go (FontSize _fs : xs) = go xs
parsePara :: PandocMonad m => ManParser m Blocks
parsePara = para . trimInlines <$> parseInlines