]> gitweb @ CieloNegro.org - Rakka.git/blobdiff - Rakka/Wiki/Interpreter/Outline.hs
merge branch origin/master
[Rakka.git] / Rakka / Wiki / Interpreter / Outline.hs
index f6d798d295ce85b9f7eaf05193e543c4f68f3a78..3c66db1d90b6913032d20b30bf8c34a931529a3b 100644 (file)
@@ -1,12 +1,14 @@
+{-# LANGUAGE
+    OverloadedStrings
+  , UnicodeSyntax
+  #-}
 module Rakka.Wiki.Interpreter.Outline
     ( interpreters
     )
     where
-
-import           Data.Maybe
-import           Rakka.Wiki
-import           Rakka.Wiki.Interpreter
-
+import Data.Maybe
+import Rakka.Wiki
+import Rakka.Wiki.Interpreter
 
 interpreters :: [Interpreter]
 interpreters = [ outlineInterp ]
@@ -27,15 +29,15 @@ mkOutline :: WikiPage -> BlockElement
 mkOutline tree = fst (mkOutline' emptyOutline 1 headings)
     where
       headings :: [BlockElement]
-      headings = concat (map collectInBlock tree)
+      headings = concatMap collectInBlock tree
 
       collectInBlock :: BlockElement -> [BlockElement]
       collectInBlock hd@(Heading _ _)
           = [hd]
       collectInBlock (Div _ xs)
-          = concat $ map collectInBlock $ catMaybes (map castToBlock xs)
+          = concatMap collectInBlock $ catMaybes (map castToBlock xs)
       collectInBlock (BlockCmd (BlockCommand _ _ xs))
-          = concat $ map collectInBlock xs
+          = concatMap collectInBlock xs
       collectInBlock _
           = []