module Utils.Pandoc.Html where
import Relude
import Data.List qualified as List
import Text.Blaze.Html5 qualified as H
import Text.Pandoc (runPure, writeHtml5, PandocPure, WriterOptions)
import Text.Pandoc.Writers.Shared qualified as P
import Text.Pandoc.Walk qualified as P
import Text.Pandoc.Builder qualified as B
import Text.Pandoc.Options qualified as P
import Text.Pandoc.Shared qualified as P
import Text.Pandoc.Definition (Pandoc (..))
import Prelude ()
import Data.Default (def)
import PyF
import Data.Text qualified as Text
htmlOfPandoc :: WriterOptions -> Pandoc -> H.Html
htmlOfPandoc opts = unPandocM . writeHtml5 opts
unPandocM :: PandocPure a -> a
unPandocM p = either (error . show) id (runPure p)