josdejong / josdejong/mathjs

Bad parse for adding percentages

Open
#3,563 7 comments 0 reactions 0 assignees View on GitHub
bug category:expressions
Dominant language
JavaScript
Stars
15.1k
Forks
1.3k
PR merge metrics
No merged PRs in 30d

Description

It turns out the expression `10% + 20%` is parsed right now as `10 % ((+20) / 100)` (so: the first `%` is interpreted as mod).

_Originally posted by @josdejong in https://github.com/josdejong/mathjs/discussions/2861#discussioncomment-14752338_

Contributor guide

Open the contributing guide

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.