Add auto-indent in CoffeeScript for if, for, while, and loop statements.
This commit is contained in:
parent
6c235fee7d
commit
88829fbee7
1 changed files with 1 additions and 1 deletions
|
|
@ -50,7 +50,7 @@ oop.inherits(Mode, TextMode);
|
||||||
|
|
||||||
(function() {
|
(function() {
|
||||||
|
|
||||||
var indenter = /(?:[({[=:]|[-=]>|\b(?:else|switch|try|catch(?:\s*[$A-Za-z_\x7f-\uffff][$\w\x7f-\uffff]*)?|finally))\s*$/;
|
var indenter = /(?:[({[=:]|[-=]>|\b(?:else|switch|try|catch(?:\s*[$A-Za-z_\x7f-\uffff][$\w\x7f-\uffff]*)?|finally))\s*$|^\s*(else\b\s*)?(?:if|for|while|loop)\b(?!.*\bthen\b)/;
|
||||||
var commentLine = /^(\s*)#/;
|
var commentLine = /^(\s*)#/;
|
||||||
var hereComment = /^\s*###(?!#)/;
|
var hereComment = /^\s*###(?!#)/;
|
||||||
var indentation = /^\s*/;
|
var indentation = /^\s*/;
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue