module Zettel.Math where import Text.Pandoc.Definition (Inline (..)) import Text.Pandoc.Walk (walk) import Zettel.Types wrapMath :: [Inline] -> [Inline] wrapMath = concatMap f where f :: Inline -> [Inline] f m@(Math _ _) = [RawInline "markdown" "{{< math >}}", m, RawInline "markdown" "{{< /math >}}"] f a = [a] wrapZettelGraph :: ZettelGraph -> ZettelGraph wrapZettelGraph = walk wrapMath