diff options
-rw-r--r-- | cabal.project | 2 | ||||
-rw-r--r-- | src/Text/Pandoc/Citeproc.hs | 7 | ||||
-rw-r--r-- | stack.yaml | 2 | ||||
-rw-r--r-- | test/command/citeproc-87.md | 16 |
4 files changed, 24 insertions, 3 deletions
diff --git a/cabal.project b/cabal.project index c5090838c..401992868 100644 --- a/cabal.project +++ b/cabal.project @@ -5,4 +5,4 @@ flags: +embed_data_files source-repository-package type: git location: https://github.com/jgm/citeproc.git - tag: 8b190eceb0cbbbf2d436bab9a5891a31be0c9865 + tag: 8d03cb722fac3ea8f17f432ac20abe35361df551 diff --git a/src/Text/Pandoc/Citeproc.hs b/src/Text/Pandoc/Citeproc.hs index bfd108655..0f007f336 100644 --- a/src/Text/Pandoc/Citeproc.hs +++ b/src/Text/Pandoc/Citeproc.hs @@ -103,10 +103,15 @@ processCitations (Pandoc meta bs) = do else id) . evalState (walkM insertResolvedCitations $ Pandoc meta' bs) $ cits - return $ Pandoc meta'' + return $ walk removeQuoteSpan + $ Pandoc meta'' $ insertRefs refkvs classes meta'' (walk fixLinks $ B.toList bibs) bs' +removeQuoteSpan :: Inline -> Inline +removeQuoteSpan (Span ("",["csl-quoted"],[]) xs) = Span nullAttr xs +removeQuoteSpan x = x + -- | Retrieve the CSL style specified by the csl or citation-style -- metadata field in a pandoc document, or the default CSL style -- if none is specified. Retrieve the parent style diff --git a/stack.yaml b/stack.yaml index 1bad8cc59..ef92855c1 100644 --- a/stack.yaml +++ b/stack.yaml @@ -14,7 +14,7 @@ extra-deps: - doctemplates-0.10 # - citeproc-0.4.1 - git: https://github.com/jgm/citeproc.git - commit: 8b190eceb0cbbbf2d436bab9a5891a31be0c9865 + commit: 8d03cb722fac3ea8f17f432ac20abe35361df551 ghc-options: "$locals": -fhide-source-paths -Wno-missing-home-modules resolver: lts-18.0 diff --git a/test/command/citeproc-87.md b/test/command/citeproc-87.md new file mode 100644 index 000000000..42cf7a6ee --- /dev/null +++ b/test/command/citeproc-87.md @@ -0,0 +1,16 @@ +``` +% pandoc --citeproc -Mlang=it-IT -t markdown-citations +Foo [@a 50: «Disse: "bar"»]. «Disse: "baz"» + +--- +suppress-bibliography: true +references: +- id: a + author: + - literal: Aristotele + title: Metafisica + type: book +... +^D +Foo (Aristotele, s.d., 50: «Disse: "bar"»). «Disse: "baz"» +``` |