diff options
| author | Malo <57839069+MDLC01@users.noreply.github.com> | 2025-02-24 17:15:17 +0100 |
|---|---|---|
| committer | GitHub <noreply@github.com> | 2025-02-24 16:15:17 +0000 |
| commit | 3744c99b07f97a954a8468bef5fdb08c5c7914d7 (patch) | |
| tree | 8e36604caffb0395a616b7d6889407f896851d57 /crates/typst-utils/src | |
| parent | 81efc82d3c0f7ccbcb40959ac8bddeca49e4c9f8 (diff) | |
Override the default math class of some characters (#5949)
Diffstat (limited to 'crates/typst-utils/src')
| -rw-r--r-- | crates/typst-utils/src/lib.rs | 15 |
1 files changed, 15 insertions, 0 deletions
diff --git a/crates/typst-utils/src/lib.rs b/crates/typst-utils/src/lib.rs index 34d6a943..b346a809 100644 --- a/crates/typst-utils/src/lib.rs +++ b/crates/typst-utils/src/lib.rs @@ -360,6 +360,21 @@ pub fn default_math_class(c: char) -> Option<MathClass> { // https://github.com/typst/typst/pull/5714 '\u{22A5}' => Some(MathClass::Normal), + // Used as a binary connector in linear logic, where it is referred to + // as "par". + // https://github.com/typst/typst/issues/5764 + '⅋' => Some(MathClass::Binary), + + // Those overrides should become the default in the next revision of + // MathClass.txt. + // https://github.com/typst/typst/issues/5764#issuecomment-2632435247 + '⎰' | '⟅' => Some(MathClass::Opening), + '⎱' | '⟆' => Some(MathClass::Closing), + + // Both ∨ and ⟑ are classified as Binary. + // https://github.com/typst/typst/issues/5764 + '⟇' => Some(MathClass::Binary), + c => unicode_math_class::class(c), } } |
