summaryrefslogtreecommitdiff
path: root/src/titleFilter.hs
diff options
context:
space:
mode:
Diffstat (limited to 'src/titleFilter.hs')
-rw-r--r--src/titleFilter.hs36
1 files changed, 0 insertions, 36 deletions
diff --git a/src/titleFilter.hs b/src/titleFilter.hs
deleted file mode 100644
index c215253..0000000
--- a/src/titleFilter.hs
+++ /dev/null
@@ -1,36 +0,0 @@
-import Text.Pandoc
-import Text.Pandoc.JSON
-
-{-
- - Écrit par Hédy GIRAUDEAU
- - 27/07/17
--}
-
-
-{- Convertit une liste de Inline (sorte de span, contie du formatage légé de
- - texte) vers une chaine de caractère normal -}
-
-toString :: [Inline] -> String
-toString [] = ""
-toString inls@((Str f):tl) = f ++ (toString tl)
-toString inls@((Space):tl) = " " ++ (toString tl)
-toString inls@((Emph inls2):tl) = (toString inls2) ++ (toString tl)
-toString inls@((SmallCaps inls2):tl) = (toString inls2) ++ (toString tl)
-toString inls@((Strong inls2):tl) = (toString inls2) ++ (toString tl)
-toString (_:tl) = (toString tl)
-
-
-transformBlock :: [Block] -> [Block]
-transformBlock ( hdF@(Header 1 _ inlines) : _ ) = [(Plain [(Str (toString inlines))])]
-
-transformBlock x = x
-
-
-bar :: Pandoc -> Pandoc
-bar x = bottomUp transformBlock x
-
-main :: IO()
-main = toJSONFilter bar
-
-
--- vim:set et: