diff options
| author | John MacFarlane <[email protected]> | 2025-08-12 22:42:54 -0700 |
|---|---|---|
| committer | John MacFarlane <[email protected]> | 2025-08-12 22:43:27 -0700 |
| commit | a6a5be132a5aa53f9744850f33a52e25aecf2628 (patch) | |
| tree | 6ee84e998237464bd2b70e38ef9c35cd03ed3bcd /src | |
| parent | a36654b22286c0459fb4d7d354c865da23d6061f (diff) | |
Typst writer: add parens around typst-native year-only citations.
Closes #11044.
Diffstat (limited to 'src')
| -rw-r--r-- | src/Text/Pandoc/Writers/Typst.hs | 5 |
1 files changed, 4 insertions, 1 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 |
