aboutsummaryrefslogtreecommitdiffstats
path: root/test
diff options
context:
space:
mode:
authorDmitry Gutov2017-04-13 03:50:41 +0300
committerDmitry Gutov2017-04-13 03:50:41 +0300
commit6354e3c3368d99fad755d4dbd7c872ce1280f005 (patch)
tree59a6f7279c027da215dc0e57d10d48fcbfb9c93d /test
parent2e4f4c9d48c563ff8bec102b66da0225587786c6 (diff)
downloademacs-6354e3c3368d99fad755d4dbd7c872ce1280f005.tar.gz
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')
-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 &&
128let x = svg.mumble() 128let x = svg.mumble()
129 .zzz; 129 .zzz;
130 130
131// https://github.com/mooz/js2-mode/issues/405
132if (1) {
133 isSet
134 ? (isEmpty ? 2 : 3)
135 : 4
136}
137
131// Local Variables: 138// Local Variables:
132// indent-tabs-mode: nil 139// indent-tabs-mode: nil
133// js-indent-level: 2 140// js-indent-level: 2