aboutsummaryrefslogtreecommitdiff
path: root/src/Text/Pandoc/Readers/JATS.hs
diff options
context:
space:
mode:
authorChristian Despres <50160106+despresc@users.noreply.github.com>2020-09-13 10:48:14 -0400
committerGitHub <noreply@github.com>2020-09-13 07:48:14 -0700
commitcae155b095e5182cc1b342b21f7430e40afe7ba8 (patch)
tree82b6342b0a8dc6f98ce73188bb89ae5ad0267060 /src/Text/Pandoc/Readers/JATS.hs
parent2109ded7101dba0ac48c9b60cdf454ad39a7e272 (diff)
downloadpandoc-cae155b095e5182cc1b342b21f7430e40afe7ba8.tar.gz
Fix hlint suggestions, update hlint.yaml (#6680)
* Fix hlint suggestions, update hlint.yaml Most suggestions were redundant brackets. Some required LambdaCase. The .hlint.yaml file had a small typo, and didn't ignore camelCase suggestions in certain modules.
Diffstat (limited to 'src/Text/Pandoc/Readers/JATS.hs')
-rw-r--r--src/Text/Pandoc/Readers/JATS.hs12
1 files changed, 6 insertions, 6 deletions
diff --git a/src/Text/Pandoc/Readers/JATS.hs b/src/Text/Pandoc/Readers/JATS.hs
index d3d742de3..69d597212 100644
--- a/src/Text/Pandoc/Readers/JATS.hs
+++ b/src/Text/Pandoc/Readers/JATS.hs
@@ -189,7 +189,7 @@ parseBlock (Elem e) =
_ -> getBlocks e
where parseMixed container conts = do
let (ils,rest) = break isBlockElement conts
- ils' <- (trimInlines . mconcat) <$> mapM parseInline ils
+ ils' <- trimInlines . mconcat <$> mapM parseInline ils
let p = if ils' == mempty then mempty else container ils'
case rest of
[] -> return p
@@ -206,7 +206,7 @@ parseBlock (Elem e) =
parseBlockquote = do
attrib <- case filterChild (named "attribution") e of
Nothing -> return mempty
- Just z -> (para . (str "— " <>) . mconcat)
+ Just z -> para . (str "— " <>) . mconcat
<$>
mapM parseInline (elContent z)
contents <- getBlocks e
@@ -281,7 +281,7 @@ parseBlock (Elem e) =
in ColWidth . (/ tot) <$> ws'
Nothing -> replicate numrows ColWidthDefault
let toRow = Row nullAttr . map simpleCell
- toHeaderRow l = if null l then [] else [toRow l]
+ toHeaderRow l = [toRow l | not (null l)]
return $ table (simpleCaption $ plain capt)
(zip aligns widths)
(TableHead nullAttr $ toHeaderRow headrows)
@@ -309,7 +309,7 @@ parseBlock (Elem e) =
return $ headerWith (ident,[],[]) n' headerText <> b
getInlines :: PandocMonad m => Element -> JATS m Inlines
-getInlines e' = (trimInlines . mconcat) <$>
+getInlines e' = trimInlines . mconcat <$>
mapM parseInline (elContent e')
parseMetadata :: PandocMonad m => Element -> JATS m Blocks
@@ -518,10 +518,10 @@ parseInline (Elem e) =
"email" -> return $ link ("mailto:" <> textContent e) ""
$ str $ textContent e
"uri" -> return $ link (textContent e) "" $ str $ textContent e
- "fn" -> (note . mconcat) <$>
+ "fn" -> note . mconcat <$>
mapM parseBlock (elContent e)
_ -> innerInlines
- where innerInlines = (trimInlines . mconcat) <$>
+ where innerInlines = trimInlines . mconcat <$>
mapM parseInline (elContent e)
mathML x =
case readMathML . T.pack . showElement $ everywhere (mkT removePrefix) x of