stackprofiler 0.0.3 → 0.0.4

Sign up to get free protection for your applications and to get access to all the features.
Files changed (51) hide show
  1. checksums.yaml +4 -4
  2. data/.gitignore +2 -1
  3. data/README.md +1 -1
  4. data/config.ru +3 -2
  5. data/lib/stackprofiler.rb +0 -1
  6. data/lib/stackprofiler/filters/build_tree.rb +3 -4
  7. data/lib/stackprofiler/filters/gem_removal.rb +3 -0
  8. data/lib/stackprofiler/web_ui.rb +34 -11
  9. data/lib/stackprofiler/web_ui/public/css/stackprofiler.css +77 -0
  10. data/lib/stackprofiler/web_ui/public/js/stackprofiler.js +129 -58
  11. data/lib/stackprofiler/web_ui/public/vendor/ace/ace.js +18298 -0
  12. data/lib/stackprofiler/web_ui/public/vendor/ace/ext-beautify.js +334 -0
  13. data/lib/stackprofiler/web_ui/public/vendor/ace/ext-chromevox.js +541 -0
  14. data/lib/stackprofiler/web_ui/public/vendor/ace/ext-elastic_tabstops_lite.js +275 -0
  15. data/lib/stackprofiler/web_ui/public/vendor/ace/ext-emmet.js +1190 -0
  16. data/lib/stackprofiler/web_ui/public/vendor/ace/ext-error_marker.js +6 -0
  17. data/lib/stackprofiler/web_ui/public/vendor/ace/ext-keybinding_menu.js +170 -0
  18. data/lib/stackprofiler/web_ui/public/vendor/ace/ext-language_tools.js +1934 -0
  19. data/lib/stackprofiler/web_ui/public/vendor/ace/ext-linking.js +52 -0
  20. data/lib/stackprofiler/web_ui/public/vendor/ace/ext-modelist.js +187 -0
  21. data/lib/stackprofiler/web_ui/public/vendor/ace/ext-old_ie.js +494 -0
  22. data/lib/stackprofiler/web_ui/public/vendor/ace/ext-searchbox.js +409 -0
  23. data/lib/stackprofiler/web_ui/public/vendor/ace/ext-settings_menu.js +637 -0
  24. data/lib/stackprofiler/web_ui/public/vendor/ace/ext-spellcheck.js +71 -0
  25. data/lib/stackprofiler/web_ui/public/vendor/ace/ext-split.js +246 -0
  26. data/lib/stackprofiler/web_ui/public/vendor/ace/ext-static_highlight.js +154 -0
  27. data/lib/stackprofiler/web_ui/public/vendor/ace/ext-statusbar.js +51 -0
  28. data/lib/stackprofiler/web_ui/public/vendor/ace/ext-textarea.js +632 -0
  29. data/lib/stackprofiler/web_ui/public/vendor/ace/ext-themelist.js +58 -0
  30. data/lib/stackprofiler/web_ui/public/vendor/ace/ext-whitespace.js +181 -0
  31. data/lib/stackprofiler/web_ui/public/vendor/ace/keybinding-emacs.js +1182 -0
  32. data/lib/stackprofiler/web_ui/public/vendor/ace/keybinding-vim.js +5320 -0
  33. data/lib/stackprofiler/web_ui/public/vendor/ace/mode-haml.js +525 -0
  34. data/lib/stackprofiler/web_ui/public/vendor/ace/mode-html.js +2427 -0
  35. data/lib/stackprofiler/web_ui/public/vendor/ace/mode-html_ruby.js +2955 -0
  36. data/lib/stackprofiler/web_ui/public/vendor/ace/mode-javascript.js +1025 -0
  37. data/lib/stackprofiler/web_ui/public/vendor/ace/mode-json.js +668 -0
  38. data/lib/stackprofiler/web_ui/public/vendor/ace/mode-ruby.js +839 -0
  39. data/lib/stackprofiler/web_ui/public/vendor/ace/mode-xml.js +637 -0
  40. data/lib/stackprofiler/web_ui/public/vendor/ace/mode-yaml.js +256 -0
  41. data/lib/stackprofiler/web_ui/public/vendor/ace/theme-xcode.js +89 -0
  42. data/lib/stackprofiler/web_ui/public/vendor/ace/worker-coffee.js +7599 -0
  43. data/lib/stackprofiler/web_ui/public/vendor/ace/worker-css.js +8682 -0
  44. data/lib/stackprofiler/web_ui/public/vendor/ace/worker-html.js +11527 -0
  45. data/lib/stackprofiler/web_ui/public/vendor/ace/worker-javascript.js +10429 -0
  46. data/lib/stackprofiler/web_ui/public/vendor/ace/worker-json.js +2319 -0
  47. data/lib/stackprofiler/web_ui/views/index.erb +1 -1
  48. data/lib/stackprofiler/web_ui/views/layout.erb +2 -55
  49. data/stackprofiler.gemspec +2 -4
  50. metadata +42 -19
  51. data/lib/stackprofiler/web_ui/views/code.erb +0 -17
