From 0f9bcfbc7da5d553baa94c5ad79e3b1ac1d6017b Mon Sep 17 00:00:00 2001 From: Tim Caswell Date: Fri, 7 Feb 2014 13:05:43 -0600 Subject: [PATCH 1/2] Fix out-of-range error when parsing certain files. An example file that breaks on this is https://github.com/ajaxorg/ace-builds/blob/b2f8bf1e745250596afea5b39c70b94421af906d/kitchen-sink/demo.js#L1000 --- lib/ace/ext/whitespace.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/lib/ace/ext/whitespace.js b/lib/ace/ext/whitespace.js index cbbdbb43..583464ab 100644 --- a/lib/ace/ext/whitespace.js +++ b/lib/ace/ext/whitespace.js @@ -61,7 +61,7 @@ exports.$detectIndentation = function(lines, fallback) { prevSpaces = spaces; // ignore lines ending with backslash - while (line[line.length - 1] == "\\") + while (i < max && line[line.length - 1] == "\\") line = lines[i++]; } From a8ba1e06d9a33912dc195555ec1697a9a1f2240b Mon Sep 17 00:00:00 2001 From: Tim Caswell Date: Fri, 7 Feb 2014 13:08:35 -0600 Subject: [PATCH 2/2] Fix syntax error in kuroir.css This bad line was breaking my css parser. Workaround in my code: https://github.com/creationix/tedit-app/blob/079741c477e40a51010ee87d57635b677afb68e1/src/applytheme.js#L66-L67 --- lib/ace/theme/kuroir.css | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) diff --git a/lib/ace/theme/kuroir.css b/lib/ace/theme/kuroir.css index fe2ba302..9c0ba6a8 100644 --- a/lib/ace/theme/kuroir.css +++ b/lib/ace/theme/kuroir.css @@ -50,8 +50,7 @@ } .ace-kuroir .ace_fold { - background-color: ; - border-color: #363636; + border-color: #363636; } @@ -65,4 +64,4 @@ color:#FD1732; background-color:#E8E9E8;}.ace-kuroir .ace_string{color:#639300;}.ace-kuroir .ace_string.ace_regexp{color:#417E00; background-color:#C9D4BE;}.ace-kuroir .ace_comment{color:rgba(148, 148, 148, 0.91); background-color:rgba(220, 220, 220, 0.56);}.ace-kuroir .ace_variable{color:#009ACD;}.ace-kuroir .ace_meta.ace_tag{color:#005273;}.ace-kuroir .ace_markup.ace_heading{color:#B8012D; -background-color:rgba(191, 97, 51, 0.051);}.ace-kuroir .ace_markup.ace_list{color:#8F5B26;} \ No newline at end of file +background-color:rgba(191, 97, 51, 0.051);}.ace-kuroir .ace_markup.ace_list{color:#8F5B26;}