Safe Haskell | Safe-Inferred |
---|---|
Language | Haskell2010 |
Hledger.Write.Html
Description
HTML writing helpers. This module would ideally hide the details of which HTML library is used, but it doesn't yet.
Currently hledger-web uses blaze-html, but hledger CLI reports use lucid. lucid has a more usable API than blaze-html (https:/chrisdone.composts/lucid). lucid2's is even better. Unfortunately lucid* can not render multi-line or indented text. We want this so that humans can read and troubleshoot our HTML output. So a transition to blaze-html may be coming.
Synopsis
- toHtml :: forall (m :: Type -> Type). (ToHtml a, Monad m) => a -> HtmlT m ()
- type Html = Html ()
- formatRow :: Lines border => [Cell border Html] -> Html
- htmlAsText :: Html -> Text
- htmlAsLazyText :: Html -> Text
- styledTableHtml :: Lines border => [[Cell border Html]] -> Html
- tests_Hledger_Write_Html :: TestTree
Documentation
toHtml :: forall (m :: Type -> Type). (ToHtml a, Monad m) => a -> HtmlT m () #
Convert to HTML, doing HTML escaping.
htmlAsText :: Html -> Text Source #
htmlAsLazyText :: Html -> Text Source #
styledTableHtml :: Lines border => [[Cell border Html]] -> Html Source #
Export spreadsheet table data as HTML table. This is derived from https://hackage.haskell.org/package/classify-frog-0.2.4.3/src/src/Spreadsheet/Format.hs