@@ -0,0 +1,525 @@
1
+ ace.define("ace/mode/ruby_highlight_rules",["require","exports","module","ace/lib/oop","ace/mode/text_highlight_rules"], function(require, exports, module) {
2
+ "use strict";
3
+
4
+ var oop = require("../lib/oop");
5
+ var TextHighlightRules = require("./text_highlight_rules").TextHighlightRules;
6
+ var constantOtherSymbol = exports.constantOtherSymbol = {
7
+ token : "constant.other.symbol.ruby", // symbol
8
+ regex : "[:](?:[A-Za-z_]|[@$](?=[a-zA-Z0-9_]))[a-zA-Z0-9_]*[!=?]?"
9
+ };
10
+
11
+ var qString = exports.qString = {
12
+ token : "string", // single line
13
+ regex : "['](?:(?:\\\\.)|(?:[^'\\\\]))*?[']"
14
+ };
15
+
16
+ var qqString = exports.qqString = {
17
+ token : "string", // single line
18
+ regex : '["](?:(?:\\\\.)|(?:[^"\\\\]))*?["]'
19
+ };
20
+
21
+ var tString = exports.tString = {
22
+ token : "string", // backtick string
23
+ regex : "[`](?:(?:\\\\.)|(?:[^'\\\\]))*?[`]"
24
+ };
25
+
26
+ var constantNumericHex = exports.constantNumericHex = {
27
+ token : "constant.numeric", // hex
28
+ regex : "0[xX][0-9a-fA-F](?:[0-9a-fA-F]|_(?=[0-9a-fA-F]))*\\b"
29
+ };
30
+
31
+ var constantNumericFloat = exports.constantNumericFloat = {
32
+ token : "constant.numeric", // float
33
+ regex : "[+-]?\\d(?:\\d|_(?=\\d))*(?:(?:\\.\\d(?:\\d|_(?=\\d))*)?(?:[eE][+-]?\\d+)?)?\\b"
34
+ };
35
+
36
+ var RubyHighlightRules = function() {
37
+
38
+ var builtinFunctions = (
39
+ "abort|Array|assert|assert_equal|assert_not_equal|assert_same|assert_not_same|" +
40
+ "assert_nil|assert_not_nil|assert_match|assert_no_match|assert_in_delta|assert_throws|" +
41
+ "assert_raise|assert_nothing_raised|assert_instance_of|assert_kind_of|assert_respond_to|" +
42
+ "assert_operator|assert_send|assert_difference|assert_no_difference|assert_recognizes|" +
43
+ "assert_generates|assert_response|assert_redirected_to|assert_template|assert_select|" +
44
+ "assert_select_email|assert_select_rjs|assert_select_encoded|css_select|at_exit|" +
45
+ "attr|attr_writer|attr_reader|attr_accessor|attr_accessible|autoload|binding|block_given?|callcc|" +
46
+ "caller|catch|chomp|chomp!|chop|chop!|defined?|delete_via_redirect|eval|exec|exit|" +
47
+ "exit!|fail|Float|flunk|follow_redirect!|fork|form_for|form_tag|format|gets|global_variables|gsub|" +
48
+ "gsub!|get_via_redirect|host!|https?|https!|include|Integer|lambda|link_to|" +
49
+ "link_to_unless_current|link_to_function|link_to_remote|load|local_variables|loop|open|open_session|" +
50
+ "p|print|printf|proc|putc|puts|post_via_redirect|put_via_redirect|raise|rand|" +
51
+ "raw|readline|readlines|redirect?|request_via_redirect|require|scan|select|" +
52
+ "set_trace_func|sleep|split|sprintf|srand|String|stylesheet_link_tag|syscall|system|sub|sub!|test|" +
53
+ "throw|trace_var|trap|untrace_var|atan2|cos|exp|frexp|ldexp|log|log10|sin|sqrt|tan|" +
54
+ "render|javascript_include_tag|csrf_meta_tag|label_tag|text_field_tag|submit_tag|check_box_tag|" +
55
+ "content_tag|radio_button_tag|text_area_tag|password_field_tag|hidden_field_tag|" +
56
+ "fields_for|select_tag|options_for_select|options_from_collection_for_select|collection_select|" +
57
+ "time_zone_select|select_date|select_time|select_datetime|date_select|time_select|datetime_select|" +
58
+ "select_year|select_month|select_day|select_hour|select_minute|select_second|file_field_tag|" +
59
+ "file_field|respond_to|skip_before_filter|around_filter|after_filter|verify|" +
60
+ "protect_from_forgery|rescue_from|helper_method|redirect_to|before_filter|" +
61
+ "send_data|send_file|validates_presence_of|validates_uniqueness_of|validates_length_of|" +
62
+ "validates_format_of|validates_acceptance_of|validates_associated|validates_exclusion_of|" +
63
+ "validates_inclusion_of|validates_numericality_of|validates_with|validates_each|" +
64
+ "authenticate_or_request_with_http_basic|authenticate_or_request_with_http_digest|" +
65
+ "filter_parameter_logging|match|get|post|resources|redirect|scope|assert_routing|" +
66
+ "translate|localize|extract_locale_from_tld|caches_page|expire_page|caches_action|expire_action|" +
67
+ "cache|expire_fragment|expire_cache_for|observe|cache_sweeper|" +
68
+ "has_many|has_one|belongs_to|has_and_belongs_to_many"
69
+ );
70
+
71
+ var keywords = (
72
+ "alias|and|BEGIN|begin|break|case|class|def|defined|do|else|elsif|END|end|ensure|" +
73
+ "__FILE__|finally|for|gem|if|in|__LINE__|module|next|not|or|private|protected|public|" +
74
+ "redo|rescue|retry|return|super|then|undef|unless|until|when|while|yield"
75
+ );
76
+
77
+ var buildinConstants = (
78
+ "true|TRUE|false|FALSE|nil|NIL|ARGF|ARGV|DATA|ENV|RUBY_PLATFORM|RUBY_RELEASE_DATE|" +
79
+ "RUBY_VERSION|STDERR|STDIN|STDOUT|TOPLEVEL_BINDING"
80
+ );
81
+
82
+ var builtinVariables = (
83
+ "\$DEBUG|\$defout|\$FILENAME|\$LOAD_PATH|\$SAFE|\$stdin|\$stdout|\$stderr|\$VERBOSE|" +
84
+ "$!|root_url|flash|session|cookies|params|request|response|logger|self"
85
+ );
86
+
87
+ var keywordMapper = this.$keywords = this.createKeywordMapper({
88
+ "keyword": keywords,
89
+ "constant.language": buildinConstants,
90
+ "variable.language": builtinVariables,
91
+ "support.function": builtinFunctions,
92
+ "invalid.deprecated": "debugger" // TODO is this a remnant from js mode?
93
+ }, "identifier");
94
+
95
+ this.$rules = {
96
+ "start" : [
97
+ {
98
+ token : "comment",
99
+ regex : "#.*$"
100
+ }, {
101
+ token : "comment", // multi line comment
102
+ regex : "^=begin(?:$|\\s.*$)",
103
+ next : "comment"
104
+ }, {
105
+ token : "string.regexp",
106
+ regex : "[/](?:(?:\\[(?:\\\\]|[^\\]])+\\])|(?:\\\\/|[^\\]/]))*[/]\\w*\\s*(?=[).,;]|$)"
107
+ },
108
+
109
+ [{
110
+ regex: "[{}]", onMatch: function(val, state, stack) {
111
+ this.next = val == "{" ? this.nextState : "";
112
+ if (val == "{" && stack.length) {
113
+ stack.unshift("start", state);
114
+ return "paren.lparen";
115
+ }
116
+ if (val == "}" && stack.length) {
117
+ stack.shift();
118
+ this.next = stack.shift();
119
+ if (this.next.indexOf("string") != -1)
120
+ return "paren.end";
121
+ }
122
+ return val == "{" ? "paren.lparen" : "paren.rparen";
123
+ },
124
+ nextState: "start"
125
+ }, {
126
+ token : "string.start",
127
+ regex : /"/,
128
+ push : [{
129
+ token : "constant.language.escape",
130
+ regex : /\\(?:[nsrtvfbae'"\\]|c.|C-.|M-.(?:\\C-.)?|[0-7]{3}|x[\da-fA-F]{2}|u[\da-fA-F]{4})/
131
+ }, {
132
+ token : "paren.start",
133
+ regex : /\#{/,
134
+ push : "start"
135
+ }, {
136
+ token : "string.end",
137
+ regex : /"/,
138
+ next : "pop"
139
+ }, {
140
+ defaultToken: "string"
141
+ }]
142
+ }, {
143
+ token : "string.start",
144
+ regex : /`/,
145
+ push : [{
146
+ token : "constant.language.escape",
147
+ regex : /\\(?:[nsrtvfbae'"\\]|c.|C-.|M-.(?:\\C-.)?|[0-7]{3}|x[\da-fA-F]{2}|u[\da-fA-F]{4})/
148
+ }, {
149
+ token : "paren.start",
150
+ regex : /\#{/,
151
+ push : "start"
152
+ }, {
153
+ token : "string.end",
154
+ regex : /`/,
155
+ next : "pop"
156
+ }, {
157
+ defaultToken: "string"
158
+ }]
159
+ }, {
160
+ token : "string.start",
161
+ regex : /'/,
162
+ push : [{
163
+ token : "constant.language.escape",
164
+ regex : /\\['\\]/
165
+ }, {
166
+ token : "string.end",
167
+ regex : /'/,
168
+ next : "pop"
169
+ }, {
170
+ defaultToken: "string"
171
+ }]
172
+ }],
173
+
174
+ {
175
+ token : "text", // namespaces aren't symbols
176
+ regex : "::"
177
+ }, {
178
+ token : "variable.instance", // instance variable
179
+ regex : "@{1,2}[a-zA-Z_\\d]+"
180
+ }, {
181
+ token : "support.class", // class name
182
+ regex : "[A-Z][a-zA-Z_\\d]+"
183
+ },
184
+
185
+ constantOtherSymbol,
186
+ constantNumericHex,
187
+ constantNumericFloat,
188
+
189
+ {
190
+ token : "constant.language.boolean",
191
+ regex : "(?:true|false)\\b"
192
+ }, {
193
+ token : keywordMapper,
194
+ regex : "[a-zA-Z_$][a-zA-Z0-9_$]*\\b"
195
+ }, {
196
+ token : "punctuation.separator.key-value",
197
+ regex : "=>"
198
+ }, {
199
+ stateName: "heredoc",
200
+ onMatch : function(value, currentState, stack) {
201
+ var next = value[2] == '-' ? "indentedHeredoc" : "heredoc";
202
+ var tokens = value.split(this.splitRegex);
203
+ stack.push(next, tokens[3]);
204
+ return [
205
+ {type:"constant", value: tokens[1]},
206
+ {type:"string", value: tokens[2]},
207
+ {type:"support.class", value: tokens[3]},
208
+ {type:"string", value: tokens[4]}
209
+ ];
210
+ },
211
+ regex : "(<<-?)(['\"`]?)([\\w]+)(['\"`]?)",
212
+ rules: {
213
+ heredoc: [{
214
+ onMatch: function(value, currentState, stack) {
215
+ if (value === stack[1]) {
216
+ stack.shift();
217
+ stack.shift();
218
+ this.next = stack[0] || "start";
219
+ return "support.class";
220
+ }
221
+ this.next = "";
222
+ return "string";
223
+ },
224
+ regex: ".*$",
225
+ next: "start"
226
+ }],
227
+ indentedHeredoc: [{
228
+ token: "string",
229
+ regex: "^ +"
230
+ }, {
231
+ onMatch: function(value, currentState, stack) {
232
+ if (value === stack[1]) {
233
+ stack.shift();
234
+ stack.shift();
235
+ this.next = stack[0] || "start";
236
+ return "support.class";
237
+ }
238
+ this.next = "";
239
+ return "string";
240
+ },
241
+ regex: ".*$",
242
+ next: "start"
243
+ }]
244
+ }
245
+ }, {
246
+ regex : "$",
247
+ token : "empty",
248
+ next : function(currentState, stack) {
249
+ if (stack[0] === "heredoc" || stack[0] === "indentedHeredoc")
250
+ return stack[0];
251
+ return currentState;
252
+ }
253
+ }, {
254
+ token : "keyword.operator",
255
+ regex : "!|\\$|%|&|\\*|\\-\\-|\\-|\\+\\+|\\+|~|===|==|=|!=|!==|<=|>=|<<=|>>=|>>>=|<>|<|>|!|&&|\\|\\||\\?\\:|\\*=|%=|\\+=|\\-=|&=|\\^=|\\b(?:in|instanceof|new|delete|typeof|void)"
256
+ }, {
257
+ token : "paren.lparen",
258
+ regex : "[[({]"
259
+ }, {
260
+ token : "paren.rparen",
261
+ regex : "[\\])}]"
262
+ }, {
263
+ token : "text",
264
+ regex : "\\s+"
265
+ }
266
+ ],
267
+ "comment" : [
268
+ {
269
+ token : "comment", // closing comment
270
+ regex : "^=end(?:$|\\s.*$)",
271
+ next : "start"
272
+ }, {
273
+ token : "comment", // comment spanning whole line
274
+ regex : ".+"
275
+ }
276
+ ]
277
+ };
278
+
279
+ this.normalizeRules();
280
+ };
281
+
282
+ oop.inherits(RubyHighlightRules, TextHighlightRules);
283
+
284
+ exports.RubyHighlightRules = RubyHighlightRules;
285
+ });
286
+
287
+ ace.define("ace/mode/haml_highlight_rules",["require","exports","module","ace/lib/oop","ace/mode/text_highlight_rules","ace/mode/ruby_highlight_rules"], function(require, exports, module) {
288
+ "use strict";
289
+
290
+ var oop = require("../lib/oop");
291
+ var TextHighlightRules = require("./text_highlight_rules").TextHighlightRules;
292
+ var RubyExports = require("./ruby_highlight_rules");
293
+ var RubyHighlightRules = RubyExports.RubyHighlightRules;
294
+
295
+ var HamlHighlightRules = function() {
296
+
297
+ this.$rules =
298
+ {
299
+ "start": [
300
+ {
301
+ token : "punctuation.section.comment",
302
+ regex : /^\s*\/.*/
303
+ },
304
+ {
305
+ token : "punctuation.section.comment",
306
+ regex : /^\s*#.*/
307
+ },
308
+ {
309
+ token: "string.quoted.double",
310
+ regex: "==.+?=="
311
+ },
312
+ {
313
+ token: "keyword.other.doctype",
314
+ regex: "^!!!\\s*(?:[a-zA-Z0-9-_]+)?"
315
+ },
316
+ RubyExports.qString,
317
+ RubyExports.qqString,
318
+ RubyExports.tString,
319
+ {
320
+ token: ["entity.name.tag.haml"],
321
+ regex: /^\s*%[\w:]+/,
322
+ next: "tag_single"
323
+ },
324
+ {
325
+ token: [ "meta.escape.haml" ],
326
+ regex: "^\\s*\\\\."
327
+ },
328
+ RubyExports.constantNumericHex,
329
+ RubyExports.constantNumericFloat,
330
+
331
+ RubyExports.constantOtherSymbol,
332
+ {
333
+ token: "text",
334
+ regex: "=|-|~",
335
+ next: "embedded_ruby"
336
+ }
337
+ ],
338
+ "tag_single": [
339
+ {
340
+ token: "entity.other.attribute-name.class.haml",
341
+ regex: "\\.[\\w-]+"
342
+ },
343
+ {
344
+ token: "entity.other.attribute-name.id.haml",
345
+ regex: "#[\\w-]+"
346
+ },
347
+ {
348
+ token: "punctuation.section",
349
+ regex: "\\{",
350
+ next: "section"
351
+ },
352
+
353
+ RubyExports.constantOtherSymbol,
354
+
355
+ {
356
+ token: "text",
357
+ regex: /\s/,
358
+ next: "start"
359
+ },
360
+ {
361
+ token: "empty",
362
+ regex: "$|(?!\\.|#|\\{|\\[|=|-|~|\\/)",
363
+ next: "start"
364
+ }
365
+ ],
366
+ "section": [
367
+ RubyExports.constantOtherSymbol,
368
+
369
+ RubyExports.qString,
370
+ RubyExports.qqString,
371
+ RubyExports.tString,
372
+
373
+ RubyExports.constantNumericHex,
374
+ RubyExports.constantNumericFloat,
375
+ {
376
+ token: "punctuation.section",
377
+ regex: "\\}",
378
+ next: "start"
379
+ }
380
+ ],
381
+ "embedded_ruby": [
382
+ RubyExports.constantNumericHex,
383
+ RubyExports.constantNumericFloat,
384
+ {
385
+ token : "support.class", // class name
386
+ regex : "[A-Z][a-zA-Z_\\d]+"
387
+ },
388
+ {
389
+ token : new RubyHighlightRules().getKeywords(),
390
+ regex : "[a-zA-Z_$][a-zA-Z0-9_$]*\\b"
391
+ },
392
+ {
393
+ token : ["keyword", "text", "text"],
394
+ regex : "(?:do|\\{)(?: \\|[^|]+\\|)?$",
395
+ next : "start"
396
+ },
397
+ {
398
+ token : ["text"],
399
+ regex : "^$",
400
+ next : "start"
401
+ },
402
+ {
403
+ token : ["text"],
404
+ regex : "^(?!.*\\|\\s*$)",
405
+ next : "start"
406
+ }
407
+ ]
408
+ }
409
+
410
+ };
411
+
412
+ oop.inherits(HamlHighlightRules, TextHighlightRules);
413
+
414
+ exports.HamlHighlightRules = HamlHighlightRules;
415
+ });
416
+
417
+ ace.define("ace/mode/folding/coffee",["require","exports","module","ace/lib/oop","ace/mode/folding/fold_mode","ace/range"], function(require, exports, module) {
418
+ "use strict";
419
+
420
+ var oop = require("../../lib/oop");
421
+ var BaseFoldMode = require("./fold_mode").FoldMode;
422
+ var Range = require("../../range").Range;
423
+
424
+ var FoldMode = exports.FoldMode = function() {};
425
+ oop.inherits(FoldMode, BaseFoldMode);
426
+
427
+ (function() {
428
+
429
+ this.getFoldWidgetRange = function(session, foldStyle, row) {
430
+ var range = this.indentationBlock(session, row);
431
+ if (range)
432
+ return range;
433
+
434
+ var re = /\S/;
435
+ var line = session.getLine(row);
436
+ var startLevel = line.search(re);
437
+ if (startLevel == -1 || line[startLevel] != "#")
438
+ return;
439
+
440
+ var startColumn = line.length;
441
+ var maxRow = session.getLength();
442
+ var startRow = row;
443
+ var endRow = row;
444
+
445
+ while (++row < maxRow) {
446
+ line = session.getLine(row);
447
+ var level = line.search(re);
448
+
449
+ if (level == -1)
450
+ continue;
451
+
452
+ if (line[level] != "#")
453
+ break;
454
+
455
+ endRow = row;
456
+ }
457
+
458
+ if (endRow > startRow) {
459
+ var endColumn = session.getLine(endRow).length;
460
+ return new Range(startRow, startColumn, endRow, endColumn);
461
+ }
462
+ };
463
+ this.getFoldWidget = function(session, foldStyle, row) {
464
+ var line = session.getLine(row);
465
+ var indent = line.search(/\S/);
466
+ var next = session.getLine(row + 1);
467
+ var prev = session.getLine(row - 1);
468
+ var prevIndent = prev.search(/\S/);
469
+ var nextIndent = next.search(/\S/);
470
+
471
+ if (indent == -1) {
472
+ session.foldWidgets[row - 1] = prevIndent!= -1 && prevIndent < nextIndent ? "start" : "";
473
+ return "";
474
+ }
475
+ if (prevIndent == -1) {
476
+ if (indent == nextIndent && line[indent] == "#" && next[indent] == "#") {
477
+ session.foldWidgets[row - 1] = "";
478
+ session.foldWidgets[row + 1] = "";
479
+ return "start";
480
+ }
481
+ } else if (prevIndent == indent && line[indent] == "#" && prev[indent] == "#") {
482
+ if (session.getLine(row - 2).search(/\S/) == -1) {
483
+ session.foldWidgets[row - 1] = "start";
484
+ session.foldWidgets[row + 1] = "";
485
+ return "";
486
+ }
487
+ }
488
+
489
+ if (prevIndent!= -1 && prevIndent < indent)
490
+ session.foldWidgets[row - 1] = "start";
491
+ else
492
+ session.foldWidgets[row - 1] = "";
493
+
494
+ if (indent < nextIndent)
495
+ return "start";
496
+ else
497
+ return "";
498
+ };
499
+
500
+ }).call(FoldMode.prototype);
501
+
502
+ });
503
+
504
+ ace.define("ace/mode/haml",["require","exports","module","ace/lib/oop","ace/mode/text","ace/mode/haml_highlight_rules","ace/mode/folding/coffee"], function(require, exports, module) {
505
+ "use strict";
506
+
507
+ var oop = require("../lib/oop");
508
+ var TextMode = require("./text").Mode;
509
+ var HamlHighlightRules = require("./haml_highlight_rules").HamlHighlightRules;
510
+ var FoldMode = require("./folding/coffee").FoldMode;
511
+
512
+ var Mode = function() {
513
+ this.HighlightRules = HamlHighlightRules;
514
+ this.foldingRules = new FoldMode();
515
+ };
516
+ oop.inherits(Mode, TextMode);
517
+
518
+ (function() {
519
+ this.lineCommentStart = ["//", "#"];
520
+
521
+ this.$id = "ace/mode/haml";
522
+ }).call(Mode.prototype);
523
+
524
+ exports.Mode = Mode;
525
+ });