From 5dc0b60e6f607fada3d72566dcd1ca4cbfe14c4d Mon Sep 17 00:00:00 2001 From: Oleg Grenrus Date: Fri, 14 Jul 2017 17:38:10 +0300 Subject: Add withTagList --- lib/Hakyll/Web/Html.hs | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) (limited to 'lib/Hakyll/Web/Html.hs') 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. -- cgit v1.2.3