aboutsummaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorJohn MacFarlane <[email protected]>2025-11-27 16:47:43 +0100
committerJohn MacFarlane <[email protected]>2025-11-27 16:47:43 +0100
commita3a3068ba59c8f8de44a99b68f73e04146d8f5f0 (patch)
tree74e16b75e0748454ce4a6a90b6b815cfee4ffdaa /src
parent14a410ed6e68143c9ec282d8a314bdb4533a226d (diff)
Handle index entries.
Diffstat (limited to 'src')
-rw-r--r--src/Text/Pandoc/Readers/AsciiDoc.hs4
1 files changed, 4 insertions, 0 deletions
diff --git a/src/Text/Pandoc/Readers/AsciiDoc.hs b/src/Text/Pandoc/Readers/AsciiDoc.hs
index ab6938dd5..580fa4246 100644
--- a/src/Text/Pandoc/Readers/AsciiDoc.hs
+++ b/src/Text/Pandoc/Readers/AsciiDoc.hs
@@ -389,6 +389,10 @@ doInline (A.Inline (A.Attr _ps kvs') it) = do
A.AttributeReference (A.AttributeName t) -> -- if this is here, it's unresolved
pure $ B.str ("{" <> t <> "}")
A.Span ils -> B.spanWith B.nullAttr <$> doInlines ils
+ A.IndexEntry (A.TermInText t) ->
+ pure $ B.spanWith ("",["index"],[("term",t)]) (B.text t)
+ A.IndexEntry (A.TermConcealed ts) ->
+ pure $ B.spanWith ("",["index"],[("term",T.intercalate "," ts)]) mempty
-- Passthrough is hard to get right, because pandoc's RawInline needs
-- a format specifier. Often in asciidoc passthrough is used as a form
-- of escaping, so the best approach seems to be treating it as HTML