josdejong / josdejong/mathjs

unit("m ^ (1)") throws an error

Open
#3,620 6 comments 0 reactions 0 assignees View on GitHub
question
Dominant language
JavaScript
Stars
15.1k
Forks
1.3k
PR merge metrics
No merged PRs in 30d

Description

The issues section is used only for bug reports. Please use the [Discussions](https://github.com/josdejong/mathjs/discussions) section to ask questions and share ideas and suggestions.

**Describe the bug**
wrapping the power in brackets brakes `unit()` parser

**To Reproduce**
- try `unit("m ^ (1)")`

will throw:

`SyntaxError: In "km ^ (1)", "^" must be followed by a floating-point number
`

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.