summaryrefslogtreecommitdiff
path: root/crates
diff options
context:
space:
mode:
Diffstat (limited to 'crates')
-rw-r--r--crates/typst/src/text/smartquote.rs8
1 files changed, 6 insertions, 2 deletions
diff --git a/crates/typst/src/text/smartquote.rs b/crates/typst/src/text/smartquote.rs
index 0bcccf41..9b48c03a 100644
--- a/crates/typst/src/text/smartquote.rs
+++ b/crates/typst/src/text/smartquote.rs
@@ -207,8 +207,8 @@ impl<'s> SmartQuotes<'s> {
/// Currently, the supported languages are: English, Czech, Danish, German,
/// Swiss / Liechtensteinian German, Estonian, Icelandic, Italian, Latin,
/// Lithuanian, Latvian, Slovak, Slovenian, Spanish, Bosnian, Finnish,
- /// Swedish, French, Hungarian, Polish, Romanian, Japanese, Traditional
- /// Chinese, Russian, Norwegian, and Hebrew.
+ /// Swedish, French, Swiss French, Hungarian, Polish, Romanian, Japanese,
+ /// Traditional Chinese, Russian, Norwegian, and Hebrew.
///
/// For unknown languages, the English quotes are used as fallback.
pub fn get(
@@ -227,6 +227,10 @@ impl<'s> SmartQuotes<'s> {
false => ("‹", "›", "«", "»"),
true => low_high,
},
+ "fr" if matches!(region, Some("CH")) => match alternative {
+ false => ("‹\u{202F}", "\u{202F}›", "«\u{202F}", "\u{202F}»"),
+ true => default,
+ },
"cs" | "da" | "de" | "sk" | "sl" if alternative => ("›", "‹", "»", "«"),
"cs" | "de" | "et" | "is" | "lt" | "lv" | "sk" | "sl" => low_high,
"da" => ("‘", "’", "“", "”"),