Skip to content

making tablesorter size parser more robust #1234

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
Oct 18, 2016

Conversation

tulinkry
Copy link
Contributor

fixes #1221

@tulinkry tulinkry added this to the 0.13 milestone Oct 14, 2016
@tulinkry tulinkry self-assigned this Oct 14, 2016
var num = parts[1];
/*
* This correctly handles thousand separator
* in a big number (either ',' or ' ' or none)
Copy link
Member

Choose a reason for hiding this comment

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

I'd maybe add bunch of concrete examples.

Copy link
Contributor Author

Choose a reason for hiding this comment

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

I've added them

* This correctly handles thousand separator
* in a big number (either ',' or ' ' or none)
*/
var parts = s.match(/^((?:\d{1,3}(?:[, ]?\d{1,3})*(?:\.\d+)?|\.\d+)) ?(\w*)$/);
Copy link
Member

Choose a reason for hiding this comment

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

Seems like there is extra paren level ?

((?:\d{1,3}(?:[, ]?\d{1,3})*(?:\.\d+)?|\.\d+))
^^                                          ^^

@vladak
Copy link
Member

vladak commented Oct 14, 2016

Pls also create new issue to get this tested (#1233).

@tulinkry
Copy link
Contributor Author

Issue #1238

@vladak vladak merged commit 16e9af8 into oracle:master Oct 18, 2016
@tulinkry tulinkry deleted the tablesorter-fix branch October 27, 2016 10:28
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.

the tablesorter fails when the size of a file contains ","
2 participants