Fix `docStringToHtml`.
parent
4f371ac9b8
commit
6ffa7f94fd
|
@ -210,7 +210,7 @@ partial def modifyElement (element : Element) : HtmlM Element :=
|
||||||
|
|
||||||
/-- Convert docstring to Html. -/
|
/-- Convert docstring to Html. -/
|
||||||
def docStringToHtml (s : String) : HtmlM (Array Html) := do
|
def docStringToHtml (s : String) : HtmlM (Array Html) := do
|
||||||
let rendered := CMark.renderHtml (Html.escape s)
|
let rendered := CMark.renderHtml (Html.escape s)
|
||||||
match manyDocument rendered.mkIterator with
|
match manyDocument rendered.mkIterator with
|
||||||
| Parsec.ParseResult.success _ res =>
|
| Parsec.ParseResult.success _ res =>
|
||||||
res.mapM fun x => do return Html.text <| toString (← modifyElement x)
|
res.mapM fun x => do return Html.text <| toString (← modifyElement x)
|
||||||
|
|
Loading…
Reference in New Issue