From 8820a00beb08b7253a99a7cf66bb752cd181bb03 Mon Sep 17 00:00:00 2001 From: 3w36zj6 <52315048+3w36zj6@users.noreply.github.com> Date: Mon, 3 Mar 2025 20:50:47 +0900 Subject: [PATCH] Respect `quotes: false` in inline quote (#5991) Co-authored-by: Laurenz --- crates/typst-library/src/model/quote.rs | 2 +- .../ref/issue-5536-quote-inline-quotes-false.png | Bin 0 -> 389 bytes tests/suite/model/quote.typ | 3 +++ 3 files changed, 4 insertions(+), 1 deletion(-) create mode 100644 tests/ref/issue-5536-quote-inline-quotes-false.png diff --git a/crates/typst-library/src/model/quote.rs b/crates/typst-library/src/model/quote.rs index 919ab12c7..cd45eec8e 100644 --- a/crates/typst-library/src/model/quote.rs +++ b/crates/typst-library/src/model/quote.rs @@ -161,7 +161,7 @@ impl Show for Packed { let block = self.block(styles); let html = TargetElem::target_in(styles).is_html(); - if self.quotes(styles) == Smart::Custom(true) || !block { + if self.quotes(styles).unwrap_or(!block) { let quotes = SmartQuotes::get( SmartQuoteElem::quotes_in(styles), TextElem::lang_in(styles), diff --git a/tests/ref/issue-5536-quote-inline-quotes-false.png b/tests/ref/issue-5536-quote-inline-quotes-false.png new file mode 100644 index 0000000000000000000000000000000000000000..e7b29d7120b74fd980a69fb8ee6139efd8e8b88c GIT binary patch literal 389 zcmV;00eb$4P)ONM)uhjEBn0gdOb&EAX z#FoiDuO9`jFZe%q@y6$2yDO$F%DM~`{yt^8?E9Y`bLWFBzS}nO7-U9}8)bamw+aHC2;>7#r+*#BL>OT_y|75>3{%|Gn zzt^q*i!%N{{vUoG=$d_5K*{`>-}Em{srX-b_@?iFr&Ir}e@&k7|NkMXSiB-