gollum 2.4.4 → 2.4.5
Sign up to get free protection for your applications and to get access to all the features.
Potentially problematic release.
This version of gollum might be problematic. Click here for more details.
- data/gollum.gemspec +100 -19
- data/lib/gollum.rb +2 -3
- data/lib/gollum/frontend/public/gollum/css/gollum.css +3 -1
- data/lib/gollum/frontend/public/gollum/css/template.css +8 -12
- data/lib/gollum/frontend/public/gollum/livepreview/js/ace/lib/ace/ace.js +64 -60
- data/lib/gollum/frontend/public/gollum/livepreview/js/ace/lib/ace/anchor.js +56 -62
- data/lib/gollum/frontend/public/gollum/livepreview/js/ace/lib/ace/anchor_test.js +25 -32
- data/lib/gollum/frontend/public/gollum/livepreview/js/ace/lib/ace/background_tokenizer.js +56 -63
- data/lib/gollum/frontend/public/gollum/livepreview/js/ace/lib/ace/background_tokenizer_test.js +25 -32
- data/lib/gollum/frontend/public/gollum/livepreview/js/ace/lib/ace/commands/command_manager.js +11 -11
- data/lib/gollum/frontend/public/gollum/livepreview/js/ace/lib/ace/commands/command_manager_test.js +59 -53
- data/lib/gollum/frontend/public/gollum/livepreview/js/ace/lib/ace/commands/default_commands.js +46 -39
- data/lib/gollum/frontend/public/gollum/livepreview/js/ace/lib/ace/commands/multi_select_commands.js +32 -36
- data/lib/gollum/frontend/public/gollum/livepreview/js/ace/lib/ace/config.js +62 -47
- data/lib/gollum/frontend/public/gollum/livepreview/js/ace/lib/ace/config_test.js +71 -0
- data/lib/gollum/frontend/public/gollum/livepreview/js/ace/lib/ace/css/editor.css +82 -41
- data/lib/gollum/frontend/public/gollum/livepreview/js/ace/lib/ace/document.js +126 -145
- data/lib/gollum/frontend/public/gollum/livepreview/js/ace/lib/ace/document_test.js +25 -33
- data/lib/gollum/frontend/public/gollum/livepreview/js/ace/lib/ace/edit_session.js +484 -467
- data/lib/gollum/frontend/public/gollum/livepreview/js/ace/lib/ace/edit_session/bracket_match.js +30 -63
- data/lib/gollum/frontend/public/gollum/livepreview/js/ace/lib/ace/edit_session/fold.js +29 -37
- data/lib/gollum/frontend/public/gollum/livepreview/js/ace/lib/ace/edit_session/fold_line.js +27 -35
- data/lib/gollum/frontend/public/gollum/livepreview/js/ace/lib/ace/edit_session/folding.js +47 -55
- data/lib/gollum/frontend/public/gollum/livepreview/js/ace/lib/ace/edit_session_test.js +61 -41
- data/lib/gollum/frontend/public/gollum/livepreview/js/ace/lib/ace/editor.js +506 -517
- data/lib/gollum/frontend/public/gollum/livepreview/js/ace/lib/ace/editor_change_document_test.js +25 -32
- data/lib/gollum/frontend/public/gollum/livepreview/js/ace/lib/ace/editor_highlight_selected_word_test.js +26 -34
- data/lib/gollum/frontend/public/gollum/livepreview/js/ace/lib/ace/editor_navigation_test.js +25 -32
- data/lib/gollum/frontend/public/gollum/livepreview/js/ace/lib/ace/editor_text_edit_test.js +25 -32
- data/lib/gollum/frontend/public/gollum/livepreview/js/ace/lib/ace/ext/static_highlight.js +28 -38
- data/lib/gollum/frontend/public/gollum/livepreview/js/ace/lib/ace/ext/static_highlight_test.js +9 -14
- data/lib/gollum/frontend/public/gollum/livepreview/js/ace/lib/ace/ext/textarea.js +26 -36
- data/lib/gollum/frontend/public/gollum/livepreview/js/ace/lib/ace/keyboard/emacs.js +44 -36
- data/lib/gollum/frontend/public/gollum/livepreview/js/ace/lib/ace/keyboard/hash_handler.js +45 -52
- data/lib/gollum/frontend/public/gollum/livepreview/js/ace/lib/ace/keyboard/keybinding.js +25 -34
- data/lib/gollum/frontend/public/gollum/livepreview/js/ace/lib/ace/keyboard/state_handler.js +26 -33
- data/lib/gollum/frontend/public/gollum/livepreview/js/ace/lib/ace/keyboard/textinput.js +230 -165
- data/lib/gollum/frontend/public/gollum/livepreview/js/ace/lib/ace/keyboard/vim.js +76 -49
- data/lib/gollum/frontend/public/gollum/livepreview/js/ace/lib/ace/keyboard/vim/commands.js +66 -61
- data/lib/gollum/frontend/public/gollum/livepreview/js/ace/lib/ace/keyboard/vim/maps/aliases.js +36 -43
- data/lib/gollum/frontend/public/gollum/livepreview/js/ace/lib/ace/keyboard/vim/maps/motions.js +138 -156
- data/lib/gollum/frontend/public/gollum/livepreview/js/ace/lib/ace/keyboard/vim/maps/operators.js +35 -32
- data/lib/gollum/frontend/public/gollum/livepreview/js/ace/lib/ace/keyboard/vim/maps/util.js +18 -18
- data/lib/gollum/frontend/public/gollum/livepreview/js/ace/lib/ace/keyboard/vim/registers.js +25 -32
- data/lib/gollum/frontend/public/gollum/livepreview/js/ace/lib/ace/layer/cursor.js +116 -101
- data/lib/gollum/frontend/public/gollum/livepreview/js/ace/lib/ace/layer/gutter.js +117 -83
- data/lib/gollum/frontend/public/gollum/livepreview/js/ace/lib/ace/layer/marker.js +60 -71
- data/lib/gollum/frontend/public/gollum/livepreview/js/ace/lib/ace/layer/text.js +163 -102
- data/lib/gollum/frontend/public/gollum/livepreview/js/ace/lib/ace/layer/text_test.js +60 -41
- data/lib/gollum/frontend/public/gollum/livepreview/js/ace/lib/ace/lib/browser_focus.js +26 -36
- data/lib/gollum/frontend/public/gollum/livepreview/js/ace/lib/ace/lib/dom.js +26 -36
- data/lib/gollum/frontend/public/gollum/livepreview/js/ace/lib/ace/lib/es5-shim.js +24 -1
- data/lib/gollum/frontend/public/gollum/livepreview/js/ace/lib/ace/lib/event.js +52 -54
- data/lib/gollum/frontend/public/gollum/livepreview/js/ace/lib/ace/lib/event_emitter.js +32 -39
- data/lib/gollum/frontend/public/gollum/livepreview/js/ace/lib/ace/lib/event_emitter_test.js +25 -32
- data/lib/gollum/frontend/public/gollum/livepreview/js/ace/lib/ace/lib/keys.js +9 -1
- data/lib/gollum/frontend/public/gollum/livepreview/js/ace/lib/ace/lib/lang.js +73 -33
- data/lib/gollum/frontend/public/gollum/livepreview/js/ace/lib/ace/lib/net.js +10 -3
- data/lib/gollum/frontend/public/gollum/livepreview/js/ace/lib/ace/lib/oop.js +25 -32
- data/lib/gollum/frontend/public/gollum/livepreview/js/ace/lib/ace/lib/regexp.js +2 -2
- data/lib/gollum/frontend/public/gollum/livepreview/js/ace/lib/ace/lib/useragent.js +55 -58
- data/lib/gollum/frontend/public/gollum/livepreview/js/ace/lib/ace/mode/_test/package.json +8 -0
- data/lib/gollum/frontend/public/gollum/livepreview/js/ace/lib/ace/mode/_test/test_highlight_rules.js +144 -0
- data/lib/gollum/frontend/public/gollum/livepreview/js/ace/lib/ace/mode/_test/text_javascript.txt +52 -0
- data/lib/gollum/frontend/public/gollum/livepreview/js/ace/lib/ace/mode/_test/tokens_c9search.json +175 -0
- data/lib/gollum/frontend/public/gollum/livepreview/js/ace/lib/ace/mode/_test/tokens_c_cpp.json +124 -0
- data/lib/gollum/frontend/public/gollum/livepreview/js/ace/lib/ace/mode/_test/tokens_clojure.json +248 -0
- data/lib/gollum/frontend/public/gollum/livepreview/js/ace/lib/ace/mode/_test/tokens_coffee.json +188 -0
- data/lib/gollum/frontend/public/gollum/livepreview/js/ace/lib/ace/mode/_test/tokens_coldfusion.json +41 -0
- data/lib/gollum/frontend/public/gollum/livepreview/js/ace/lib/ace/mode/_test/tokens_csharp.json +42 -0
- data/lib/gollum/frontend/public/gollum/livepreview/js/ace/lib/ace/mode/_test/tokens_css.json +231 -0
- data/lib/gollum/frontend/public/gollum/livepreview/js/ace/lib/ace/mode/_test/tokens_diff.json +732 -0
- data/lib/gollum/frontend/public/gollum/livepreview/js/ace/lib/ace/mode/_test/tokens_glsl.json +185 -0
- data/lib/gollum/frontend/public/gollum/livepreview/js/ace/lib/ace/mode/_test/tokens_golang.json +362 -0
- data/lib/gollum/frontend/public/gollum/livepreview/js/ace/lib/ace/mode/_test/tokens_groovy.json +529 -0
- data/lib/gollum/frontend/public/gollum/livepreview/js/ace/lib/ace/mode/_test/tokens_haxe.json +195 -0
- data/lib/gollum/frontend/public/gollum/livepreview/js/ace/lib/ace/mode/_test/tokens_html.json +150 -0
- data/lib/gollum/frontend/public/gollum/livepreview/js/ace/lib/ace/mode/_test/tokens_java.json +139 -0
- data/lib/gollum/frontend/public/gollum/livepreview/js/ace/lib/ace/mode/_test/tokens_javascript.json +555 -0
- data/lib/gollum/frontend/public/gollum/livepreview/js/ace/lib/ace/mode/_test/tokens_json.json +611 -0
- data/lib/gollum/frontend/public/gollum/livepreview/js/ace/lib/ace/mode/_test/tokens_jsx.json +79 -0
- data/lib/gollum/frontend/public/gollum/livepreview/js/ace/lib/ace/mode/_test/tokens_latex.json +196 -0
- data/lib/gollum/frontend/public/gollum/livepreview/js/ace/lib/ace/mode/_test/tokens_less.json +292 -0
- data/lib/gollum/frontend/public/gollum/livepreview/js/ace/lib/ace/mode/_test/tokens_liquid.json +698 -0
- data/lib/gollum/frontend/public/gollum/livepreview/js/ace/lib/ace/mode/_test/tokens_lua.json +451 -0
- data/lib/gollum/frontend/public/gollum/livepreview/js/ace/lib/ace/mode/_test/tokens_luapage.json +824 -0
- data/lib/gollum/frontend/public/gollum/livepreview/js/ace/lib/ace/mode/_test/tokens_markdown.json +1202 -0
- data/lib/gollum/frontend/public/gollum/livepreview/js/ace/lib/ace/mode/_test/tokens_ocaml.json +260 -0
- data/lib/gollum/frontend/public/gollum/livepreview/js/ace/lib/ace/mode/_test/tokens_perl.json +311 -0
- data/lib/gollum/frontend/public/gollum/livepreview/js/ace/lib/ace/mode/_test/tokens_pgsql.json +1020 -0
- data/lib/gollum/frontend/public/gollum/livepreview/js/ace/lib/ace/mode/_test/tokens_php.json +238 -0
- data/lib/gollum/frontend/public/gollum/livepreview/js/ace/lib/ace/mode/_test/tokens_powershell.json +255 -0
- data/lib/gollum/frontend/public/gollum/livepreview/js/ace/lib/ace/mode/_test/tokens_python.json +205 -0
- data/lib/gollum/frontend/public/gollum/livepreview/js/ace/lib/ace/mode/_test/tokens_ruby.json +104 -0
- data/lib/gollum/frontend/public/gollum/livepreview/js/ace/lib/ace/mode/_test/tokens_scad.json +267 -0
- data/lib/gollum/frontend/public/gollum/livepreview/js/ace/lib/ace/mode/_test/tokens_scala.json +748 -0
- data/lib/gollum/frontend/public/gollum/livepreview/js/ace/lib/ace/mode/_test/tokens_scss.json +181 -0
- data/lib/gollum/frontend/public/gollum/livepreview/js/ace/lib/ace/mode/_test/tokens_sh.json +434 -0
- data/lib/gollum/frontend/public/gollum/livepreview/js/ace/lib/ace/mode/_test/tokens_sql.json +73 -0
- data/lib/gollum/frontend/public/gollum/livepreview/js/ace/lib/ace/mode/_test/tokens_svg.json +931 -0
- data/lib/gollum/frontend/public/gollum/livepreview/js/ace/lib/ace/mode/_test/tokens_tcl.json +536 -0
- data/lib/gollum/frontend/public/gollum/livepreview/js/ace/lib/ace/mode/_test/tokens_text.json +58 -0
- data/lib/gollum/frontend/public/gollum/livepreview/js/ace/lib/ace/mode/_test/tokens_textile.json +195 -0
- data/lib/gollum/frontend/public/gollum/livepreview/js/ace/lib/ace/mode/_test/tokens_xml.json +705 -0
- data/lib/gollum/frontend/public/gollum/livepreview/js/ace/lib/ace/mode/_test/tokens_xquery.json +64 -0
- data/lib/gollum/frontend/public/gollum/livepreview/js/ace/lib/ace/mode/_test/tokens_yaml.json +260 -0
- data/lib/gollum/frontend/public/gollum/livepreview/js/ace/lib/ace/mode/abap.js +77 -0
- data/lib/gollum/frontend/public/gollum/livepreview/js/ace/lib/ace/mode/abap_highlight_rules.js +133 -0
- data/lib/gollum/frontend/public/gollum/livepreview/js/ace/lib/ace/mode/asciidoc.js +64 -0
- data/lib/gollum/frontend/public/gollum/livepreview/js/ace/lib/ace/mode/asciidoc_highlight_rules.js +234 -0
- data/lib/gollum/frontend/public/gollum/livepreview/js/ace/lib/ace/mode/behaviour.js +26 -34
- data/lib/gollum/frontend/public/gollum/livepreview/js/ace/lib/ace/mode/behaviour/cstyle.js +195 -55
- data/lib/gollum/frontend/public/gollum/livepreview/js/ace/lib/ace/mode/behaviour/html.js +26 -34
- data/lib/gollum/frontend/public/gollum/livepreview/js/ace/lib/ace/mode/behaviour/xml.js +26 -34
- data/lib/gollum/frontend/public/gollum/livepreview/js/ace/lib/ace/mode/behaviour/xquery.js +31 -31
- data/lib/gollum/frontend/public/gollum/livepreview/js/ace/lib/ace/mode/c9search.js +25 -32
- data/lib/gollum/frontend/public/gollum/livepreview/js/ace/lib/ace/mode/c9search_highlight_rules.js +25 -32
- data/lib/gollum/frontend/public/gollum/livepreview/js/ace/lib/ace/mode/c_cpp.js +25 -33
- data/lib/gollum/frontend/public/gollum/livepreview/js/ace/lib/ace/mode/c_cpp_highlight_rules.js +67 -60
- data/lib/gollum/frontend/public/gollum/livepreview/js/ace/lib/ace/mode/clojure.js +25 -34
- data/lib/gollum/frontend/public/gollum/livepreview/js/ace/lib/ace/mode/clojure_highlight_rules.js +112 -130
- data/lib/gollum/frontend/public/gollum/livepreview/js/ace/lib/ace/mode/coffee.js +29 -36
- data/lib/gollum/frontend/public/gollum/livepreview/js/ace/lib/ace/mode/coffee/coffee-script.js +25 -32
- data/lib/gollum/frontend/public/gollum/livepreview/js/ace/lib/ace/mode/coffee/helpers.js +22 -7
- data/lib/gollum/frontend/public/gollum/livepreview/js/ace/lib/ace/mode/coffee/lexer.js +140 -64
- data/lib/gollum/frontend/public/gollum/livepreview/js/ace/lib/ace/mode/coffee/nodes.js +479 -237
- data/lib/gollum/frontend/public/gollum/livepreview/js/ace/lib/ace/mode/coffee/parser.js +321 -230
- data/lib/gollum/frontend/public/gollum/livepreview/js/ace/lib/ace/mode/coffee/parser_test.js +25 -32
- data/lib/gollum/frontend/public/gollum/livepreview/js/ace/lib/ace/mode/coffee/rewriter.js +62 -28
- data/lib/gollum/frontend/public/gollum/livepreview/js/ace/lib/ace/mode/coffee/scope.js +39 -20
- data/lib/gollum/frontend/public/gollum/livepreview/js/ace/lib/ace/mode/coffee_highlight_rules.js +183 -82
- data/lib/gollum/frontend/public/gollum/livepreview/js/ace/lib/ace/mode/coffee_highlight_rules_test.js +226 -32
- data/lib/gollum/frontend/public/gollum/livepreview/js/ace/lib/ace/mode/coffee_worker.js +25 -32
- data/lib/gollum/frontend/public/gollum/livepreview/js/ace/lib/ace/mode/coldfusion.js +25 -32
- data/lib/gollum/frontend/public/gollum/livepreview/js/ace/lib/ace/mode/coldfusion_highlight_rules.js +28 -35
- data/lib/gollum/frontend/public/gollum/livepreview/js/ace/lib/ace/mode/coldfusion_test.js +25 -32
- data/lib/gollum/frontend/public/gollum/livepreview/js/ace/lib/ace/mode/csharp_highlight_rules.js +7 -21
- data/lib/gollum/frontend/public/gollum/livepreview/js/ace/lib/ace/mode/css.js +36 -47
- data/lib/gollum/frontend/public/gollum/livepreview/js/ace/lib/ace/mode/css/csslint.js +202 -697
- data/lib/gollum/frontend/public/gollum/livepreview/js/ace/lib/ace/mode/css_highlight_rules.js +51 -84
- data/lib/gollum/frontend/public/gollum/livepreview/js/ace/lib/ace/mode/css_highlight_rules_test.js +25 -32
- data/lib/gollum/frontend/public/gollum/livepreview/js/ace/lib/ace/mode/css_test.js +25 -32
- data/lib/gollum/frontend/public/gollum/livepreview/js/ace/lib/ace/mode/css_worker.js +68 -40
- data/lib/gollum/frontend/public/gollum/livepreview/js/ace/lib/ace/mode/css_worker_test.js +25 -32
- data/lib/gollum/frontend/public/gollum/livepreview/js/ace/lib/ace/mode/dart.js +62 -0
- data/lib/gollum/frontend/public/gollum/livepreview/js/ace/lib/ace/mode/dart_highlight_rules.js +192 -0
- data/lib/gollum/frontend/public/gollum/livepreview/js/ace/lib/ace/mode/diff.js +25 -31
- data/lib/gollum/frontend/public/gollum/livepreview/js/ace/lib/ace/mode/diff_highlight_rules.js +27 -33
- data/lib/gollum/frontend/public/gollum/livepreview/js/ace/lib/ace/mode/doc_comment_highlight_rules.js +25 -32
- data/lib/gollum/frontend/public/gollum/livepreview/js/ace/lib/ace/mode/folding/asciidoc.js +142 -0
- data/lib/gollum/frontend/public/gollum/livepreview/js/ace/lib/ace/mode/folding/c9search.js +31 -37
- data/lib/gollum/frontend/public/gollum/livepreview/js/ace/lib/ace/mode/folding/coffee.js +26 -33
- data/lib/gollum/frontend/public/gollum/livepreview/js/ace/lib/ace/mode/folding/coffee_test.js +25 -32
- data/lib/gollum/frontend/public/gollum/livepreview/js/ace/lib/ace/mode/folding/cstyle.js +30 -51
- data/lib/gollum/frontend/public/gollum/livepreview/js/ace/lib/ace/mode/folding/cstyle_test.js +25 -32
- data/lib/gollum/frontend/public/gollum/livepreview/js/ace/lib/ace/mode/folding/diff.js +28 -35
- data/lib/gollum/frontend/public/gollum/livepreview/js/ace/lib/ace/mode/folding/fold_mode.js +35 -30
- data/lib/gollum/frontend/public/gollum/livepreview/js/ace/lib/ace/mode/folding/html.js +25 -32
- data/lib/gollum/frontend/public/gollum/livepreview/js/ace/lib/ace/mode/folding/html_test.js +25 -32
- data/lib/gollum/frontend/public/gollum/livepreview/js/ace/lib/ace/mode/folding/latex.js +162 -0
- data/lib/gollum/frontend/public/gollum/livepreview/js/ace/lib/ace/mode/folding/lua.js +163 -0
- data/lib/gollum/frontend/public/gollum/livepreview/js/ace/lib/ace/mode/folding/markdown.js +125 -0
- data/lib/gollum/frontend/public/gollum/livepreview/js/ace/lib/ace/mode/folding/mixed.js +25 -32
- data/lib/gollum/frontend/public/gollum/livepreview/js/ace/lib/ace/mode/folding/pythonic.js +25 -32
- data/lib/gollum/frontend/public/gollum/livepreview/js/ace/lib/ace/mode/folding/pythonic_test.js +26 -33
- data/lib/gollum/frontend/public/gollum/livepreview/js/ace/lib/ace/mode/folding/xml.js +25 -32
- data/lib/gollum/frontend/public/gollum/livepreview/js/ace/lib/ace/mode/folding/xml_test.js +25 -32
- data/lib/gollum/frontend/public/gollum/livepreview/js/ace/lib/ace/mode/glsl.js +52 -0
- data/lib/gollum/frontend/public/gollum/livepreview/js/ace/lib/ace/mode/glsl_highlight_rules.js +81 -0
- data/lib/gollum/frontend/public/gollum/livepreview/js/ace/lib/ace/mode/golang.js +0 -1
- data/lib/gollum/frontend/public/gollum/livepreview/js/ace/lib/ace/mode/golang_highlight_rules.js +15 -22
- data/lib/gollum/frontend/public/gollum/livepreview/js/ace/lib/ace/mode/groovy_highlight_rules.js +28 -36
- data/lib/gollum/frontend/public/gollum/livepreview/js/ace/lib/ace/mode/haml.js +62 -0
- data/lib/gollum/frontend/public/gollum/livepreview/js/ace/lib/ace/mode/haml_highlight_rules.js +132 -0
- data/lib/gollum/frontend/public/gollum/livepreview/js/ace/lib/ace/mode/haxe.js +20 -25
- data/lib/gollum/frontend/public/gollum/livepreview/js/ace/lib/ace/mode/haxe_highlight_rules.js +11 -15
- data/lib/gollum/frontend/public/gollum/livepreview/js/ace/lib/ace/mode/html.js +25 -32
- data/lib/gollum/frontend/public/gollum/livepreview/js/ace/lib/ace/mode/html_highlight_rules.js +32 -38
- data/lib/gollum/frontend/public/gollum/livepreview/js/ace/lib/ace/mode/html_highlight_rules_test.js +162 -69
- data/lib/gollum/frontend/public/gollum/livepreview/js/ace/lib/ace/mode/html_test.js +25 -32
- data/lib/gollum/frontend/public/gollum/livepreview/js/ace/lib/ace/mode/jade.js +58 -0
- data/lib/gollum/frontend/public/gollum/livepreview/js/ace/lib/ace/mode/jade_highlight_rules.js +347 -0
- data/lib/gollum/frontend/public/gollum/livepreview/js/ace/lib/ace/mode/java_highlight_rules.js +18 -29
- data/lib/gollum/frontend/public/gollum/livepreview/js/ace/lib/ace/mode/javascript.js +28 -51
- data/lib/gollum/frontend/public/gollum/livepreview/js/ace/lib/ace/mode/javascript/jshint.js +4838 -0
- data/lib/gollum/frontend/public/gollum/livepreview/js/ace/lib/ace/mode/javascript_highlight_rules.js +98 -180
- data/lib/gollum/frontend/public/gollum/livepreview/js/ace/lib/ace/mode/javascript_highlight_rules_test.js +26 -33
- data/lib/gollum/frontend/public/gollum/livepreview/js/ace/lib/ace/mode/javascript_test.js +25 -32
- data/lib/gollum/frontend/public/gollum/livepreview/js/ace/lib/ace/mode/javascript_worker.js +163 -64
- data/lib/gollum/frontend/public/gollum/livepreview/js/ace/lib/ace/mode/javascript_worker_test.js +38 -40
- data/lib/gollum/frontend/public/gollum/livepreview/js/ace/lib/ace/mode/json.js +26 -33
- data/lib/gollum/frontend/public/gollum/livepreview/js/ace/lib/ace/mode/json_highlight_rules.js +26 -34
- data/lib/gollum/frontend/public/gollum/livepreview/js/ace/lib/ace/mode/json_worker.js +25 -32
- data/lib/gollum/frontend/public/gollum/livepreview/js/ace/lib/ace/mode/json_worker_test.js +25 -32
- data/lib/gollum/frontend/public/gollum/livepreview/js/ace/lib/ace/mode/jsp.js +56 -0
- data/lib/gollum/frontend/public/gollum/livepreview/js/ace/lib/ace/mode/jsp_highlight_rules.js +85 -0
- data/lib/gollum/frontend/public/gollum/livepreview/js/ace/lib/ace/mode/latex.js +3 -2
- data/lib/gollum/frontend/public/gollum/livepreview/js/ace/lib/ace/mode/latex_highlight_rules.js +1 -1
- data/lib/gollum/frontend/public/gollum/livepreview/js/ace/lib/ace/mode/less.js +25 -33
- data/lib/gollum/frontend/public/gollum/livepreview/js/ace/lib/ace/mode/less_highlight_rules.js +25 -33
- data/lib/gollum/frontend/public/gollum/livepreview/js/ace/lib/ace/mode/liquid.js +25 -32
- data/lib/gollum/frontend/public/gollum/livepreview/js/ace/lib/ace/mode/liquid_highlight_rules.js +146 -161
- data/lib/gollum/frontend/public/gollum/livepreview/js/ace/lib/ace/mode/liquid_highlight_rules_test.js +25 -32
- data/lib/gollum/frontend/public/gollum/livepreview/js/ace/lib/ace/mode/lisp.js +60 -0
- data/lib/gollum/frontend/public/gollum/livepreview/js/ace/lib/ace/mode/lisp_highlight_rules.js +127 -0
- data/lib/gollum/frontend/public/gollum/livepreview/js/ace/lib/ace/mode/lua.js +116 -56
- data/lib/gollum/frontend/public/gollum/livepreview/js/ace/lib/ace/mode/lua_highlight_rules.js +75 -101
- data/lib/gollum/frontend/public/gollum/livepreview/js/ace/lib/ace/mode/lucene.js +16 -0
- data/lib/gollum/frontend/public/gollum/livepreview/js/ace/lib/ace/mode/lucene_highlight_rules.js +49 -0
- data/lib/gollum/frontend/public/gollum/livepreview/js/ace/lib/ace/mode/lucene_highlight_rules_test.js +99 -0
- data/lib/gollum/frontend/public/gollum/livepreview/js/ace/lib/ace/mode/makefile.js +62 -0
- data/lib/gollum/frontend/public/gollum/livepreview/js/ace/lib/ace/mode/makefile_highlight_rules.js +75 -0
- data/lib/gollum/frontend/public/gollum/livepreview/js/ace/lib/ace/mode/markdown.js +35 -41
- data/lib/gollum/frontend/public/gollum/livepreview/js/ace/lib/ace/mode/markdown_highlight_rules.js +29 -37
- data/lib/gollum/frontend/public/gollum/livepreview/js/ace/lib/ace/mode/markdown_highlight_rules_test.js +100 -0
- data/lib/gollum/frontend/public/gollum/livepreview/js/ace/lib/ace/mode/matching_brace_outdent.js +25 -32
- data/lib/gollum/frontend/public/gollum/livepreview/js/ace/lib/ace/mode/matching_parens_outdent.js +25 -32
- data/lib/gollum/frontend/public/gollum/livepreview/js/ace/lib/ace/mode/objectivec.js +62 -0
- data/lib/gollum/frontend/public/gollum/livepreview/js/ace/lib/ace/mode/objectivec_highlight_rules.js +343 -0
- data/lib/gollum/frontend/public/gollum/livepreview/js/ace/lib/ace/mode/ocaml.js +25 -32
- data/lib/gollum/frontend/public/gollum/livepreview/js/ace/lib/ace/mode/ocaml_highlight_rules.js +39 -53
- data/lib/gollum/frontend/public/gollum/livepreview/js/ace/lib/ace/mode/perl.js +25 -32
- data/lib/gollum/frontend/public/gollum/livepreview/js/ace/lib/ace/mode/perl_highlight_rules.js +39 -52
- data/lib/gollum/frontend/public/gollum/livepreview/js/ace/lib/ace/mode/pgsql.js +33 -24
- data/lib/gollum/frontend/public/gollum/livepreview/js/ace/lib/ace/mode/pgsql_highlight_rules.js +55 -51
- data/lib/gollum/frontend/public/gollum/livepreview/js/ace/lib/ace/mode/php.js +57 -36
- data/lib/gollum/frontend/public/gollum/livepreview/js/ace/lib/ace/mode/php_highlight_rules.js +53 -153
- data/lib/gollum/frontend/public/gollum/livepreview/js/ace/lib/ace/mode/powershell_highlight_rules.js +31 -21
- data/lib/gollum/frontend/public/gollum/livepreview/js/ace/lib/ace/mode/python.js +28 -36
- data/lib/gollum/frontend/public/gollum/livepreview/js/ace/lib/ace/mode/python_highlight_rules.js +44 -61
- data/lib/gollum/frontend/public/gollum/livepreview/js/ace/lib/ace/mode/python_test.js +25 -32
- data/lib/gollum/frontend/public/gollum/livepreview/js/ace/lib/ace/mode/r.js +135 -0
- data/lib/gollum/frontend/public/gollum/livepreview/js/ace/lib/ace/mode/r_highlight_rules.js +190 -0
- data/lib/gollum/frontend/public/gollum/livepreview/js/ace/lib/ace/mode/rdoc.js +36 -0
- data/lib/gollum/frontend/public/gollum/livepreview/js/ace/lib/ace/mode/rdoc_highlight_rules.js +99 -0
- data/lib/gollum/frontend/public/gollum/livepreview/js/ace/lib/ace/mode/rhtml.js +67 -0
- data/lib/gollum/frontend/public/gollum/livepreview/js/ace/lib/ace/mode/rhtml_highlight_rules.js +49 -0
- data/lib/gollum/frontend/public/gollum/livepreview/js/ace/lib/ace/mode/ruby.js +27 -33
- data/lib/gollum/frontend/public/gollum/livepreview/js/ace/lib/ace/mode/ruby_highlight_rules.js +102 -90
- data/lib/gollum/frontend/public/gollum/livepreview/js/ace/lib/ace/mode/ruby_highlight_rules_test.js +29 -37
- data/lib/gollum/frontend/public/gollum/livepreview/js/ace/lib/ace/mode/scad.js +25 -33
- data/lib/gollum/frontend/public/gollum/livepreview/js/ace/lib/ace/mode/scad_highlight_rules.js +32 -54
- data/lib/gollum/frontend/public/gollum/livepreview/js/ace/lib/ace/mode/scala_highlight_rules.js +18 -32
- data/lib/gollum/frontend/public/gollum/livepreview/js/ace/lib/ace/mode/scss.js +25 -32
- data/lib/gollum/frontend/public/gollum/livepreview/js/ace/lib/ace/mode/scss_highlight_rules.js +25 -32
- data/lib/gollum/frontend/public/gollum/livepreview/js/ace/lib/ace/mode/sh.js +28 -35
- data/lib/gollum/frontend/public/gollum/livepreview/js/ace/lib/ace/mode/sh_highlight_rules.js +48 -64
- data/lib/gollum/frontend/public/gollum/livepreview/js/ace/lib/ace/mode/sql.js +28 -18
- data/lib/gollum/frontend/public/gollum/livepreview/js/ace/lib/ace/mode/sql_highlight_rules.js +41 -36
- data/lib/gollum/frontend/public/gollum/livepreview/js/ace/lib/ace/mode/stylus.js +62 -0
- data/lib/gollum/frontend/public/gollum/livepreview/js/ace/lib/ace/mode/stylus_highlight_rules.js +175 -0
- data/lib/gollum/frontend/public/gollum/livepreview/js/ace/lib/ace/mode/svg.js +25 -32
- data/lib/gollum/frontend/public/gollum/livepreview/js/ace/lib/ace/mode/svg_highlight_rules.js +26 -33
- data/lib/gollum/frontend/public/gollum/livepreview/js/ace/lib/ace/mode/tcl.js +110 -0
- data/lib/gollum/frontend/public/gollum/livepreview/js/ace/lib/ace/mode/tcl_highlight_rules.js +180 -0
- data/lib/gollum/frontend/public/gollum/livepreview/js/ace/lib/ace/mode/tex.js +48 -0
- data/lib/gollum/frontend/public/gollum/livepreview/js/ace/lib/ace/mode/tex_highlight_rules.js +107 -0
- data/lib/gollum/frontend/public/gollum/livepreview/js/ace/lib/ace/mode/text.js +26 -36
- data/lib/gollum/frontend/public/gollum/livepreview/js/ace/lib/ace/mode/text_highlight_rules.js +57 -46
- data/lib/gollum/frontend/public/gollum/livepreview/js/ace/lib/ace/mode/text_test.js +25 -32
- data/lib/gollum/frontend/public/gollum/livepreview/js/ace/lib/ace/mode/textile.js +25 -32
- data/lib/gollum/frontend/public/gollum/livepreview/js/ace/lib/ace/mode/textile_highlight_rules.js +26 -33
- data/lib/gollum/frontend/public/gollum/livepreview/js/ace/lib/ace/mode/typescript.js +68 -0
- data/lib/gollum/frontend/public/gollum/livepreview/js/ace/lib/ace/mode/typescript_highlight_rules.js +98 -0
- data/lib/gollum/frontend/public/gollum/livepreview/js/ace/lib/ace/mode/xml.js +25 -32
- data/lib/gollum/frontend/public/gollum/livepreview/js/ace/lib/ace/mode/xml_highlight_rules.js +27 -34
- data/lib/gollum/frontend/public/gollum/livepreview/js/ace/lib/ace/mode/xml_highlight_rules_test.js +183 -78
- data/lib/gollum/frontend/public/gollum/livepreview/js/ace/lib/ace/mode/xml_test.js +25 -32
- data/lib/gollum/frontend/public/gollum/livepreview/js/ace/lib/ace/mode/xml_util.js +30 -38
- data/lib/gollum/frontend/public/gollum/livepreview/js/ace/lib/ace/mode/xquery.js +32 -37
- data/lib/gollum/frontend/public/gollum/livepreview/js/ace/lib/ace/mode/xquery/JSONParseTreeHandler.js +92 -0
- data/lib/gollum/frontend/public/gollum/livepreview/js/ace/lib/ace/mode/xquery/XQueryParser.js +32954 -42497
- data/lib/gollum/frontend/public/gollum/livepreview/js/ace/lib/ace/mode/xquery/visitors/SyntaxHighlighter.js +316 -0
- data/lib/gollum/frontend/public/gollum/livepreview/js/ace/lib/ace/mode/xquery_highlight_rules.js +31 -44
- data/lib/gollum/frontend/public/gollum/livepreview/js/ace/lib/ace/mode/xquery_worker.js +48 -57
- data/lib/gollum/frontend/public/gollum/livepreview/js/ace/lib/ace/mode/yaml.js +30 -18
- data/lib/gollum/frontend/public/gollum/livepreview/js/ace/lib/ace/mode/yaml_highlight_rules.js +48 -40
- data/lib/gollum/frontend/public/gollum/livepreview/js/ace/lib/ace/model/editor.js +26 -34
- data/lib/gollum/frontend/public/gollum/livepreview/js/ace/lib/ace/mouse/default_gutter_handler.js +126 -40
- data/lib/gollum/frontend/public/gollum/livepreview/js/ace/lib/ace/mouse/default_handlers.js +35 -43
- data/lib/gollum/frontend/public/gollum/livepreview/js/ace/lib/ace/mouse/dragdrop.js +28 -35
- data/lib/gollum/frontend/public/gollum/livepreview/js/ace/lib/ace/mouse/fold_handler.js +78 -39
- data/lib/gollum/frontend/public/gollum/livepreview/js/ace/lib/ace/mouse/mouse_event.js +26 -34
- data/lib/gollum/frontend/public/gollum/livepreview/js/ace/lib/ace/mouse/mouse_handler.js +39 -36
- data/lib/gollum/frontend/public/gollum/livepreview/js/ace/lib/ace/mouse/multi_select_handler.js +26 -34
- data/lib/gollum/frontend/public/gollum/livepreview/js/ace/lib/ace/multi_select.js +234 -103
- data/lib/gollum/frontend/public/gollum/livepreview/js/ace/lib/ace/multi_select_test.js +26 -34
- data/lib/gollum/frontend/public/gollum/livepreview/js/ace/lib/ace/placeholder.js +30 -39
- data/lib/gollum/frontend/public/gollum/livepreview/js/ace/lib/ace/placeholder_test.js +27 -35
- data/lib/gollum/frontend/public/gollum/livepreview/js/ace/lib/ace/range.js +190 -201
- data/lib/gollum/frontend/public/gollum/livepreview/js/ace/lib/ace/range_list.js +25 -32
- data/lib/gollum/frontend/public/gollum/livepreview/js/ace/lib/ace/range_list_test.js +25 -32
- data/lib/gollum/frontend/public/gollum/livepreview/js/ace/lib/ace/range_test.js +25 -32
- data/lib/gollum/frontend/public/gollum/livepreview/js/ace/lib/ace/renderloop.js +31 -49
- data/lib/gollum/frontend/public/gollum/livepreview/js/ace/lib/ace/requirejs/text.js +27 -34
- data/lib/gollum/frontend/public/gollum/livepreview/js/ace/lib/ace/scrollbar.js +52 -55
- data/lib/gollum/frontend/public/gollum/livepreview/js/ace/lib/ace/search.js +91 -105
- data/lib/gollum/frontend/public/gollum/livepreview/js/ace/lib/ace/search_highlight.js +31 -34
- data/lib/gollum/frontend/public/gollum/livepreview/js/ace/lib/ace/search_test.js +47 -37
- data/lib/gollum/frontend/public/gollum/livepreview/js/ace/lib/ace/selection.js +138 -153
- data/lib/gollum/frontend/public/gollum/livepreview/js/ace/lib/ace/selection_test.js +25 -32
- data/lib/gollum/frontend/public/gollum/livepreview/js/ace/lib/ace/split.js +67 -105
- data/lib/gollum/frontend/public/gollum/livepreview/js/ace/lib/ace/test/all.js +25 -32
- data/lib/gollum/frontend/public/gollum/livepreview/js/ace/lib/ace/test/all_browser.js +3 -2
- data/lib/gollum/frontend/public/gollum/livepreview/js/ace/lib/ace/test/assertions.js +25 -32
- data/lib/gollum/frontend/public/gollum/livepreview/js/ace/lib/ace/test/benchmark.js +25 -32
- data/lib/gollum/frontend/public/gollum/livepreview/js/ace/lib/ace/test/mockrenderer.js +30 -34
- data/lib/gollum/frontend/public/gollum/livepreview/js/ace/lib/ace/theme/ambiance.css +217 -0
- data/lib/gollum/frontend/public/gollum/livepreview/js/ace/lib/ace/theme/ambiance.js +33 -0
- data/lib/gollum/frontend/public/gollum/livepreview/js/ace/lib/ace/theme/chrome.css +37 -38
- data/lib/gollum/frontend/public/gollum/livepreview/js/ace/lib/ace/theme/chrome.js +27 -34
- data/lib/gollum/frontend/public/gollum/livepreview/js/ace/lib/ace/theme/clouds.css +53 -47
- data/lib/gollum/frontend/public/gollum/livepreview/js/ace/lib/ace/theme/clouds.js +28 -35
- data/lib/gollum/frontend/public/gollum/livepreview/js/ace/lib/ace/theme/clouds_midnight.css +54 -48
- data/lib/gollum/frontend/public/gollum/livepreview/js/ace/lib/ace/theme/clouds_midnight.js +28 -35
- data/lib/gollum/frontend/public/gollum/livepreview/js/ace/lib/ace/theme/cobalt.css +58 -59
- data/lib/gollum/frontend/public/gollum/livepreview/js/ace/lib/ace/theme/cobalt.js +28 -35
- data/lib/gollum/frontend/public/gollum/livepreview/js/ace/lib/ace/theme/crimson_editor.css +33 -33
- data/lib/gollum/frontend/public/gollum/livepreview/js/ace/lib/ace/theme/crimson_editor.js +26 -33
- data/lib/gollum/frontend/public/gollum/livepreview/js/ace/lib/ace/theme/dawn.css +52 -64
- data/lib/gollum/frontend/public/gollum/livepreview/js/ace/lib/ace/theme/dawn.js +28 -35
- data/lib/gollum/frontend/public/gollum/livepreview/js/ace/lib/ace/theme/dreamweaver.css +33 -36
- data/lib/gollum/frontend/public/gollum/livepreview/js/ace/lib/ace/theme/dreamweaver.js +26 -33
- data/lib/gollum/frontend/public/gollum/livepreview/js/ace/lib/ace/theme/eclipse.css +29 -25
- data/lib/gollum/frontend/public/gollum/livepreview/js/ace/lib/ace/theme/eclipse.js +26 -33
- data/lib/gollum/frontend/public/gollum/livepreview/js/ace/lib/ace/theme/github.css +14 -21
- data/lib/gollum/frontend/public/gollum/livepreview/js/ace/lib/ace/theme/github.js +26 -33
- data/lib/gollum/frontend/public/gollum/livepreview/js/ace/lib/ace/theme/idle_fingers.css +48 -60
- data/lib/gollum/frontend/public/gollum/livepreview/js/ace/lib/ace/theme/idle_fingers.js +28 -35
- data/lib/gollum/frontend/public/gollum/livepreview/js/ace/lib/ace/theme/kr_theme.css +52 -57
- data/lib/gollum/frontend/public/gollum/livepreview/js/ace/lib/ace/theme/kr_theme.js +28 -35
- data/lib/gollum/frontend/public/gollum/livepreview/js/ace/lib/ace/theme/merbivore.css +53 -71
- data/lib/gollum/frontend/public/gollum/livepreview/js/ace/lib/ace/theme/merbivore.js +28 -35
- data/lib/gollum/frontend/public/gollum/livepreview/js/ace/lib/ace/theme/merbivore_soft.css +54 -77
- data/lib/gollum/frontend/public/gollum/livepreview/js/ace/lib/ace/theme/merbivore_soft.js +28 -35
- data/lib/gollum/frontend/public/gollum/livepreview/js/ace/lib/ace/theme/mono_industrial.css +60 -70
- data/lib/gollum/frontend/public/gollum/livepreview/js/ace/lib/ace/theme/mono_industrial.js +28 -35
- data/lib/gollum/frontend/public/gollum/livepreview/js/ace/lib/ace/theme/monokai.css +55 -72
- data/lib/gollum/frontend/public/gollum/livepreview/js/ace/lib/ace/theme/monokai.js +28 -35
- data/lib/gollum/frontend/public/gollum/livepreview/js/ace/lib/ace/theme/pastel_on_dark.css +55 -64
- data/lib/gollum/frontend/public/gollum/livepreview/js/ace/lib/ace/theme/pastel_on_dark.js +28 -35
- data/lib/gollum/frontend/public/gollum/livepreview/js/ace/lib/ace/theme/solarized_dark.css +48 -66
- data/lib/gollum/frontend/public/gollum/livepreview/js/ace/lib/ace/theme/solarized_dark.js +28 -35
- data/lib/gollum/frontend/public/gollum/livepreview/js/ace/lib/ace/theme/solarized_light.css +49 -61
- data/lib/gollum/frontend/public/gollum/livepreview/js/ace/lib/ace/theme/solarized_light.js +28 -35
- data/lib/gollum/frontend/public/gollum/livepreview/js/ace/lib/ace/theme/textmate.css +38 -44
- data/lib/gollum/frontend/public/gollum/livepreview/js/ace/lib/ace/theme/textmate.js +26 -33
- data/lib/gollum/frontend/public/gollum/livepreview/js/ace/lib/ace/theme/tomorrow.css +59 -87
- data/lib/gollum/frontend/public/gollum/livepreview/js/ace/lib/ace/theme/tomorrow.js +28 -35
- data/lib/gollum/frontend/public/gollum/livepreview/js/ace/lib/ace/theme/tomorrow_night.css +59 -87
- data/lib/gollum/frontend/public/gollum/livepreview/js/ace/lib/ace/theme/tomorrow_night.js +28 -35
- data/lib/gollum/frontend/public/gollum/livepreview/js/ace/lib/ace/theme/tomorrow_night_blue.css +59 -90
- data/lib/gollum/frontend/public/gollum/livepreview/js/ace/lib/ace/theme/tomorrow_night_blue.js +28 -35
- data/lib/gollum/frontend/public/gollum/livepreview/js/ace/lib/ace/theme/tomorrow_night_bright.css +59 -87
- data/lib/gollum/frontend/public/gollum/livepreview/js/ace/lib/ace/theme/tomorrow_night_bright.js +28 -35
- data/lib/gollum/frontend/public/gollum/livepreview/js/ace/lib/ace/theme/tomorrow_night_eighties.css +57 -85
- data/lib/gollum/frontend/public/gollum/livepreview/js/ace/lib/ace/theme/tomorrow_night_eighties.js +28 -35
- data/lib/gollum/frontend/public/gollum/livepreview/js/ace/lib/ace/theme/twilight.css +54 -78
- data/lib/gollum/frontend/public/gollum/livepreview/js/ace/lib/ace/theme/twilight.js +28 -35
- data/lib/gollum/frontend/public/gollum/livepreview/js/ace/lib/ace/theme/vibrant_ink.css +45 -68
- data/lib/gollum/frontend/public/gollum/livepreview/js/ace/lib/ace/theme/vibrant_ink.js +28 -35
- data/lib/gollum/frontend/public/gollum/livepreview/js/ace/lib/ace/theme/xcode.css +111 -0
- data/lib/gollum/frontend/public/gollum/livepreview/js/ace/lib/ace/theme/xcode.js +39 -0
- data/lib/gollum/frontend/public/gollum/livepreview/js/ace/lib/ace/token_iterator.js +37 -50
- data/lib/gollum/frontend/public/gollum/livepreview/js/ace/lib/ace/token_iterator_test.js +26 -33
- data/lib/gollum/frontend/public/gollum/livepreview/js/ace/lib/ace/tokenizer.js +40 -41
- data/lib/gollum/frontend/public/gollum/livepreview/js/ace/lib/ace/tokenizer_dev.js +205 -0
- data/lib/gollum/frontend/public/gollum/livepreview/js/ace/lib/ace/undomanager.js +48 -55
- data/lib/gollum/frontend/public/gollum/livepreview/js/ace/lib/ace/virtual_renderer.js +254 -277
- data/lib/gollum/frontend/public/gollum/livepreview/js/ace/lib/ace/virtual_renderer_test.js +25 -32
- data/lib/gollum/frontend/public/gollum/livepreview/js/ace/lib/ace/worker/worker.js +22 -4
- data/lib/gollum/frontend/public/gollum/livepreview/js/ace/lib/ace/worker/worker_client.js +97 -56
- data/lib/gollum/frontend/public/gollum/livepreview/licenses/ace/LICENSE.txt +24 -476
- data/lib/gollum/frontend/public/gollum/livepreview/licenses/licenses.txt +2 -2
- data/lib/gollum/frontend/views/page.rb +3 -2
- metadata +102 -21
- data/lib/gollum/frontend/public/gollum/livepreview/js/ace/lib/ace/mode/xquery/Position.js +0 -59
- data/lib/gollum/frontend/public/gollum/livepreview/js/ace/lib/ace/mode/xquery/StringLexer.js +0 -1686
- data/lib/gollum/frontend/public/gollum/livepreview/js/ace/lib/ace/mode/xquery/XMLLexer.js +0 -2993
- data/lib/gollum/frontend/public/gollum/livepreview/js/ace/lib/ace/mode/xquery/XQDTLexer.js +0 -69
- data/lib/gollum/frontend/public/gollum/livepreview/js/ace/lib/ace/mode/xquery/XQDTParser.js +0 -63
- data/lib/gollum/frontend/public/gollum/livepreview/js/ace/lib/ace/mode/xquery/XQueryLexer.js +0 -10363
- data/lib/gollum/frontend/public/gollum/livepreview/js/ace/lib/ace/mode/xquery/XQuerySemanticHighlighter.js +0 -165
- data/lib/gollum/frontend/public/gollum/livepreview/js/ace/lib/ace/mode/xquery/antlr3-all.js +0 -6177
- data/lib/gollum/frontend/public/gollum/livepreview/js/ace/lib/ace/mode/xquery/xquery.js +0 -55
- data/lib/gollum/frontend/public/gollum/livepreview/js/ace/lib/ace/narcissus/definitions.js +0 -696
- data/lib/gollum/frontend/public/gollum/livepreview/js/ace/lib/ace/narcissus/lexer.js +0 -598
- data/lib/gollum/frontend/public/gollum/livepreview/js/ace/lib/ace/narcissus/options.js +0 -61
- data/lib/gollum/frontend/public/gollum/livepreview/js/ace/lib/ace/narcissus/parser.js +0 -2072
- data/lib/gollum/frontend/public/gollum/livepreview/js/ace/lib/ace/worker/jshint.js +0 -4469
- data/lib/gollum/frontend/public/gollum/livepreview/js/ace/lib/ace/worker/jslint.js +0 -6396
data/lib/gollum/frontend/public/gollum/livepreview/js/ace/lib/ace/mode/coffee/parser_test.js
CHANGED
@@ -1,37 +1,30 @@
|
|
1
1
|
/* ***** BEGIN LICENSE BLOCK *****
|
2
|
-
*
|
2
|
+
* Distributed under the BSD license:
|
3
3
|
*
|
4
|
-
*
|
5
|
-
*
|
6
|
-
*
|
7
|
-
*
|
8
|
-
*
|
9
|
-
*
|
10
|
-
*
|
11
|
-
*
|
12
|
-
*
|
13
|
-
*
|
14
|
-
*
|
15
|
-
*
|
16
|
-
*
|
17
|
-
*
|
18
|
-
*
|
19
|
-
*
|
20
|
-
*
|
21
|
-
*
|
22
|
-
*
|
23
|
-
*
|
24
|
-
*
|
25
|
-
*
|
26
|
-
*
|
27
|
-
*
|
28
|
-
* of those above. If you wish to allow use of your version of this file only
|
29
|
-
* under the terms of either the GPL or the LGPL, and not to allow others to
|
30
|
-
* use your version of this file under the terms of the MPL, indicate your
|
31
|
-
* decision by deleting the provisions above and replace them with the notice
|
32
|
-
* and other provisions required by the GPL or the LGPL. If you do not delete
|
33
|
-
* the provisions above, a recipient may use your version of this file under
|
34
|
-
* the terms of any one of the MPL, the GPL or the LGPL.
|
4
|
+
* Copyright (c) 2010, Ajax.org B.V.
|
5
|
+
* All rights reserved.
|
6
|
+
*
|
7
|
+
* Redistribution and use in source and binary forms, with or without
|
8
|
+
* modification, are permitted provided that the following conditions are met:
|
9
|
+
* * Redistributions of source code must retain the above copyright
|
10
|
+
* notice, this list of conditions and the following disclaimer.
|
11
|
+
* * Redistributions in binary form must reproduce the above copyright
|
12
|
+
* notice, this list of conditions and the following disclaimer in the
|
13
|
+
* documentation and/or other materials provided with the distribution.
|
14
|
+
* * Neither the name of Ajax.org B.V. nor the
|
15
|
+
* names of its contributors may be used to endorse or promote products
|
16
|
+
* derived from this software without specific prior written permission.
|
17
|
+
*
|
18
|
+
* THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND
|
19
|
+
* ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED
|
20
|
+
* WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
|
21
|
+
* DISCLAIMED. IN NO EVENT SHALL AJAX.ORG B.V. BE LIABLE FOR ANY
|
22
|
+
* DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES
|
23
|
+
* (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;
|
24
|
+
* LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND
|
25
|
+
* ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
|
26
|
+
* (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS
|
27
|
+
* SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
|
35
28
|
*
|
36
29
|
* ***** END LICENSE BLOCK ***** */
|
37
30
|
|
@@ -1,5 +1,5 @@
|
|
1
|
-
|
2
|
-
* Copyright (c)
|
1
|
+
/**
|
2
|
+
* Copyright (c) 2009-2012 Jeremy Ashkenas
|
3
3
|
*
|
4
4
|
* Permission is hereby granted, free of charge, to any person
|
5
5
|
* obtaining a copy of this software and associated documentation
|
@@ -24,7 +24,7 @@
|
|
24
24
|
*/
|
25
25
|
|
26
26
|
define(function(require, exports, module) {
|
27
|
-
// Generated by CoffeeScript 1.
|
27
|
+
// Generated by CoffeeScript 1.3.3
|
28
28
|
|
29
29
|
var BALANCED_PAIRS, EXPRESSION_CLOSE, EXPRESSION_END, EXPRESSION_START, IMPLICIT_BLOCK, IMPLICIT_CALL, IMPLICIT_END, IMPLICIT_FUNC, IMPLICIT_UNSPACED_CALL, INVERSES, LINEBREAKS, SINGLE_CLOSERS, SINGLE_LINERS, left, rite, _i, _len, _ref,
|
30
30
|
__indexOf = [].indexOf || function(item) { for (var i = 0, l = this.length; i < l; i++) { if (i in this && this[i] === item) return i; } return -1; },
|
@@ -32,8 +32,6 @@ define(function(require, exports, module) {
|
|
32
32
|
|
33
33
|
exports.Rewriter = (function() {
|
34
34
|
|
35
|
-
Rewriter.name = 'Rewriter';
|
36
|
-
|
37
35
|
function Rewriter() {}
|
38
36
|
|
39
37
|
Rewriter.prototype.rewrite = function(tokens) {
|
@@ -67,7 +65,9 @@ define(function(require, exports, module) {
|
|
67
65
|
if (levels === 0 && condition.call(this, token, i)) {
|
68
66
|
return action.call(this, token, i);
|
69
67
|
}
|
70
|
-
if (!token || levels < 0)
|
68
|
+
if (!token || levels < 0) {
|
69
|
+
return action.call(this, token, i - 1);
|
70
|
+
}
|
71
71
|
if (_ref = token[0], __indexOf.call(EXPRESSION_START, _ref) >= 0) {
|
72
72
|
levels += 1;
|
73
73
|
} else if (_ref1 = token[0], __indexOf.call(EXPRESSION_END, _ref1) >= 0) {
|
@@ -83,9 +83,13 @@ define(function(require, exports, module) {
|
|
83
83
|
_ref = this.tokens;
|
84
84
|
for (i = _i = 0, _len = _ref.length; _i < _len; i = ++_i) {
|
85
85
|
tag = _ref[i][0];
|
86
|
-
if (tag !== 'TERMINATOR')
|
86
|
+
if (tag !== 'TERMINATOR') {
|
87
|
+
break;
|
88
|
+
}
|
89
|
+
}
|
90
|
+
if (i) {
|
91
|
+
return this.tokens.splice(0, i);
|
87
92
|
}
|
88
|
-
if (i) return this.tokens.splice(0, i);
|
89
93
|
};
|
90
94
|
|
91
95
|
Rewriter.prototype.removeMidExpressionNewlines = function() {
|
@@ -109,7 +113,9 @@ define(function(require, exports, module) {
|
|
109
113
|
return this.tokens[token[0] === 'OUTDENT' ? i - 1 : i][0] = 'CALL_END';
|
110
114
|
};
|
111
115
|
return this.scanTokens(function(token, i) {
|
112
|
-
if (token[0] === 'CALL_START')
|
116
|
+
if (token[0] === 'CALL_START') {
|
117
|
+
this.detectEnd(i + 1, condition, action);
|
118
|
+
}
|
113
119
|
return 1;
|
114
120
|
});
|
115
121
|
};
|
@@ -124,25 +130,32 @@ define(function(require, exports, module) {
|
|
124
130
|
return token[0] = 'INDEX_END';
|
125
131
|
};
|
126
132
|
return this.scanTokens(function(token, i) {
|
127
|
-
if (token[0] === 'INDEX_START')
|
133
|
+
if (token[0] === 'INDEX_START') {
|
134
|
+
this.detectEnd(i + 1, condition, action);
|
135
|
+
}
|
128
136
|
return 1;
|
129
137
|
});
|
130
138
|
};
|
131
139
|
|
132
140
|
Rewriter.prototype.addImplicitBraces = function() {
|
133
|
-
var action, condition, sameLine, stack, start, startIndent, startsLine;
|
141
|
+
var action, condition, sameLine, stack, start, startIndent, startIndex, startsLine;
|
134
142
|
stack = [];
|
135
143
|
start = null;
|
136
144
|
startsLine = null;
|
137
145
|
sameLine = true;
|
138
146
|
startIndent = 0;
|
147
|
+
startIndex = 0;
|
139
148
|
condition = function(token, i) {
|
140
149
|
var one, tag, three, two, _ref, _ref1;
|
141
|
-
_ref = this.tokens.slice(i + 1, (i + 3) + 1 || 9e9), one = _ref[0], two = _ref[1], three = _ref[2];
|
142
|
-
if ('HERECOMMENT' === (one != null ? one[0] : void 0))
|
150
|
+
_ref = this.tokens.slice(i + 1, +(i + 3) + 1 || 9e9), one = _ref[0], two = _ref[1], three = _ref[2];
|
151
|
+
if ('HERECOMMENT' === (one != null ? one[0] : void 0)) {
|
152
|
+
return false;
|
153
|
+
}
|
143
154
|
tag = token[0];
|
144
|
-
if (__indexOf.call(LINEBREAKS, tag) >= 0)
|
145
|
-
|
155
|
+
if (__indexOf.call(LINEBREAKS, tag) >= 0) {
|
156
|
+
sameLine = false;
|
157
|
+
}
|
158
|
+
return (((tag === 'TERMINATOR' || tag === 'OUTDENT') || (__indexOf.call(IMPLICIT_END, tag) >= 0 && sameLine && !(i - startIndex === 1))) && ((!startsLine && this.tag(i - 1) !== ',') || !((two != null ? two[0] : void 0) === ':' || (one != null ? one[0] : void 0) === '@' && (three != null ? three[0] : void 0) === ':'))) || (tag === ',' && one && ((_ref1 = one[0]) !== 'IDENTIFIER' && _ref1 !== 'NUMBER' && _ref1 !== 'STRING' && _ref1 !== '@' && _ref1 !== 'TERMINATOR' && _ref1 !== 'OUTDENT'));
|
146
159
|
};
|
147
160
|
action = function(token, i) {
|
148
161
|
var tok;
|
@@ -163,6 +176,7 @@ define(function(require, exports, module) {
|
|
163
176
|
return 1;
|
164
177
|
}
|
165
178
|
sameLine = true;
|
179
|
+
startIndex = i + 1;
|
166
180
|
stack.push(['{']);
|
167
181
|
idx = ago === '@' ? i - 2 : i - 1;
|
168
182
|
while (this.tag(idx - 2) === 'HERECOMMENT') {
|
@@ -185,7 +199,9 @@ define(function(require, exports, module) {
|
|
185
199
|
condition = function(token, i) {
|
186
200
|
var post, tag, _ref, _ref1;
|
187
201
|
tag = token[0];
|
188
|
-
if (!seenSingle && token.fromThen)
|
202
|
+
if (!seenSingle && token.fromThen) {
|
203
|
+
return true;
|
204
|
+
}
|
189
205
|
if (tag === 'IF' || tag === 'ELSE' || tag === 'CATCH' || tag === '->' || tag === '=>' || tag === 'CLASS') {
|
190
206
|
seenSingle = true;
|
191
207
|
}
|
@@ -206,19 +222,27 @@ define(function(require, exports, module) {
|
|
206
222
|
if (tag === 'CLASS' || tag === 'IF' || tag === 'FOR' || tag === 'WHILE') {
|
207
223
|
noCall = true;
|
208
224
|
}
|
209
|
-
_ref = tokens.slice(i - 1, (i + 1) + 1 || 9e9), prev = _ref[0], current = _ref[1], next = _ref[2];
|
225
|
+
_ref = tokens.slice(i - 1, +(i + 1) + 1 || 9e9), prev = _ref[0], current = _ref[1], next = _ref[2];
|
210
226
|
callObject = !noCall && tag === 'INDENT' && next && next.generated && next[0] === '{' && prev && (_ref1 = prev[0], __indexOf.call(IMPLICIT_FUNC, _ref1) >= 0);
|
211
227
|
seenSingle = false;
|
212
228
|
seenControl = false;
|
213
|
-
if (__indexOf.call(LINEBREAKS, tag) >= 0)
|
214
|
-
|
215
|
-
|
229
|
+
if (__indexOf.call(LINEBREAKS, tag) >= 0) {
|
230
|
+
noCall = false;
|
231
|
+
}
|
232
|
+
if (prev && !prev.spaced && tag === '?') {
|
233
|
+
token.call = true;
|
234
|
+
}
|
235
|
+
if (token.fromThen) {
|
236
|
+
return 1;
|
237
|
+
}
|
216
238
|
if (!(callObject || (prev != null ? prev.spaced : void 0) && (prev.call || (_ref2 = prev[0], __indexOf.call(IMPLICIT_FUNC, _ref2) >= 0)) && (__indexOf.call(IMPLICIT_CALL, tag) >= 0 || !(token.spaced || token.newLine) && __indexOf.call(IMPLICIT_UNSPACED_CALL, tag) >= 0))) {
|
217
239
|
return 1;
|
218
240
|
}
|
219
241
|
tokens.splice(i, 0, this.generate('CALL_START', '(', token[2]));
|
220
242
|
this.detectEnd(i + 1, condition, action);
|
221
|
-
if (prev[0] === '?')
|
243
|
+
if (prev[0] === '?') {
|
244
|
+
prev[0] = 'FUNC_EXIST';
|
245
|
+
}
|
222
246
|
return 2;
|
223
247
|
});
|
224
248
|
};
|
@@ -251,10 +275,14 @@ define(function(require, exports, module) {
|
|
251
275
|
if (__indexOf.call(SINGLE_LINERS, tag) >= 0 && this.tag(i + 1) !== 'INDENT' && !(tag === 'ELSE' && this.tag(i + 1) === 'IF')) {
|
252
276
|
starter = tag;
|
253
277
|
_ref1 = this.indentation(token, true), indent = _ref1[0], outdent = _ref1[1];
|
254
|
-
if (starter === 'THEN')
|
278
|
+
if (starter === 'THEN') {
|
279
|
+
indent.fromThen = true;
|
280
|
+
}
|
255
281
|
tokens.splice(i + 1, 0, indent);
|
256
282
|
this.detectEnd(i + 2, condition, action);
|
257
|
-
if (tag === 'THEN')
|
283
|
+
if (tag === 'THEN') {
|
284
|
+
tokens.splice(i, 1);
|
285
|
+
}
|
258
286
|
return 1;
|
259
287
|
}
|
260
288
|
return 1;
|
@@ -274,7 +302,9 @@ define(function(require, exports, module) {
|
|
274
302
|
}
|
275
303
|
};
|
276
304
|
return this.scanTokens(function(token, i) {
|
277
|
-
if (token[0] !== 'IF')
|
305
|
+
if (token[0] !== 'IF') {
|
306
|
+
return 1;
|
307
|
+
}
|
278
308
|
original = token;
|
279
309
|
this.detectEnd(i + 1, condition, action);
|
280
310
|
return 1;
|
@@ -283,10 +313,14 @@ define(function(require, exports, module) {
|
|
283
313
|
|
284
314
|
Rewriter.prototype.indentation = function(token, implicit) {
|
285
315
|
var indent, outdent;
|
286
|
-
if (implicit == null)
|
316
|
+
if (implicit == null) {
|
317
|
+
implicit = false;
|
318
|
+
}
|
287
319
|
indent = ['INDENT', 2, token[2]];
|
288
320
|
outdent = ['OUTDENT', 2, token[2]];
|
289
|
-
if (implicit)
|
321
|
+
if (implicit) {
|
322
|
+
indent.generated = outdent.generated = true;
|
323
|
+
}
|
290
324
|
return [indent, outdent];
|
291
325
|
};
|
292
326
|
|
@@ -324,7 +358,7 @@ define(function(require, exports, module) {
|
|
324
358
|
|
325
359
|
IMPLICIT_FUNC = ['IDENTIFIER', 'SUPER', ')', 'CALL_END', ']', 'INDEX_END', '@', 'THIS'];
|
326
360
|
|
327
|
-
IMPLICIT_CALL = ['IDENTIFIER', 'NUMBER', 'STRING', 'JS', 'REGEX', 'NEW', 'PARAM_START', 'CLASS', 'IF', 'TRY', 'SWITCH', 'THIS', 'BOOL', 'UNARY', 'SUPER', '@', '->', '=>', '[', '(', '{', '--', '++'];
|
361
|
+
IMPLICIT_CALL = ['IDENTIFIER', 'NUMBER', 'STRING', 'JS', 'REGEX', 'NEW', 'PARAM_START', 'CLASS', 'IF', 'TRY', 'SWITCH', 'THIS', 'BOOL', 'NULL', 'UNDEFINED', 'UNARY', 'SUPER', '@', '->', '=>', '[', '(', '{', '--', '++'];
|
328
362
|
|
329
363
|
IMPLICIT_UNSPACED_CALL = ['+', '-'];
|
330
364
|
|
@@ -339,4 +373,4 @@ define(function(require, exports, module) {
|
|
339
373
|
LINEBREAKS = ['TERMINATOR', 'INDENT', 'OUTDENT'];
|
340
374
|
|
341
375
|
|
342
|
-
});
|
376
|
+
});
|
@@ -1,5 +1,5 @@
|
|
1
|
-
|
2
|
-
* Copyright (c)
|
1
|
+
/**
|
2
|
+
* Copyright (c) 2009-2012 Jeremy Ashkenas
|
3
3
|
*
|
4
4
|
* Permission is hereby granted, free of charge, to any person
|
5
5
|
* obtaining a copy of this software and associated documentation
|
@@ -24,7 +24,7 @@
|
|
24
24
|
*/
|
25
25
|
|
26
26
|
define(function(require, exports, module) {
|
27
|
-
// Generated by CoffeeScript 1.
|
27
|
+
// Generated by CoffeeScript 1.3.3
|
28
28
|
|
29
29
|
var Scope, extend, last, _ref;
|
30
30
|
|
@@ -32,8 +32,6 @@ define(function(require, exports, module) {
|
|
32
32
|
|
33
33
|
exports.Scope = Scope = (function() {
|
34
34
|
|
35
|
-
Scope.name = 'Scope';
|
36
|
-
|
37
35
|
Scope.root = null;
|
38
36
|
|
39
37
|
function Scope(parent, expressions, method) {
|
@@ -47,11 +45,15 @@ define(function(require, exports, module) {
|
|
47
45
|
}
|
48
46
|
];
|
49
47
|
this.positions = {};
|
50
|
-
if (!this.parent)
|
48
|
+
if (!this.parent) {
|
49
|
+
Scope.root = this;
|
50
|
+
}
|
51
51
|
}
|
52
52
|
|
53
53
|
Scope.prototype.add = function(name, type, immediate) {
|
54
|
-
if (this.shared && !immediate)
|
54
|
+
if (this.shared && !immediate) {
|
55
|
+
return this.parent.add(name, type, immediate);
|
56
|
+
}
|
55
57
|
if (Object.prototype.hasOwnProperty.call(this.positions, name)) {
|
56
58
|
return this.variables[this.positions[name]].type = type;
|
57
59
|
} else {
|
@@ -62,22 +64,31 @@ define(function(require, exports, module) {
|
|
62
64
|
}
|
63
65
|
};
|
64
66
|
|
65
|
-
Scope.prototype.
|
66
|
-
if (this.
|
67
|
+
Scope.prototype.namedMethod = function() {
|
68
|
+
if (this.method.name || !this.parent) {
|
69
|
+
return this.method;
|
70
|
+
}
|
71
|
+
return this.parent.namedMethod();
|
72
|
+
};
|
73
|
+
|
74
|
+
Scope.prototype.find = function(name) {
|
75
|
+
if (this.check(name)) {
|
76
|
+
return true;
|
77
|
+
}
|
67
78
|
this.add(name, 'var');
|
68
79
|
return false;
|
69
80
|
};
|
70
81
|
|
71
82
|
Scope.prototype.parameter = function(name) {
|
72
|
-
if (this.shared && this.parent.check(name, true))
|
83
|
+
if (this.shared && this.parent.check(name, true)) {
|
84
|
+
return;
|
85
|
+
}
|
73
86
|
return this.add(name, 'param');
|
74
87
|
};
|
75
88
|
|
76
|
-
Scope.prototype.check = function(name
|
77
|
-
var
|
78
|
-
|
79
|
-
if (found || immediate) return found;
|
80
|
-
return !!((_ref1 = this.parent) != null ? _ref1.check(name) : void 0);
|
89
|
+
Scope.prototype.check = function(name) {
|
90
|
+
var _ref1;
|
91
|
+
return !!(this.type(name) || ((_ref1 = this.parent) != null ? _ref1.check(name) : void 0));
|
81
92
|
};
|
82
93
|
|
83
94
|
Scope.prototype.temporary = function(name, index) {
|
@@ -93,19 +104,25 @@ define(function(require, exports, module) {
|
|
93
104
|
_ref1 = this.variables;
|
94
105
|
for (_i = 0, _len = _ref1.length; _i < _len; _i++) {
|
95
106
|
v = _ref1[_i];
|
96
|
-
if (v.name === name)
|
107
|
+
if (v.name === name) {
|
108
|
+
return v.type;
|
109
|
+
}
|
97
110
|
}
|
98
111
|
return null;
|
99
112
|
};
|
100
113
|
|
101
114
|
Scope.prototype.freeVariable = function(name, reserve) {
|
102
115
|
var index, temp;
|
103
|
-
if (reserve == null)
|
116
|
+
if (reserve == null) {
|
117
|
+
reserve = true;
|
118
|
+
}
|
104
119
|
index = 0;
|
105
120
|
while (this.check((temp = this.temporary(name, index)))) {
|
106
121
|
index++;
|
107
122
|
}
|
108
|
-
if (reserve)
|
123
|
+
if (reserve) {
|
124
|
+
this.add(temp, 'var', true);
|
125
|
+
}
|
109
126
|
return temp;
|
110
127
|
};
|
111
128
|
|
@@ -141,7 +158,9 @@ define(function(require, exports, module) {
|
|
141
158
|
_results = [];
|
142
159
|
for (_i = 0, _len = _ref1.length; _i < _len; _i++) {
|
143
160
|
v = _ref1[_i];
|
144
|
-
if (v.type.assigned)
|
161
|
+
if (v.type.assigned) {
|
162
|
+
_results.push("" + v.name + " = " + v.type.value);
|
163
|
+
}
|
145
164
|
}
|
146
165
|
return _results;
|
147
166
|
};
|
@@ -151,4 +170,4 @@ define(function(require, exports, module) {
|
|
151
170
|
})();
|
152
171
|
|
153
172
|
|
154
|
-
});
|
173
|
+
});
|
data/lib/gollum/frontend/public/gollum/livepreview/js/ace/lib/ace/mode/coffee_highlight_rules.js
CHANGED
@@ -1,47 +1,39 @@
|
|
1
1
|
/* ***** BEGIN LICENSE BLOCK *****
|
2
|
-
*
|
2
|
+
* Distributed under the BSD license:
|
3
3
|
*
|
4
|
-
*
|
5
|
-
*
|
6
|
-
*
|
7
|
-
*
|
8
|
-
*
|
9
|
-
*
|
10
|
-
*
|
11
|
-
*
|
12
|
-
*
|
13
|
-
*
|
14
|
-
*
|
15
|
-
*
|
16
|
-
*
|
17
|
-
*
|
18
|
-
*
|
19
|
-
*
|
20
|
-
*
|
21
|
-
*
|
22
|
-
*
|
23
|
-
*
|
24
|
-
*
|
25
|
-
*
|
26
|
-
*
|
27
|
-
*
|
28
|
-
* of those above. If you wish to allow use of your version of this file only
|
29
|
-
* under the terms of either the GPL or the LGPL, and not to allow others to
|
30
|
-
* use your version of this file under the terms of the MPL, indicate your
|
31
|
-
* decision by deleting the provisions above and replace them with the notice
|
32
|
-
* and other provisions required by the GPL or the LGPL. If you do not delete
|
33
|
-
* the provisions above, a recipient may use your version of this file under
|
34
|
-
* the terms of any one of the MPL, the GPL or the LGPL.
|
4
|
+
* Copyright (c) 2010, Ajax.org B.V.
|
5
|
+
* All rights reserved.
|
6
|
+
*
|
7
|
+
* Redistribution and use in source and binary forms, with or without
|
8
|
+
* modification, are permitted provided that the following conditions are met:
|
9
|
+
* * Redistributions of source code must retain the above copyright
|
10
|
+
* notice, this list of conditions and the following disclaimer.
|
11
|
+
* * Redistributions in binary form must reproduce the above copyright
|
12
|
+
* notice, this list of conditions and the following disclaimer in the
|
13
|
+
* documentation and/or other materials provided with the distribution.
|
14
|
+
* * Neither the name of Ajax.org B.V. nor the
|
15
|
+
* names of its contributors may be used to endorse or promote products
|
16
|
+
* derived from this software without specific prior written permission.
|
17
|
+
*
|
18
|
+
* THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND
|
19
|
+
* ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED
|
20
|
+
* WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
|
21
|
+
* DISCLAIMED. IN NO EVENT SHALL AJAX.ORG B.V. BE LIABLE FOR ANY
|
22
|
+
* DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES
|
23
|
+
* (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;
|
24
|
+
* LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND
|
25
|
+
* ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
|
26
|
+
* (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS
|
27
|
+
* SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
|
35
28
|
*
|
36
29
|
* ***** END LICENSE BLOCK ***** */
|
37
30
|
|
38
31
|
define(function(require, exports, module) {
|
39
32
|
"use strict";
|
40
33
|
|
41
|
-
var lang = require("../lib/lang");
|
42
34
|
var oop = require("../lib/oop");
|
43
35
|
var TextHighlightRules = require("./text_highlight_rules").TextHighlightRules;
|
44
|
-
|
36
|
+
|
45
37
|
oop.inherits(CoffeeHighlightRules, TextHighlightRules);
|
46
38
|
|
47
39
|
function CoffeeHighlightRules() {
|
@@ -52,59 +44,71 @@ define(function(require, exports, module) {
|
|
52
44
|
regex : ".+"
|
53
45
|
};
|
54
46
|
|
55
|
-
var keywords =
|
56
|
-
"this|throw|then|try|typeof|super|switch|return|break|by
|
47
|
+
var keywords = (
|
48
|
+
"this|throw|then|try|typeof|super|switch|return|break|by|continue|" +
|
57
49
|
"catch|class|in|instanceof|is|isnt|if|else|extends|for|forown|" +
|
58
50
|
"finally|function|while|when|new|no|not|delete|debugger|do|loop|of|off|" +
|
59
|
-
"or|on|unless|until|and|yes"
|
51
|
+
"or|on|unless|until|and|yes"
|
60
52
|
);
|
61
|
-
|
62
|
-
var langConstant =
|
63
|
-
"true|false|null|undefined
|
53
|
+
|
54
|
+
var langConstant = (
|
55
|
+
"true|false|null|undefined|NaN|Infinity"
|
64
56
|
);
|
65
|
-
|
66
|
-
var illegal =
|
57
|
+
|
58
|
+
var illegal = (
|
67
59
|
"case|const|default|function|var|void|with|enum|export|implements|" +
|
68
60
|
"interface|let|package|private|protected|public|static|yield|" +
|
69
|
-
"__hasProp|
|
61
|
+
"__hasProp|slice|bind|indexOf"
|
70
62
|
);
|
71
|
-
|
72
|
-
var supportClass =
|
73
|
-
"Array|Boolean|Date|Function|Number|Object|RegExp|ReferenceError|" +
|
74
|
-
"
|
63
|
+
|
64
|
+
var supportClass = (
|
65
|
+
"Array|Boolean|Date|Function|Number|Object|RegExp|ReferenceError|String|" +
|
66
|
+
"Error|EvalError|InternalError|RangeError|ReferenceError|StopIteration|" +
|
67
|
+
"SyntaxError|TypeError|URIError|" +
|
68
|
+
"ArrayBuffer|Float32Array|Float64Array|Int16Array|Int32Array|Int8Array|" +
|
69
|
+
"Uint16Array|Uint32Array|Uint8Array|Uint8ClampedArray"
|
75
70
|
);
|
76
|
-
|
77
|
-
var supportFunction =
|
71
|
+
|
72
|
+
var supportFunction = (
|
78
73
|
"Math|JSON|isNaN|isFinite|parseInt|parseFloat|encodeURI|" +
|
79
|
-
"encodeURIComponent|decodeURI|decodeURIComponent|
|
80
|
-
"SyntaxError|Error|EvalError|TypeError|URIError").split("|")
|
74
|
+
"encodeURIComponent|decodeURI|decodeURIComponent|String|"
|
81
75
|
);
|
82
76
|
|
77
|
+
var variableLanguage = (
|
78
|
+
"window|arguments|prototype|document"
|
79
|
+
);
|
80
|
+
|
81
|
+
var keywordMapper = this.createKeywordMapper({
|
82
|
+
"keyword": keywords,
|
83
|
+
"constant.language": langConstant,
|
84
|
+
"invalid.illegal": illegal,
|
85
|
+
"language.support.class": supportClass,
|
86
|
+
"language.support.function": supportFunction,
|
87
|
+
"variable.language": variableLanguage
|
88
|
+
}, "identifier");
|
89
|
+
|
90
|
+
var functionRules = {
|
91
|
+
"({args})->": {
|
92
|
+
token: ["paren.lparen", "text", "paren.lparen", "text", "variable.parameter", "text", "paren.rparen", "text", "paren.rparen", "text", "storage.type"],
|
93
|
+
regex: "(\\()(\\s*)(\\{)(\\s*)([$@A-Za-z_\\x7f-\\uffff][$@\\w\\s,\\x7f-\\uffff]*)(\\s*)(\\})(\\s*)(\\))(\\s*)([\\-=]>)"
|
94
|
+
},
|
95
|
+
"({})->": {
|
96
|
+
token: ["paren.lparen", "text", "paren.lparen", "text", "paren.rparen", "text", "paren.rparen", "text", "storage.type"],
|
97
|
+
regex: "(\\()(\\s*)(\\{)(\\s*)(\\})(\\s*)(\\))(\\s*)([\\-=]>)"
|
98
|
+
},
|
99
|
+
"(args)->": {
|
100
|
+
token: ["paren.lparen", "text", "variable.parameter", "text", "paren.rparen", "text", "storage.type"],
|
101
|
+
regex: "(\\()(\\s*)([$@A-Za-z_\\x7f-\\uffff][\\s\\x21-\\uffff]*)(\\s*)(\\))(\\s*)([\\-=]>)"
|
102
|
+
},
|
103
|
+
"()->": {
|
104
|
+
token: ["paren.lparen", "text", "paren.rparen", "text", "storage.type"],
|
105
|
+
regex: "(\\()(\\s*)(\\))(\\s*)([\\-=]>)"
|
106
|
+
}
|
107
|
+
};
|
108
|
+
|
83
109
|
this.$rules = {
|
84
110
|
start : [
|
85
111
|
{
|
86
|
-
token : "identifier",
|
87
|
-
regex : "(?:(?:\\.|::)\\s*)" + identifier
|
88
|
-
}, {
|
89
|
-
token : "variable",
|
90
|
-
regex : "@(?:" + identifier + ")?"
|
91
|
-
}, {
|
92
|
-
token: function(value) {
|
93
|
-
if (keywords.hasOwnProperty(value))
|
94
|
-
return "keyword";
|
95
|
-
else if (langConstant.hasOwnProperty(value))
|
96
|
-
return "constant.language";
|
97
|
-
else if (illegal.hasOwnProperty(value))
|
98
|
-
return "invalid.illegal";
|
99
|
-
else if (supportClass.hasOwnProperty(value))
|
100
|
-
return "language.support.class";
|
101
|
-
else if (supportFunction.hasOwnProperty(value))
|
102
|
-
return "language.support.function";
|
103
|
-
else
|
104
|
-
return "identifier";
|
105
|
-
},
|
106
|
-
regex : identifier
|
107
|
-
}, {
|
108
112
|
token : "constant.numeric",
|
109
113
|
regex : "(?:0x[\\da-fA-F]+|(?:\\d+(?:\\.\\d+)?|\\.\\d+)(?:[eE][+-]?\\d+)?)"
|
110
114
|
}, {
|
@@ -139,7 +143,7 @@ define(function(require, exports, module) {
|
|
139
143
|
next : "heregex"
|
140
144
|
}, {
|
141
145
|
token : "string.regex",
|
142
|
-
regex :
|
146
|
+
regex : /(?:\/(?![\s=])[^[\/\n\\]*(?:(?:\\[\s\S]|\[[^\]\n\\]*(?:\\[\s\S][^\]\n\\]*)*])[^[\/\n\\]*)*\/)(?:[imgy]{0,4})(?!\w)/
|
143
147
|
}, {
|
144
148
|
token : "comment",
|
145
149
|
merge : true,
|
@@ -148,12 +152,109 @@ define(function(require, exports, module) {
|
|
148
152
|
}, {
|
149
153
|
token : "comment",
|
150
154
|
regex : "#.*"
|
155
|
+
}, {
|
156
|
+
token : [
|
157
|
+
"punctuation.operator", "identifier"
|
158
|
+
],
|
159
|
+
regex : "(\\.)(" + illegal + ")"
|
160
|
+
}, {
|
161
|
+
token : "punctuation.operator",
|
162
|
+
regex : "\\."
|
163
|
+
}, {
|
164
|
+
//class A extends B
|
165
|
+
token : [
|
166
|
+
"keyword", "text", "language.support.class", "text", "keyword", "text", "language.support.class"
|
167
|
+
],
|
168
|
+
regex : "(class)(\\s+)(" + identifier + ")(\\s+)(extends)(\\s+)(" + identifier + ")"
|
169
|
+
}, {
|
170
|
+
//class A
|
171
|
+
token : [
|
172
|
+
"keyword", "text", "language.support.class"
|
173
|
+
],
|
174
|
+
regex : "(class)(\\s+)(" + identifier + ")"
|
175
|
+
}, {
|
176
|
+
//play = ({args}) ->
|
177
|
+
token : [
|
178
|
+
"entity.name.function", "text", "keyword.operator", "text"
|
179
|
+
].concat(functionRules["({args})->"].token),
|
180
|
+
regex : "(" + identifier + ")(\\s*)(=)(\\s*)" + functionRules["({args})->"].regex
|
181
|
+
}, {
|
182
|
+
//play : ({args}) ->
|
183
|
+
token : [
|
184
|
+
"entity.name.function", "text", "punctuation.operator", "text"
|
185
|
+
].concat(functionRules["({args})->"].token),
|
186
|
+
regex : "(" + identifier + ")(\\s*)(:)(\\s*)" + functionRules["({args})->"].regex
|
187
|
+
}, {
|
188
|
+
//play = ({}) ->
|
189
|
+
token : [
|
190
|
+
"entity.name.function", "text", "keyword.operator", "text"
|
191
|
+
].concat(functionRules["({})->"].token),
|
192
|
+
regex : "(" + identifier + ")(\\s*)(=)(\\s*)" + functionRules["({})->"].regex
|
193
|
+
}, {
|
194
|
+
//play : ({}) ->
|
195
|
+
token : [
|
196
|
+
"entity.name.function", "text", "punctuation.operator", "text"
|
197
|
+
].concat(functionRules["({})->"].token),
|
198
|
+
regex : "(" + identifier + ")(\\s*)(:)(\\s*)" + functionRules["({})->"].regex
|
199
|
+
}, {
|
200
|
+
//play = (args) ->
|
201
|
+
token : [
|
202
|
+
"entity.name.function", "text", "keyword.operator", "text"
|
203
|
+
].concat(functionRules["(args)->"].token),
|
204
|
+
regex : "(" + identifier + ")(\\s*)(=)(\\s*)" + functionRules["(args)->"].regex
|
205
|
+
}, {
|
206
|
+
//play : (args) ->
|
207
|
+
token : [
|
208
|
+
"entity.name.function", "text", "punctuation.operator", "text"
|
209
|
+
].concat(functionRules["(args)->"].token),
|
210
|
+
regex : "(" + identifier + ")(\\s*)(:)(\\s*)" + functionRules["(args)->"].regex
|
211
|
+
}, {
|
212
|
+
//play = () ->
|
213
|
+
token : [
|
214
|
+
"entity.name.function", "text", "keyword.operator", "text"
|
215
|
+
].concat(functionRules["()->"].token),
|
216
|
+
regex : "(" + identifier + ")(\\s*)(=)(\\s*)" + functionRules["()->"].regex
|
217
|
+
}, {
|
218
|
+
//play : () ->
|
219
|
+
token : [
|
220
|
+
"entity.name.function", "text", "punctuation.operator", "text"
|
221
|
+
].concat(functionRules["()->"].token),
|
222
|
+
regex : "(" + identifier + ")(\\s*)(:)(\\s*)" + functionRules["()->"].regex
|
223
|
+
}, {
|
224
|
+
//play = ->
|
225
|
+
token : [
|
226
|
+
"entity.name.function", "text", "keyword.operator", "text", "storage.type"
|
227
|
+
],
|
228
|
+
regex : "(" + identifier + ")(\\s*)(=)(\\s*)([\\-=]>)"
|
229
|
+
}, {
|
230
|
+
//play : ->
|
231
|
+
token : [
|
232
|
+
"entity.name.function", "text", "punctuation.operator", "text", "storage.type"
|
233
|
+
],
|
234
|
+
regex : "(" + identifier + ")(\\s*)(:)(\\s*)([\\-=]>)"
|
235
|
+
},
|
236
|
+
functionRules["({args})->"],
|
237
|
+
functionRules["({})->"],
|
238
|
+
functionRules["(args)->"],
|
239
|
+
functionRules["()->"]
|
240
|
+
, {
|
241
|
+
token : "identifier",
|
242
|
+
regex : "(?:(?:\\.|::)\\s*)" + identifier
|
243
|
+
}, {
|
244
|
+
token : "variable",
|
245
|
+
regex : "@(?:" + identifier + ")?"
|
246
|
+
}, {
|
247
|
+
token: keywordMapper,
|
248
|
+
regex : identifier
|
151
249
|
}, {
|
152
250
|
token : "punctuation.operator",
|
153
251
|
regex : "\\?|\\:|\\,|\\."
|
252
|
+
}, {
|
253
|
+
token : "storage.type",
|
254
|
+
regex : "[\\-=]>"
|
154
255
|
}, {
|
155
256
|
token : "keyword.operator",
|
156
|
-
regex : "(?:[
|
257
|
+
regex : "(?:[-+*/%<>&|^!?=]=|>>>=?|\\-\\-|\\+\\+|::|&&=|\\|\\|=|<<=|>>=|\\?\\.|\\.{2,3}|[!*+-=><])"
|
157
258
|
}, {
|
158
259
|
token : "paren.lparen",
|
159
260
|
regex : "[({[]"
|
@@ -164,40 +265,40 @@ define(function(require, exports, module) {
|
|
164
265
|
token : "text",
|
165
266
|
regex : "\\s+"
|
166
267
|
}],
|
167
|
-
|
268
|
+
|
168
269
|
qdoc : [{
|
169
270
|
token : "string",
|
170
271
|
regex : ".*?'''",
|
171
272
|
next : "start"
|
172
273
|
}, stringfill],
|
173
|
-
|
274
|
+
|
174
275
|
qqdoc : [{
|
175
276
|
token : "string",
|
176
277
|
regex : '.*?"""',
|
177
278
|
next : "start"
|
178
279
|
}, stringfill],
|
179
|
-
|
280
|
+
|
180
281
|
qstring : [{
|
181
282
|
token : "string",
|
182
283
|
regex : "[^\\\\']*(?:\\\\.[^\\\\']*)*'",
|
183
284
|
merge : true,
|
184
285
|
next : "start"
|
185
286
|
}, stringfill],
|
186
|
-
|
287
|
+
|
187
288
|
qqstring : [{
|
188
289
|
token : "string",
|
189
290
|
regex : '[^\\\\"]*(?:\\\\.[^\\\\"]*)*"',
|
190
291
|
merge : true,
|
191
292
|
next : "start"
|
192
293
|
}, stringfill],
|
193
|
-
|
294
|
+
|
194
295
|
js : [{
|
195
296
|
token : "string",
|
196
297
|
merge : true,
|
197
298
|
regex : "[^\\\\`]*(?:\\\\.[^\\\\`]*)*`",
|
198
299
|
next : "start"
|
199
300
|
}, stringfill],
|
200
|
-
|
301
|
+
|
201
302
|
heregex : [{
|
202
303
|
token : "string.regex",
|
203
304
|
regex : '.*?///[imgy]{0,4}',
|
@@ -210,7 +311,7 @@ define(function(require, exports, module) {
|
|
210
311
|
merge : true,
|
211
312
|
regex : "\\S+"
|
212
313
|
}],
|
213
|
-
|
314
|
+
|
214
315
|
comment : [{
|
215
316
|
token : "comment",
|
216
317
|
regex : '.*?###',
|