Update docs formatting.

This commit is contained in:
Dillon Kearns 2021-05-29 13:45:19 -07:00
parent 4429341b68
commit 2116145386
2 changed files with 9 additions and 4 deletions

File diff suppressed because one or more lines are too long

View File

@ -105,14 +105,19 @@ It's common to parse the body with a markdown parser or other format.
}
)
(Decode.field "title" Decode.string)
(markdownString |> markdownToView |> Decode.fromResult)
(markdownString
|> markdownToView
|> Decode.fromResult
)
)
markdownToView : String -> Result String (List (Html msg))
markdownToView :
String
-> Result String (List (Html msg))
markdownToView markdownString =
markdownString
|> Markdown.Parser.parse
|> Result.mapError (\_ -> "Markdown parsing error.")
|> Result.mapError (\_ -> "Markdown error.")
|> Result.andThen
(\blocks ->
Markdown.Renderer.render