Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Decimal parsing inconsistency #119

Closed
wojciechczerniak opened this issue Jan 23, 2020 · 2 comments · Fixed by #166
Closed

Decimal parsing inconsistency #119

wojciechczerniak opened this issue Jan 23, 2020 · 2 comments · Fixed by #166
Labels
Bug Something isn't working

Comments

@wojciechczerniak
Copy link
Contributor

wojciechczerniak commented Jan 23, 2020

Description

Javascript allows omitting leading zero in decimals. If we add [".1"] as a const, the engine will parse it to a number. But when we use it inside a formula ["=0.1"] an error will occur.

Either we support this or not. We have to choose.

Steps to reproduce

    it('can or cant parse a decimal without leading zero', () => {
      const engine = createEngine([
        ['.1', '=.1']
      ]);

      expect(engine.getCellValue('A1')).toBe(0.1);
      expect(engine.getCellValue('B1')).toBe(0.1);
    });

Links

https://github.com/handsontable/formula-parser/issues/91

@wojciechczerniak wojciechczerniak added Bug Something isn't working Syntax labels Jan 23, 2020
@wojciechczerniak wojciechczerniak added this to the January 2020 milestone Jan 23, 2020
@wojciechczerniak
Copy link
Contributor Author

A user mentioned https://github.com/handsontable/formula-parser/issues/91#issuecomment-578122077 that it is supported in Excel Online and Libre Office. We should check that

@izulin izulin self-assigned this Feb 12, 2020
@izulin izulin mentioned this issue Feb 12, 2020
7 tasks
@izulin izulin linked a pull request Feb 13, 2020 that will close this issue
7 tasks
@izulin
Copy link
Collaborator

izulin commented Feb 14, 2020

solved #166

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Bug Something isn't working
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants