diff options
| author | Dmitry Gutov | 2017-04-13 03:50:41 +0300 |
|---|---|---|
| committer | Dmitry Gutov | 2017-04-13 03:50:41 +0300 |
| commit | 6354e3c3368d99fad755d4dbd7c872ce1280f005 (patch) | |
| tree | 59a6f7279c027da215dc0e57d10d48fcbfb9c93d /test | |
| parent | 2e4f4c9d48c563ff8bec102b66da0225587786c6 (diff) | |
| download | emacs-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.js | 7 |
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 && | |||
| 128 | let x = svg.mumble() | 128 | let x = svg.mumble() |
| 129 | .zzz; | 129 | .zzz; |
| 130 | 130 | ||
| 131 | // https://github.com/mooz/js2-mode/issues/405 | ||
| 132 | if (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 |