From 78e10f76636679882eff928054c3def6796a99c9 Mon Sep 17 00:00:00 2001 From: Everett Hildenbrandt Date: Sat, 19 May 2018 18:32:21 -0600 Subject: [PATCH] tools/pandoc-site: remove unused datastructure TOCAlignment and function ignoreTOC --- tools/pandoc-site.hs | 27 ++++++++------------------- 1 file changed, 8 insertions(+), 19 deletions(-) diff --git a/tools/pandoc-site.hs b/tools/pandoc-site.hs index 861328ec1..18454dcf5 100644 --- a/tools/pandoc-site.hs +++ b/tools/pandoc-site.hs @@ -15,17 +15,10 @@ import Data.Function (on) import Data.Maybe (fromMaybe) import Data.Text (unpack) -data TOCAlignment = TOCOff | TOCLeft | TOCRight - headerLevel :: Block -> Int headerLevel (Header level _ _) = level headerLevel _ = error "not a header" -ignoreTOC :: Block -> Block -ignoreTOC (Header level (ident, classes, params) inlines) = - Header level (ident, "notoc" : classes, params) inlines -ignoreTOC x = x - collectHeaders :: Block -> [Block] collectHeaders header@(Header _ (_, classes, _) _) = if "notoc" `elem` classes @@ -52,13 +45,10 @@ markupHeader n = error $ "'markupHeader' should only be passed a 'Node $ Head markupHeaders :: Forest Block -> Block markupHeaders = OrderedList (1, Decimal, Period) . map markupHeader -createTable :: TOCAlignment -> Forest Block -> Block -createTable _ [] = Null -createTable alignment headers - = let alignAttr = case alignment of - TOCRight -> " class=\"right-toc\"" - _ -> "" - navBegin = "