diff options
author | ache <ache@ache.one> | 2018-02-06 05:33:32 +0100 |
---|---|---|
committer | ache <ache@ache.one> | 2018-02-06 05:33:32 +0100 |
commit | 6f5a6cd7353b8ff8243c86df75432780ba643944 (patch) | |
tree | 887094bed9defaf939ec85f8b271031e1e8b7d73 /src/Secret.hs | |
parent | HTML5 compatible tools (diff) |
no pandoc dependencies
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 - |