From 5e4facea446e8743c106f924ad1968b2f946f087 Mon Sep 17 00:00:00 2001 From: nightwing Date: Sun, 11 Jan 2015 22:23:25 +0400 Subject: [PATCH] fix livescript highlighting --- lib/ace/mode/livescript.js | 13 +++++-------- tool/update_deps.js | 4 ++++ 2 files changed, 9 insertions(+), 8 deletions(-) diff --git a/lib/ace/mode/livescript.js b/lib/ace/mode/livescript.js index d692a6d3..d8330791 100644 --- a/lib/ace/mode/livescript.js +++ b/lib/ace/mode/livescript.js @@ -52,8 +52,7 @@ define(function(require, exports, module){ }(require('../mode/text').Mode)); keywordend = '(?![$\\w]|-[A-Za-z]|\\s*:(?![:=]))'; stringfill = { - token: 'string', - regex: '.+' + defaultToken: 'string' }; LiveScriptMode.Rules = { start: [ @@ -146,7 +145,7 @@ define(function(require, exports, module){ next: 'key' }, { token: 'keyword.operator', - regex: '\\S+' + regex: '[\\^!|&%+\\-]+' }, { token: 'text', regex: '\\s+' @@ -164,8 +163,7 @@ define(function(require, exports, module){ token: 'comment.regex', regex: '\\s+(?:#.*)?' }, { - token: 'string.regex', - regex: '\\S+' + defaultToken: 'string.regex' } ], key: [ @@ -178,7 +176,7 @@ define(function(require, exports, module){ next: 'start' }, { token: 'text', - regex: '.', + regex: '', next: 'start' } ], @@ -188,8 +186,7 @@ define(function(require, exports, module){ regex: '.*?\\*/', next: 'start' }, { - token: 'comment.doc', - regex: '.+' + defaultToken: 'comment.doc' } ], qdoc: [ diff --git a/tool/update_deps.js b/tool/update_deps.js index 09ea8766..d02581ae 100644 --- a/tool/update_deps.js +++ b/tool/update_deps.js @@ -135,6 +135,10 @@ var deps = { }); } }, + liveScript: { + path: "mode/livescript.js", + url: "https://raw.githubusercontent.com/gkz/LiveScript/master/lib/mode-ls.js" + }, coffee: { fetch: function(){ var rootHref = "https://raw.github.com/jashkenas/coffee-script/master/";