diff options
| author | Liam Murphy <liampm32@gmail.com> | 2023-07-18 00:08:19 +1000 |
|---|---|---|
| committer | GitHub <noreply@github.com> | 2023-07-17 16:08:19 +0200 |
| commit | e0e797c27d4eff3fbca2a182aee2700f20ed6c21 (patch) | |
| tree | 1a680869ae778b3e2bd9b0c61d3470553116a0ff /crates | |
| parent | c98c3d1a38d7cdc7fe219cfe8ca9c88cb0609aa8 (diff) | |
Classify `dots.c`, `dots.down`, `dots.up` and `dots.v` as normal (#1726)
Fixes #713. They were previously classified by Unicode as relations, which caused a '+' sign after one of them to be treated as a unary operator rather than a binary operator. This PR overrides the Unicode classification and classifies them as normal instead, which causes a '+' sign after one of them to be properly treated as a binary operator.
Diffstat (limited to 'crates')
| -rw-r--r-- | crates/typst-library/src/math/fragment.rs | 1 |
1 files changed, 1 insertions, 0 deletions
diff --git a/crates/typst-library/src/math/fragment.rs b/crates/typst-library/src/math/fragment.rs index 1a90eaad..85fdf6a6 100644 --- a/crates/typst-library/src/math/fragment.rs +++ b/crates/typst-library/src/math/fragment.rs @@ -216,6 +216,7 @@ impl GlyphFragment { pub fn with_id(ctx: &MathContext, c: char, id: GlyphId, span: Span) -> Self { let class = match c { ':' => Some(MathClass::Relation), + '⋯' | '⋱' | '⋰' | '⋮' => Some(MathClass::Normal), _ => unicode_math_class::class(c), }; let mut fragment = Self { |
