-
Notifications
You must be signed in to change notification settings - Fork 754
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
Percent sign breaks text sorting #67
Comments
Hi MelTraX! Combining The format function does need some changes:
I was thinking about just changing the percent parser to the following, it seems to work, but then again I know you're using a different numerical format: ts.addParser({
id: "percent",
is: function(s) {
return (/\d%\)?$/).test(s);
},
format: function(s, table) {
return ts.formatFloat(s.replace(/%/g, ""), table);
},
type: "numeric"
}); |
I went ahead and made the above change to the percent parser in version 2.3.2. Please let me know if you run into any problems with it! Thanks! |
This should now be resolved, so I'm going to go ahead and close this issue. If you continue to have problems, please feel free to reopen this issue. Thanks! |
Example: http://jsfiddle.net/CuHbQ/1/
And yes, this is a real life example apart from changed names. :D
I changed my parser to this:
Kinda combining
currency
andpercent
but that's probably not how you want to do it. :DI need auto-detection of German and English numbers and luckily I don't have delimiters for thousands. I'll probably even combine
percent
,currency
anddigit
.The text was updated successfully, but these errors were encountered: