feat: recognize dedicated minus sign
> 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
This commit is contained in:
parent
6e141a0132
commit
431ea5b67e
1 changed files with 1 additions and 1 deletions
|
|
@ -22,7 +22,7 @@ impl TryFrom<char> for Operator {
|
||||||
fn try_from(value: char) -> Result<Self, Self::Error> {
|
fn try_from(value: char) -> Result<Self, Self::Error> {
|
||||||
match value {
|
match value {
|
||||||
'+' => Ok(Self::Plus),
|
'+' => Ok(Self::Plus),
|
||||||
'-' => Ok(Self::Minus),
|
'-' | '−' => Ok(Self::Minus),
|
||||||
'*' | '×' => Ok(Self::Mult),
|
'*' | '×' => Ok(Self::Mult),
|
||||||
'/' | '÷' => Ok(Self::Div),
|
'/' | '÷' => Ok(Self::Div),
|
||||||
'^' => Ok(Self::Exp),
|
'^' => Ok(Self::Exp),
|
||||||
|
|
|
||||||
Loading…
Reference in a new issue