Skip to content

Malformed addition/subtraction don't get parsed as errors #28

Open
@bengolds

Description

@bengolds

If you're missing an argument, addition and subtraction parse inconsistently compared to multiplication and division.

parse('x * ') => [ 'Multiply', 'x', 'Missing' ]
parse('x + ') => 'x'                                       // should be [ 'Add', 'x', 'Missing' ]

parse('x / ') => [ 'Divide', 'x', 'Missing' ]
parse('x - ') => 'x'                                       // should be [ 'Subtract', 'x', 'Missing' ]

I'd be curious to know a bit more about the error-handling philosophy for parse. MathLive throws math-error events when it can't parse the latex (including the above four cases). Compute Engine seems to not throw any errors at all in parse. Is that intentional?

Metadata

Metadata

Assignees

Labels

bugSomething isn't working

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions