git.iko.soy/typeable/pandoc
on master help sign in
HLint: redundant parens
f6d1518Henry de Valence
pandoc.hs+2−4
@@ -1034,12 +1034,10 @@ main = do
1034
1034
1035 variables' <- case mathMethod of
1035 variables' <- case mathMethod of
1036 LaTeXMathML Nothing -> do
1036 LaTeXMathML Nothing -> do
1037− s <- readDataFileUTF8 datadir
1037+ s <- readDataFileUTF8 datadir "LaTeXMathML.js"
1038− ("LaTeXMathML.js")
1039 return $ ("mathml-script", s) : variables
1038 return $ ("mathml-script", s) : variables
1040 MathML Nothing -> do
1039 MathML Nothing -> do
1041− s <- readDataFileUTF8 datadir
1040+ s <- readDataFileUTF8 datadir "MathMLinHTML.js"
1042− ("MathMLinHTML.js")
1043 return $ ("mathml-script", s) : variables
1041 return $ ("mathml-script", s) : variables
1044 _ -> return variables
1042 _ -> return variables
1045
1043
src/Text/Pandoc/Readers/Markdown.hs+1−1
@@ -730,7 +730,7 @@ listStart = bulletListStart <|> (anyOrderedListStart >> return ())
730listLine :: MarkdownParser String
730listLine :: MarkdownParser String
731listLine = try $ do
731listLine = try $ do
732 notFollowedBy' (do indentSpaces
732 notFollowedBy' (do indentSpaces
733− many (spaceChar)
733+ many spaceChar
734 listStart)
734 listStart)
735 notFollowedBy' $ htmlTag (~== TagClose "div")
735 notFollowedBy' $ htmlTag (~== TagClose "div")
736 chunks <- manyTill
736 chunks <- manyTill
src/Text/Pandoc/Readers/Textile.hs+1−1
@@ -594,7 +594,7 @@ surrounded border = enclosed (border *> notFollowedBy (oneOf " \t\n\r")) (try bo
594simpleInline :: Parser [Char] ParserState t -- ^ surrounding parser
594simpleInline :: Parser [Char] ParserState t -- ^ surrounding parser
595 -> ([Inline] -> Inline) -- ^ Inline constructor
595 -> ([Inline] -> Inline) -- ^ Inline constructor
596 -> Parser [Char] ParserState Inline -- ^ content parser (to be used repeatedly)
596 -> Parser [Char] ParserState Inline -- ^ content parser (to be used repeatedly)
597−simpleInline border construct = surrounded border (inlineWithAttribute) >>=
597+simpleInline border construct = surrounded border inlineWithAttribute >>=
598 return . construct . normalizeSpaces
598 return . construct . normalizeSpaces
599 where inlineWithAttribute = (try $ optional attributes) >> inline
599 where inlineWithAttribute = (try $ optional attributes) >> inline
600
600
src/Text/Pandoc/Writers/HTML.hs+1−1
@@ -524,7 +524,7 @@ blockToHtml opts (DefinitionList lst) = do
524 contents <- mapM (\(term, defs) ->
524 contents <- mapM (\(term, defs) ->
525 do term' <- if null term
525 do term' <- if null term
526 then return mempty
526 then return mempty
527− else liftM (H.dt) $ inlineListToHtml opts term
527+ else liftM H.dt $ inlineListToHtml opts term
528 defs' <- mapM ((liftM (\x -> H.dd $ (x >> nl opts))) .
528 defs' <- mapM ((liftM (\x -> H.dd $ (x >> nl opts))) .
529 blockListToHtml opts) defs
529 blockListToHtml opts) defs
530 return $ mconcat $ nl opts : term' : nl opts :
530 return $ mconcat $ nl opts : term' : nl opts :
src/Text/Pandoc/Writers/MediaWiki.hs+1−1
@@ -51,7 +51,7 @@ data WriterState = WriterState {
51writeMediaWiki :: WriterOptions -> Pandoc -> String
51writeMediaWiki :: WriterOptions -> Pandoc -> String
52writeMediaWiki opts document =
52writeMediaWiki opts document =
53 evalState (pandocToMediaWiki opts document)
53 evalState (pandocToMediaWiki opts document)
54− (WriterState { stNotes = False, stListLevel = [], stUseTags = False })
54+ WriterState { stNotes = False, stListLevel = [], stUseTags = False }
55
55
56-- | Return MediaWiki representation of document.
56-- | Return MediaWiki representation of document.
57pandocToMediaWiki :: WriterOptions -> Pandoc -> State WriterState String
57pandocToMediaWiki :: WriterOptions -> Pandoc -> State WriterState String
src/Text/Pandoc/Writers/Textile.hs+1−1
@@ -51,7 +51,7 @@ data WriterState = WriterState {
51writeTextile :: WriterOptions -> Pandoc -> String
51writeTextile :: WriterOptions -> Pandoc -> String
52writeTextile opts document =
52writeTextile opts document =
53 evalState (pandocToTextile opts document)
53 evalState (pandocToTextile opts document)
54− (WriterState { stNotes = [], stListLevel = [], stUseTags = False })
54+ WriterState { stNotes = [], stListLevel = [], stUseTags = False }
55
55
56-- | Return Textile representation of document.
56-- | Return Textile representation of document.
57pandocToTextile :: WriterOptions -> Pandoc -> State WriterState String
57pandocToTextile :: WriterOptions -> Pandoc -> State WriterState String
tests/Tests/Readers/LaTeX.hs+1−1
@@ -21,7 +21,7 @@ tests = [ testGroup "basic"
21 [ "simple" =:
21 [ "simple" =:
22 "word" =?> para "word"
22 "word" =?> para "word"
23 , "space" =:
23 , "space" =:
24− "some text" =?> para ("some text")
24+ "some text" =?> para "some text"
25 , "emphasized" =:
25 , "emphasized" =:
26 "\\emph{emphasized}" =?> para (emph "emphasized")
26 "\\emph{emphasized}" =?> para (emph "emphasized")
27 ]
27 ]
tests/Tests/Readers/Markdown.hs+2−2
@@ -171,13 +171,13 @@ tests = [ testGroup "inline code"
171 , testGroup "smart punctuation"
171 , testGroup "smart punctuation"
172 [ test markdownSmart "quote before ellipses"
172 [ test markdownSmart "quote before ellipses"
173 ("'...hi'"
173 ("'...hi'"
174− =?> para (singleQuoted ("…hi")))
174+ =?> para (singleQuoted "…hi"))
175 , test markdownSmart "apostrophe before emph"
175 , test markdownSmart "apostrophe before emph"
176 ("D'oh! A l'*aide*!"
176 ("D'oh! A l'*aide*!"
177 =?> para ("D’oh! A l’" <> emph "aide" <> "!"))
177 =?> para ("D’oh! A l’" <> emph "aide" <> "!"))
178 , test markdownSmart "apostrophe in French"
178 , test markdownSmart "apostrophe in French"
179 ("À l'arrivée de la guerre, le thème de l'«impossibilité du socialisme»"
179 ("À l'arrivée de la guerre, le thème de l'«impossibilité du socialisme»"
180− =?> para ("À l’arrivée de la guerre, le thème de l’«impossibilité du socialisme»"))
180+ =?> para "À l’arrivée de la guerre, le thème de l’«impossibilité du socialisme»")
181 ]
181 ]
182 , testGroup "mixed emphasis and strong"
182 , testGroup "mixed emphasis and strong"
183 [ "emph and strong emph alternating" =:
183 [ "emph and strong emph alternating" =: