From 431ea5b67e5e360c4b767ce8adba0f38a7ceffac Mon Sep 17 00:00:00 2001 From: electria Date: Tue, 21 Jul 2026 14:23:37 -0700 Subject: [PATCH] feat: recognize dedicated minus sign MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit > As per Unicode 17.0.0, the ASCII hyphen-minus is not a mathematical symbol. To express the minus sign in math, U+2212 − MINUS SIGN is used instead. https://en.wikipedia.org/wiki/Mathematical_operators_and_symbols_in_Unicode#cite_ref-7 --- src/nodes/from_str.rs | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/nodes/from_str.rs b/src/nodes/from_str.rs index ba94dfa..f07f99f 100644 --- a/src/nodes/from_str.rs +++ b/src/nodes/from_str.rs @@ -22,7 +22,7 @@ impl TryFrom for Operator { fn try_from(value: char) -> Result { match value { '+' => Ok(Self::Plus), - '-' => Ok(Self::Minus), + '-' | '−' => Ok(Self::Minus), '*' | '×' => Ok(Self::Mult), '/' | '÷' => Ok(Self::Div), '^' => Ok(Self::Exp),