aboutsummaryrefslogtreecommitdiff
path: root/src/Text/Pandoc/Readers/JATS.hs
diff options
context:
space:
mode:
authorAlbert Krewinkel <albert@zeitkraut.de>2020-02-07 10:15:57 +0100
committerAlbert Krewinkel <albert@zeitkraut.de>2020-02-07 10:17:24 +0100
commit6cd77d4c638012be63d66882403804aa28feb6ed (patch)
treeea1841989db394ae931780fbbca3305fe0f021c8 /src/Text/Pandoc/Readers/JATS.hs
parent60a3158bf9b6f4d16bb5fc6cac61b5c305ad40e3 (diff)
downloadpandoc-6cd77d4c638012be63d66882403804aa28feb6ed.tar.gz
Resolve HLint warnings
All warnings are either fixed or, if more appropriate, HLint is configured to ignore them. HLint suggestions remain. * Ignore "Use camelCase" warnings in Lua and legacy code * Fix or ignore remaining HLint warnings * Remove redundant brackets * Remove redundant `return`s * Remove redundant as-pattern * Fuse mapM_/map * Use `.` to shorten code * Remove redundant `fmap` * Remove unused LANGUAGE pragmas * Hoist `not` in Text.Pandoc.App * Use fewer imports for `Text.DocTemplates` * Remove redundant `do`s * Remove redundant `$`s * Jira reader: remove unnecessary parentheses
Diffstat (limited to 'src/Text/Pandoc/Readers/JATS.hs')
-rw-r--r--src/Text/Pandoc/Readers/JATS.hs4
1 files changed, 2 insertions, 2 deletions
diff --git a/src/Text/Pandoc/Readers/JATS.hs b/src/Text/Pandoc/Readers/JATS.hs
index 4b8eb9098..1ccbd5a41 100644
--- a/src/Text/Pandoc/Readers/JATS.hs
+++ b/src/Text/Pandoc/Readers/JATS.hs
@@ -226,7 +226,7 @@ parseBlock (Elem e) =
terms' <- mapM getInlines terms
items' <- mapM getBlocks items
return (mconcat $ intersperse (str "; ") terms', items')
- parseFigure = do
+ parseFigure =
-- if a simple caption and single graphic, we emit a standard
-- implicit figure. otherwise, we emit a div with the contents
case filterChildren (named "graphic") e of
@@ -238,7 +238,7 @@ parseBlock (Elem e) =
(filterChildren (const True) t)
Nothing -> return mempty
img <- getGraphic (Just (caption, attrValue "id" e)) g
- return $ para $ img
+ return $ para img
_ -> divWith (attrValue "id" e, ["fig"], []) <$> getBlocks e
parseTable = do
let isCaption x = named "title" x || named "caption" x