aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorWout Gevaert <[email protected]>2022-11-10 22:53:20 +0100
committerJohn MacFarlane <[email protected]>2022-11-11 10:12:07 -0800
commit323be80838bafaa2bb3fabc8b83106ae876e9538 (patch)
treefa4f1cf61cdeca3a85fb04e02a919819267567a1
parente9d2ceb9bda7e470b15fa0b116452057545daab5 (diff)
Use 'literal tag' instead of 'text (T.unpack tag)' in tagWithAttrs
-rw-r--r--src/Text/Pandoc/Writers/Shared.hs4
1 files changed, 2 insertions, 2 deletions
diff --git a/src/Text/Pandoc/Writers/Shared.hs b/src/Text/Pandoc/Writers/Shared.hs
index 1af0f7e9f..65dcec786 100644
--- a/src/Text/Pandoc/Writers/Shared.hs
+++ b/src/Text/Pandoc/Writers/Shared.hs
@@ -172,8 +172,8 @@ getLang opts meta =
_ -> Nothing
-- | Produce an HTML tag with the given pandoc attributes.
-tagWithAttrs :: HasChars a => Text -> Attr -> Doc a
-tagWithAttrs tag attr = "<" <> text (T.unpack tag) <> (htmlAttrs attr) <> ">"
+tagWithAttrs :: HasChars a => a -> Attr -> Doc a
+tagWithAttrs tag attr = "<" <> literal tag <> (htmlAttrs attr) <> ">"
-- | Produce HTML for the given pandoc attributes, to be used in HTML tags
htmlAttrs :: HasChars a => Attr -> Doc a