aboutsummaryrefslogtreecommitdiff
path: root/src/Text/Pandoc/Writers
diff options
context:
space:
mode:
Diffstat (limited to 'src/Text/Pandoc/Writers')
-rw-r--r--src/Text/Pandoc/Writers/HTML.hs6
1 files changed, 4 insertions, 2 deletions
diff --git a/src/Text/Pandoc/Writers/HTML.hs b/src/Text/Pandoc/Writers/HTML.hs
index 3971b7740..f042bda21 100644
--- a/src/Text/Pandoc/Writers/HTML.hs
+++ b/src/Text/Pandoc/Writers/HTML.hs
@@ -998,13 +998,15 @@ inlineToHtml opts inline = do
(Span (id',classes,kvs) ils) ->
let spanLikeTag = case classes of
- [c] -> do
+ (c:_) -> do
let c' = T.pack c
guard (c' `Set.member` htmlSpanLikeElements)
pure $ customParent (textTag c')
_ -> Nothing
in case spanLikeTag of
- Just tag -> tag <$> inlineListToHtml opts ils
+ Just tag -> do
+ h <- inlineListToHtml opts ils
+ addAttrs opts (id',tail classes',kvs') $ tag h
Nothing -> do
h <- inlineListToHtml opts ils
addAttrs opts (id',classes',kvs') (H.span h)