Skip to content

fix: better parse sci notation with + and - #55

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

Merged
merged 1 commit into from
Aug 5, 2019
Merged

Conversation

alexander-akait
Copy link
Collaborator

fix #54

/cc @TrySound

test/unit.js Outdated
},
{
fixture: "1.1e--++1e",
expected: { number: "1.1e-", unit: "-++1e" }
Copy link
Owner

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Is this valid number?

Copy link
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@TrySound no, we already stop parsing for second e, so i use same logic for + and -

Copy link
Collaborator Author

@alexander-akait alexander-akait Aug 5, 2019

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Our fixtures contain:

{
    fixture: "2.",
    expected: { number: "2.", unit: "" }
  },

2. is not valid number too 😄 (in css)

@alexander-akait
Copy link
Collaborator Author

/cc @TrySound my mistake

@alexander-akait alexander-akait merged commit 9ee9aaa into master Aug 5, 2019
@alexander-akait alexander-akait deleted the issue-54 branch August 5, 2019 14:54
@alexander-akait
Copy link
Collaborator Author

/cc @TrySound should we fix 2.px? Because it is invalid number for css

@TrySound
Copy link
Owner

TrySound commented Aug 5, 2019

Yep. Looks like it's the wrong case. Don't really remember why I added it.

@alexander-akait
Copy link
Collaborator Author

@TrySound 👍 i will send a PR

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

invalid unit for 10e-1px
2 participants