Skip to content

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

Merged
alexander-akait merged 1 commit into
masterfrom
issue-54
Aug 5, 2019
Merged

fix: better parse sci notation with + and -#55
alexander-akait merged 1 commit into
masterfrom
issue-54

Conversation

@alexander-akait

Copy link
Copy Markdown
Collaborator

fix #54

/cc @TrySound

Comment thread test/unit.js Outdated
},
{
fixture: "1.1e--++1e",
expected: { number: "1.1e-", unit: "-++1e" }

Copy link
Copy Markdown
Member

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
Copy Markdown
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 -

@alexander-akait alexander-akait Aug 5, 2019

Copy link
Copy Markdown
Collaborator Author

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
Copy Markdown
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
Copy Markdown
Collaborator Author

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

@TrySound

TrySound commented Aug 5, 2019

Copy link
Copy Markdown
Member

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

@alexander-akait

Copy link
Copy Markdown
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