File tree 1 file changed +10
-3
lines changed 1 file changed +10
-3
lines changed Original file line number Diff line number Diff line change @@ -701,6 +701,10 @@ instance HasMeta DBState where
701
701
setMeta field v s = s {dbMeta = setMeta field v (dbMeta s)}
702
702
deleteMeta field s = s {dbMeta = deleteMeta field (dbMeta s)}
703
703
704
+ isEmphElement :: Inline -> Bool
705
+ isEmphElement (Emph _) = True
706
+ isEmphElement _ = False
707
+
704
708
isBlockElement :: Content -> Bool
705
709
isBlockElement (Elem e) = qName (elName e) `Set.member` blockTags
706
710
isBlockElement _ = False
@@ -1334,9 +1338,12 @@ parseInline (Elem e) = do
1334
1338
-- <?asciidor-br?> to in handleInstructions, above.
1335
1339
" pi-asciidoc-br" -> return linebreak
1336
1340
_ -> skip >> innerInlines id
1337
- return $ case qName (elName e) of
1338
- " emphasis" -> parsedInline
1339
- _ -> addPandocAttributes (getRoleAttr e) parsedInline
1341
+ return $ if qName (elName e) == " emphasis" then do
1342
+ let inlineElement = e :: Inline
1343
+ if not (isEmphElement inlineElement)
1344
+ then addPandocAttributes (getRoleAttr e) parsedInline
1345
+ else parsedInline
1346
+ else parsedInline
1340
1347
where skip = do
1341
1348
let qn = qName $ elName e
1342
1349
let name = if " pi-" `T.isPrefixOf` qn
You can’t perform that action at this time.
0 commit comments