mirror of https://github.com/stelzo/typst.git
Fix smartquotes after inline equations (#5149)
This commit is contained in:
parent
037c0c8216
commit
7a96c86487
|
|
@ -131,9 +131,12 @@ impl SmartQuoter {
|
|||
}
|
||||
|
||||
// If we have a single smart quote, didn't recently open a single
|
||||
// quotation, and are after an alphabetic char, interpret this as an
|
||||
// apostrophe.
|
||||
if !double && opened != Some(false) && before.is_alphabetic() {
|
||||
// quotation, and are after an alphabetic char or an object (e.g. a
|
||||
// math equation), interpret this as an apostrophe.
|
||||
if !double
|
||||
&& opened != Some(false)
|
||||
&& (before.is_alphabetic() || before == '\u{FFFC}')
|
||||
{
|
||||
return "’";
|
||||
}
|
||||
|
||||
|
|
|
|||
Binary file not shown.
|
After Width: | Height: | Size: 240 B |
|
|
@ -165,3 +165,6 @@ Some people's thought on this would be #[#set smartquote(enabled: false); "stran
|
|||
|
||||
"test"\
|
||||
"test"
|
||||
|
||||
--- issue-5146-smartquotes-after-equations ---
|
||||
$i$'s $i$ 's
|
||||
|
|
|
|||
Loading…
Reference in New Issue