never executed always true always false
1 module Parse.Markdown (parse) where
2
3 import qualified Cheapskate.Parse
4 import qualified Cheapskate.Types as Markdown
5 import qualified Data.Text as Text
6 import Elm.Utils ((|>))
7
8
9 parse :: String -> Markdown.Blocks
10 parse source =
11 source
12 |> Text.pack
13 |> Cheapskate.Parse.markdown
14 (Markdown.Options
15 { Markdown.sanitize = True
16 , Markdown.allowRawHtml = True
17 , Markdown.preserveHardBreaks = True
18 , Markdown.debug = False
19 }
20 )
21 |> (\(Markdown.Doc _ source) -> source)