Skip to content

Commit

Permalink
Merge pull request #13 from cdbizone/master
Browse files Browse the repository at this point in the history
fix(regExp): fix re to make it work with numbers in CellFilter as arguments
  • Loading branch information
Den-dp authored Feb 20, 2017
2 parents 423d159 + 9c31215 commit 13a566e
Show file tree
Hide file tree
Showing 2 changed files with 18 additions and 18 deletions.
32 changes: 16 additions & 16 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -6,22 +6,22 @@
"description": "The plugin ensures that the column width will be wide enough for showing the longest data of that column (or column name).",
"dependencies": {},
"devDependencies": {
"angular": "^1.5.6",
"angular-ui-grid": "^3.1.1",
"awesome-typescript-loader": "^0.17.0",
"commitizen": "^2.8.1",
"cross-env": "^1.0.8",
"cz-conventional-changelog": "^1.1.6",
"ghooks": "^1.2.1",
"jquery": "^2.2.4",
"lodash": "^3.10.1",
"ng-annotate-webpack-plugin": "^0.1.2",
"rimraf": "^2.5.2",
"semantic-release": "^4.3.5",
"typescript": "^1.8.10",
"typings": "^1.0.4",
"validate-commit-msg": "^2.6.1",
"webpack": "^1.13.1"
"angular": "~1.5.6",
"angular-ui-grid": "~3.1.1",
"awesome-typescript-loader": "~0.17.0",
"commitizen": "~2.8.1",
"cross-env": "~1.0.8",
"cz-conventional-changelog": "~1.1.6",
"ghooks": "~1.2.1",
"jquery": "~2.2.4",
"lodash": "~3.10.1",
"ng-annotate-webpack-plugin": "~0.1.2",
"rimraf": "~2.5.2",
"semantic-release": "~4.3.5",
"typescript": "~1.8.10",
"typings": "~1.0.4",
"validate-commit-msg": "~2.6.1",
"webpack": "~1.13.1"
},
"scripts": {
"prebuild": "typings install & rimraf dist build",
Expand Down
4 changes: 2 additions & 2 deletions src/UiGridAutoFitColumnsService.ts
Original file line number Diff line number Diff line change
Expand Up @@ -56,8 +56,8 @@ export class UiGridAutoFitColumnsService {
if (filter) {
value = filter(value);
} else {
// https://regex101.com/r/rC5eR5/3
const re = /([^:]*):["']([^:]*)["']:?([\s\S]+)?/;
// https://regex101.com/r/rC5eR5/2
const re = /([^:]*):([^:]*):?([\s\S]+)?/;
let matches;
if ((matches = re.exec(cellFilter)) !== null) {
value = this.$filter<IAnyFilterPredicateFunc>(matches[1])(value, matches[2], matches[3]);
Expand Down

0 comments on commit 13a566e

Please sign in to comment.