|
|
@ -1,4 +1,6 @@
|
|
|
|
{-# LANGUAGE InstanceSigs #-}
|
|
|
|
{-# OPTIONS_GHC -Wno-unrecognised-pragmas #-}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
{-# HLINT ignore "Use lambda-case" #-}
|
|
|
|
|
|
|
|
|
|
|
|
module MdToHTML where
|
|
|
|
module MdToHTML where
|
|
|
|
|
|
|
|
|
|
|
@ -40,7 +42,6 @@ data MdToken
|
|
|
|
|
|
|
|
|
|
|
|
-- Deriving Show for MdToken
|
|
|
|
-- Deriving Show for MdToken
|
|
|
|
instance Show MdToken where
|
|
|
|
instance Show MdToken where
|
|
|
|
show :: MdToken -> String
|
|
|
|
|
|
|
|
show (Document tokens) = concatMap show tokens
|
|
|
|
show (Document tokens) = concatMap show tokens
|
|
|
|
show (Header level token) = "<h" ++ show level ++ ">" ++ show token ++ "</h" ++ show level ++ ">"
|
|
|
|
show (Header level token) = "<h" ++ show level ++ ">" ++ show token ++ "</h" ++ show level ++ ">"
|
|
|
|
show (Para token) = "<p>" ++ show token ++ "</p>"
|
|
|
|
show (Para token) = "<p>" ++ show token ++ "</p>"
|
|
|
|