heist-0.12.0: An Haskell template system supporting both HTML5 and XML.

Safe Haskell | None

Heist.Splices.Html

Synopsis

- htmlTag :: Text
- htmlImpl :: Monad n => Splice n
- extractHeads :: Node -> ([Node], Maybe Node)

# Documentation

htmlTag :: Text

Name for the html splice.

htmlImpl :: Monad n => Splice n

The html splice runs all children and then traverses the returned node forest removing all head nodes. Then it merges them all and prepends it to the html tag's child list.

extractHeads

Arguments

:: Node | The root (html) node
-> ([Node], Maybe Node) | A tuple of a list of head nodes and the original tree with heads removed.

Extracts all heads from a node tree.