hakyll-std/TableOfContents: write5HtmlString => writeHtml5String

This commit is contained in:
Everett Hildenbrandt 2018-04-17 23:08:35 -06:00 committed by Simon Michael
parent 3997d55c7d
commit 5fc59811a0

View File

@ -54,7 +54,7 @@ markupHeader :: Tree Block -> H.Html
markupHeader (Node (Header _ (ident, _, keyvals) inline) headers)
| headers == [] = H.li $ link
| otherwise = H.li $ link <> (H.ol $ markupHeaders headers)
where render x = write5HtmlString def (Pandoc nullMeta [(Plain x)])
where render x = writeHtml5String def (Pandoc nullMeta [(Plain x)])
section = fromMaybe (render inline) (lookup "toc" keyvals)
link = H.a ! A.href (H.toValue $ "#" ++ ident) $ preEscapedToHtml $ unpack section
markupHeader _ = error "what"