aboutsummaryrefslogtreecommitdiff
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
parent14a410ed6e68143c9ec282d8a314bdb4533a226d (diff)
Handle index entries.
-rw-r--r--cabal.project2
-rw-r--r--src/Text/Pandoc/Readers/AsciiDoc.hs4
-rw-r--r--stack.yaml2
3 files changed, 6 insertions, 2 deletions
diff --git a/cabal.project b/cabal.project
index a04262693..68eb6d0e8 100644
--- a/cabal.project
+++ b/cabal.project
@@ -30,4 +30,4 @@ source-repository-package
source-repository-package
type: git
location: https://github.com/jgm/asciidoc-hs.git
- tag: 3ab89ea03c53f60423759878bb70ea4b3b1986fa
+ tag: 3726f94dbe8bc061ace9030de71124000c593aed
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
diff --git a/stack.yaml b/stack.yaml
index f2876892f..7a3878d4e 100644
--- a/stack.yaml
+++ b/stack.yaml
@@ -23,7 +23,7 @@ extra-deps:
- git: https://github.com/jgm/djoths.git
commit: 7dc8da53fc092d2d4d91f5f0988840f4faf90368
- git: https://github.com/jgm/asciidoc-hs.git
- commit: 3ab89ea03c53f60423759878bb70ea4b3b1986fa
+ commit: 3726f94dbe8bc061ace9030de71124000c593aed
ghc-options:
"$locals": -fhide-source-paths -Wno-missing-home-modules
resolver: lts-24.20