diff options
Diffstat (limited to 'src/Secret.hs')
-rw-r--r-- | src/Secret.hs | 46 |
1 files changed, 0 insertions, 46 deletions
diff --git a/src/Secret.hs b/src/Secret.hs deleted file mode 100644 index 7b428ce..0000000 --- a/src/Secret.hs +++ /dev/null @@ -1,46 +0,0 @@ -module Secret -( to_secret -) where - - -{- - - - - Écrit par Hédy GIRAUDEAU - - 27/07/17 - - --} - - - -import Text.Pandoc -import Text.Pandoc.JSON - - -firstLine :: [Inline] -> ([Inline],[Inline]) -firstLine [] = ([],[]) -firstLine ((SoftBreak) : x) = ([], x) -firstLine (x:q) = ([x] ++ y, z) where (y,z) = (firstLine q) - - - - -to_secret (BlockQuote (Para (Str(first) : inlines) : blocks)) = - Div - ("", ["secret"], []) - ([ - RawBlock (Format "html") - (start_detail ++ start_summary) - ] ++ [Plain $ fLine] ++ [ - RawBlock (Format "html") - (end_summary) - ] ++ [ Plain rest ]++ blocks ++ [ - RawBlock (Format "html") - (end_detail) - ] - ) - where start_detail = "<details>" - start_summary = "<summary>" - end_detail = "</details>" - end_summary = "</summary>" - (fLine, rest) = firstLine inlines - |