;; Dmitry Gutov <dgutov@yandex.ru>
;; URL: https://github.com/mooz/js2-mode/
;; http://code.google.com/p/js2-mode/
-;; Version: 20130228
+;; Version: 20130307
;; Keywords: languages, javascript
;; Package-Requires: ((emacs "24.1"))
(or (eq (char-before) ?,)
(and (not (eq (char-before) ?\;))
(and
- (prog2 (skip-chars-backward "[[:punct:]]")
+ (prog2 (skip-syntax-backward ".")
(looking-at js2-indent-operator-re)
(js2-backward-sws))
(not (eq (char-before) ?\;))))
(insert (replace-regexp-in-string "^ *" "" s))
(js2-mode)
(indent-region (point-min) (point-max))
- (should (string= s (buffer-substring (point-min) (point)))))))
+ (should (string= s (buffer-substring-no-properties
+ (point-min) (point)))))))
(defmacro* js2-deftest-indent (name content &key bind)
`(ert-deftest ,name ()
"var foo = 100500 /
| 16;")
+(js2-deftest-indent no-multiline-decl-with-operator-inside-string
+ "var foo = bar('/protocols/')
+ |baz()")
+
(js2-deftest-indent no-multiline-decl-implicit-semicolon
"var foo = 100500
|1")