Permalink
Browse files

Merge Disable caret positioning on resetPattern #30

2 parents 04c64dd + c42d4a5 commit 56be36bf0ddb487b947ea10299091c2a9b5694e5 @jaridmargolin jaridmargolin committed Mar 3, 2014
Showing with 38 additions and 30 deletions.
  1. +4 −9 Makefile
  2. +1 −0 lib/formatter.js
  3. +1 −1 lib/formatter.min.js
  4. +1 −0 lib/jquery.formatter.js
  5. +1 −1 lib/jquery.formatter.min.js
  6. +9 −9 package.json
  7. +11 −10 src/formatter.js
  8. +10 −0 test/formatter.js
View
@@ -1,11 +1,6 @@
-MOCHA_OPTS= --check-leaks
-REPORTER = spec
-
test:
- @NODE_ENV=test ./node_modules/.bin/mocha \
- --reporter $(REPORTER) \
- $(MOCHA_OPTS) && \
- grunt uglify concat && \
- grunt jshint
+ @NODE_ENV=test grunt uglify concat && \
+ grunt jshint && \
+ ./node_modules/.bin/mocha --reporter spec --check-leaks
-.PHONY: test
+.PHONY: test
View
@@ -105,6 +105,7 @@ Formatter.addInptType = function (chr, reg) {
//
Formatter.prototype.resetPattern = function (str) {
// Update opts to hold new pattern
+ str = str || this.opts.pattern;
this.opts.pattern = str;
// Get current state
View

Some generated files are not rendered by default. Learn more.

Oops, something went wrong.
View
@@ -101,6 +101,7 @@ Formatter.addInptType = function (chr, reg) {
//
Formatter.prototype.resetPattern = function (str) {
// Update opts to hold new pattern
+ str = str || this.opts.pattern;
this.opts.pattern = str;
// Get current state
Oops, something went wrong.

0 comments on commit 56be36b

Please sign in to comment.