summaryrefslogtreecommitdiff
path: root/test/manual/indent/js.js
diff options
context:
space:
mode:
authorDmitry Gutov <dgutov@yandex.ru>2017-04-13 03:50:41 +0300
committerDmitry Gutov <dgutov@yandex.ru>2017-04-13 03:50:41 +0300
commit6354e3c3368d99fad755d4dbd7c872ce1280f005 (patch)
tree59a6f7279c027da215dc0e57d10d48fcbfb9c93d /test/manual/indent/js.js
parent2e4f4c9d48c563ff8bec102b66da0225587786c6 (diff)
downloademacs-6354e3c3368d99fad755d4dbd7c872ce1280f005.tar.gz
emacs-6354e3c3368d99fad755d4dbd7c872ce1280f005.tar.bz2
emacs-6354e3c3368d99fad755d4dbd7c872ce1280f005.zip
Handle indentation of nested ternary operators in JS
* lisp/progmodes/js.el (js--looking-at-operator-p): Handle nested ternary operators.
Diffstat (limited to 'test/manual/indent/js.js')
-rw-r--r--test/manual/indent/js.js7
1 files changed, 7 insertions, 0 deletions
diff --git a/test/manual/indent/js.js b/test/manual/indent/js.js
index 846c3a1a5c2..1ad76a83e18 100644
--- a/test/manual/indent/js.js
+++ b/test/manual/indent/js.js
@@ -128,6 +128,13 @@ if (x > 72 &&
let x = svg.mumble()
.zzz;
+// https://github.com/mooz/js2-mode/issues/405
+if (1) {
+ isSet
+ ? (isEmpty ? 2 : 3)
+ : 4
+}
+
// Local Variables:
// indent-tabs-mode: nil
// js-indent-level: 2