diff --git a/README.md b/README.md index 23c12d17..54fe3f7f 100644 --- a/README.md +++ b/README.md @@ -27,14 +27,15 @@ angular.module('myApp', ['ngTasty']); ## Development -For running the dev enviroment you just need install +For running the dev environment you just need install all the dependencies by `npm`, the [node package manager][npm-site]. ``` +npm install -g gulp npm install ``` -Run dev enviroment, it's a watch script with several task running +Run dev environment, it's a watch script with several task running like jshint, html2js, build and unit test on the js build files. ``` gulp build @@ -43,7 +44,7 @@ gulp watch #### Run demo app -We have preconfigured the demo with a simple development web server. +We have pre-configured the demo with a simple development web server. The simplest way to start this server is: ``` diff --git a/src/filter/slugify.js b/src/filter/slugify.js index d878b699..1a5f8995 100644 --- a/src/filter/slugify.js +++ b/src/filter/slugify.js @@ -20,19 +20,9 @@ angular.module('ngTasty.filter.slugify', []) return '' + object; }; - var defaultToWhiteSpace = function (characters) { - if (characters == null) { - return '\\s'; - } else if (characters.source) { - return characters.source; - } else { - return '[' + characters.replace(/([.*+?^=!:${}()|[\]\/\\])/g, '\\$1') + ']'; - } - }; - var from = 'ąàáäâãåæăćčĉęèéëêĝĥìíïîĵłľńňòóöőôõðøśșšŝťțŭùúüűûñÿýçżźž', to = 'aaaaaaaaaccceeeeeghiiiijllnnoooooooossssttuuuuuunyyczzz', - regex = new RegExp(defaultToWhiteSpace(from), 'g'); + regex = new RegExp('[' + from + ']', 'g'); return function (str) { str = makeString(str)