From 261e6cfc0533288f5816169192ec81be0cd7a2b0 Mon Sep 17 00:00:00 2001 From: nightwing Date: Tue, 28 May 2013 23:48:27 +0400 Subject: [PATCH] fix ruby unindent behavior fixes #1451 --- lib/ace/mode/ruby.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/lib/ace/mode/ruby.js b/lib/ace/mode/ruby.js index 1c6d63f6..073fa070 100644 --- a/lib/ace/mode/ruby.js +++ b/lib/ace/mode/ruby.js @@ -75,7 +75,7 @@ oop.inherits(Mode, TextMode); }; this.checkOutdent = function(state, line, input) { - return /\s+end$/.test(line + input) || /\s+}$/.test(line + input) || /\s+else$/.test(line + input); + return /^\s+end$/.test(line + input) || /^\s+}$/.test(line + input) || /^\s+else$/.test(line + input); }; this.autoOutdent = function(state, doc, row) {