diff options
author | Oleg Grenrus <oleg.grenrus@iki.fi> | 2017-07-14 17:38:10 +0300 |
---|---|---|
committer | Jasper Van der Jeugt <jaspervdj@gmail.com> | 2018-01-31 21:58:49 +0100 |
commit | 5dc0b60e6f607fada3d72566dcd1ca4cbfe14c4d (patch) | |
tree | a29b6bf132a0151d87166959f2993fd27984b74a | |
parent | 0fbc0487aa89295d1d0df4bda6a85e27c5159c37 (diff) | |
download | hakyll-5dc0b60e6f607fada3d72566dcd1ca4cbfe14c4d.tar.gz |
Add withTagList
-rw-r--r-- | lib/Hakyll/Web/Html.hs | 6 |
1 files changed, 5 insertions, 1 deletions
diff --git a/lib/Hakyll/Web/Html.hs b/lib/Hakyll/Web/Html.hs index 6b7ec88..fc3deaa 100644 --- a/lib/Hakyll/Web/Html.hs +++ b/lib/Hakyll/Web/Html.hs @@ -3,6 +3,7 @@ module Hakyll.Web.Html ( -- * Generic withTags + , withTagList -- * Headers , demoteHeaders @@ -36,8 +37,11 @@ import Network.URI (isUnreserved, escapeURIString) -------------------------------------------------------------------------------- -- | Map over all tags in the document withTags :: (TS.Tag String -> TS.Tag String) -> String -> String -withTags f = renderTags' . map f . parseTags' +withTags = withTagList . map +-- | Map over all tags (as list) in the document +withTagList :: ([TS.Tag String] -> [TS.Tag String]) -> String -> String +withTagList f = renderTags' . f . parseTags' -------------------------------------------------------------------------------- -- | Map every @h1@ to an @h2@, @h2@ to @h3@, etc. |