git.iko.soy/typeable/pandoc
on master help sign in
Muse reader: hlint
commite02b7d2b384ac5ae55e13cb60dcf7f89dffcd806 authorAlexander Krotov <ilabdsf@gmail.com> dateTue 13 Feb 2018, 14:34 (9 years ago) parent42e39fb
1 file changed+7−7
src/Text/Pandoc/Readers/Muse.hs+7−7
src/Text/Pandoc/Readers/Muse.hs+7−7
@@ -298,7 +298,7 @@ parseBlocksTill end =
298298 Right rest -> return $ first B.<> rest
299299 paraStart = do (first, e) <- paraUntil ((Left <$> end) <|> (Right <$> continuation))
300300 case e of
301− Left _ -> return $ first
301+ Left _ -> return first
302302 Right rest -> return $ first B.<> rest
303303 continuation = parseBlocksTill end
304304
@@ -330,7 +330,7 @@ listItemContentsUntil col pre end =
330330 (first, e) <- anyListUntil ((Left <$> pre) <|> (Right <$> continuation) <|> (Left <$> end))
331331 case e of
332332 Left ee -> return (first, ee)
333− Right (rest, ee) -> return $ (first B.<> rest, ee)
333+ Right (rest, ee) -> return (first B.<> rest, ee)
334334 continuation = try $ do blank <- optionMaybe blankline
335335 skipMany blankline
336336 indentWith col
@@ -441,7 +441,7 @@ rightTag :: PandocMonad m => MuseParser m (F Blocks)
441441rightTag = snd <$> parseHtmlContent "right"
442442
443443quoteTag :: PandocMonad m => MuseParser m (F Blocks)
444−quoteTag = (fmap B.blockQuote) <$> snd <$> parseHtmlContent "quote"
444+quoteTag = fmap B.blockQuote . snd <$> parseHtmlContent "quote"
445445
446446-- <div> tag is supported by Emacs Muse, but not Amusewiki 2.025
447447divTag :: PandocMonad m => MuseParser m (F Blocks)
@@ -451,7 +451,7 @@ divTag = do
451451
452452verseLine :: PandocMonad m => MuseParser m (F Inlines)
453453verseLine = do
454− indent <- (B.str <$> many1 (char ' ' >> pure '\160')) <|> (pure mempty)
454+ indent <- (B.str <$> many1 (char ' ' >> pure '\160')) <|> pure mempty
455455 rest <- manyTill (choice inlineList) newline
456456 return $ trimInlinesF $ mconcat (pure indent : rest)
457457
@@ -478,7 +478,7 @@ paraUntil end = do
478478 setState $ state{ museInPara = True }
479479 (l, e) <- someUntil inline $ try (manyTill spaceChar eol >> end)
480480 updateState (\st -> st { museInPara = False })
481− return (fmap (B.para) $ trimInlinesF $ mconcat l, e)
481+ return (fmap B.para $ trimInlinesF $ mconcat l, e)
482482
483483noteMarker :: PandocMonad m => MuseParser m String
484484noteMarker = try $ do
@@ -571,7 +571,7 @@ bulletListUntil end = try $ do
571571 let indent = sourceColumn pos - 1
572572 guard $ indent /= 0
573573 (items, e) <- bulletListItemsUntil indent end
574− return $ (B.bulletList <$> sequence items, e)
574+ return (B.bulletList <$> sequence items, e)
575575
576576listItemContents :: PandocMonad m => MuseParser m (F Blocks)
577577listItemContents = do
@@ -629,7 +629,7 @@ orderedListUntil end = try $ do
629629 p@(_, style, _) <- anyMuseOrderedListMarker
630630 guard $ style `elem` [Decimal, LowerAlpha, UpperAlpha, LowerRoman, UpperRoman]
631631 (items, e) <- orderedListItemsUntil indent style end
632− return $ (B.orderedListWith p <$> sequence items, e)
632+ return (B.orderedListWith p <$> sequence items, e)
633633
634634descriptionsUntil :: PandocMonad m
635635 => Int