diff options
| -rw-r--r-- | src/Text/Pandoc/Writers/Typst.hs | 5 | ||||
| -rw-r--r-- | test/command/9452.md | 2 |
2 files changed, 5 insertions, 2 deletions
diff --git a/src/Text/Pandoc/Writers/Typst.hs b/src/Text/Pandoc/Writers/Typst.hs index 7fd7e1cf6..a5cdbc483 100644 --- a/src/Text/Pandoc/Writers/Typst.hs +++ b/src/Text/Pandoc/Writers/Typst.hs @@ -617,7 +617,10 @@ toCite cite = do [] -> pure mempty suff -> (", supplement: " <>) . brackets <$> inlinesToTypst (eatComma suff) - pure $ "#cite" <> parens (label <> form <> suppl) <> endCode + pure $ (if citationMode cite == SuppressAuthor -- see #11044 + then parens + else id) + $ "#cite" <> parens (label <> form <> suppl) <> endCode doubleQuoted :: Text -> Doc Text doubleQuoted = doubleQuotes . literal . escape diff --git a/test/command/9452.md b/test/command/9452.md index 12143d6e5..b3d60fca9 100644 --- a/test/command/9452.md +++ b/test/command/9452.md @@ -14,6 +14,6 @@ Here is a sentence @something2024. With supplement @something2024[p.~3]. -And just the year #cite(<something2024>, form: "year");. +And just the year (#cite(<something2024>, form: "year");). ``` |
