gollum 3.1.2 → 3.1.3
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.
- checksums.yaml +13 -5
- data/README.md +4 -5
- data/gollum.gemspec +560 -28
- data/lib/gollum.rb +1 -1
- data/lib/gollum/app.rb +16 -10
- data/lib/gollum/public/gollum/javascript/editor/gollum.editor.js +1 -1
- data/lib/gollum/public/gollum/livepreview/js/ace/lib/ace/ace.js +33 -11
- data/lib/gollum/public/gollum/livepreview/js/ace/lib/ace/anchor.js +77 -80
- data/lib/gollum/public/gollum/livepreview/js/ace/lib/ace/anchor_test.js +46 -0
- data/lib/gollum/public/gollum/livepreview/js/ace/lib/ace/autocomplete.js +497 -0
- data/lib/gollum/public/gollum/livepreview/js/ace/lib/ace/autocomplete/popup.js +341 -0
- data/lib/gollum/public/gollum/livepreview/js/ace/lib/ace/autocomplete/text_completer.js +78 -0
- data/lib/gollum/public/gollum/livepreview/js/ace/lib/ace/autocomplete/util.js +74 -0
- data/lib/gollum/public/gollum/livepreview/js/ace/lib/ace/background_tokenizer.js +28 -32
- data/lib/gollum/public/gollum/livepreview/js/ace/lib/ace/background_tokenizer_test.js +5 -5
- data/lib/gollum/public/gollum/livepreview/js/ace/lib/ace/commands/command_manager.js +17 -20
- data/lib/gollum/public/gollum/livepreview/js/ace/lib/ace/commands/command_manager_test.js +1 -1
- data/lib/gollum/public/gollum/livepreview/js/ace/lib/ace/commands/default_commands.js +312 -58
- data/lib/gollum/public/gollum/livepreview/js/ace/lib/ace/commands/incremental_search_commands.js +232 -0
- data/lib/gollum/public/gollum/livepreview/js/ace/lib/ace/commands/multi_select_commands.js +17 -1
- data/lib/gollum/public/gollum/livepreview/js/ace/lib/ace/commands/occur_commands.js +110 -0
- data/lib/gollum/public/gollum/livepreview/js/ace/lib/ace/config.js +70 -7
- data/lib/gollum/public/gollum/livepreview/js/ace/lib/ace/config_test.js +67 -3
- data/lib/gollum/public/gollum/livepreview/js/ace/lib/ace/css/editor.css +123 -69
- data/lib/gollum/public/gollum/livepreview/js/ace/lib/ace/document.js +118 -71
- data/lib/gollum/public/gollum/livepreview/js/ace/lib/ace/edit_session.js +507 -392
- data/lib/gollum/public/gollum/livepreview/js/ace/lib/ace/edit_session/bracket_match.js +4 -2
- data/lib/gollum/public/gollum/livepreview/js/ace/lib/ace/edit_session/fold.js +37 -5
- data/lib/gollum/public/gollum/livepreview/js/ace/lib/ace/edit_session/fold_line.js +30 -29
- data/lib/gollum/public/gollum/livepreview/js/ace/lib/ace/edit_session/folding.js +210 -102
- data/lib/gollum/public/gollum/livepreview/js/ace/lib/ace/edit_session_test.js +82 -8
- data/lib/gollum/public/gollum/livepreview/js/ace/lib/ace/editor.js +1006 -465
- data/lib/gollum/public/gollum/livepreview/js/ace/lib/ace/editor_highlight_selected_word_test.js +2 -2
- data/lib/gollum/public/gollum/livepreview/js/ace/lib/ace/editor_text_edit_test.js +36 -34
- data/lib/gollum/public/gollum/livepreview/js/ace/lib/ace/ext/beautify.js +57 -0
- data/lib/gollum/public/gollum/livepreview/js/ace/lib/ace/ext/beautify/php_rules.js +366 -0
- data/lib/gollum/public/gollum/livepreview/js/ace/lib/ace/ext/chromevox.js +980 -0
- data/lib/gollum/public/gollum/livepreview/js/ace/lib/ace/ext/elastic_tabstops_lite.js +319 -0
- data/lib/gollum/public/gollum/livepreview/js/ace/lib/ace/ext/emmet.js +434 -0
- data/lib/gollum/public/gollum/livepreview/js/ace/lib/ace/ext/error_marker.js +214 -0
- data/lib/gollum/public/gollum/livepreview/js/ace/lib/ace/ext/keybinding_menu.js +86 -0
- data/lib/gollum/public/gollum/livepreview/js/ace/lib/ace/ext/language_tools.js +226 -0
- data/lib/gollum/public/gollum/livepreview/js/ace/lib/ace/ext/linking.js +78 -0
- data/lib/gollum/public/gollum/livepreview/js/ace/lib/ace/ext/menu_tools/add_editor_menu_options.js +109 -0
- data/lib/gollum/public/gollum/livepreview/js/ace/lib/ace/ext/menu_tools/element_generator.js +148 -0
- data/lib/gollum/public/gollum/livepreview/js/ace/lib/ace/ext/menu_tools/generate_settings_menu.js +264 -0
- data/lib/gollum/public/gollum/livepreview/js/ace/lib/ace/ext/menu_tools/get_editor_keyboard_shortcuts.js +91 -0
- data/lib/gollum/public/gollum/livepreview/js/ace/lib/ace/ext/menu_tools/get_set_functions.js +141 -0
- data/lib/gollum/public/gollum/livepreview/js/ace/lib/ace/ext/menu_tools/overlay_page.js +116 -0
- data/lib/gollum/public/gollum/livepreview/js/ace/lib/ace/ext/menu_tools/settings_menu.css +48 -0
- data/lib/gollum/public/gollum/livepreview/js/ace/lib/ace/ext/modelist.js +195 -0
- data/lib/gollum/public/gollum/livepreview/js/ace/lib/ace/ext/old_ie.js +114 -0
- data/lib/gollum/public/gollum/livepreview/js/ace/lib/ace/ext/old_ie_test.js +77 -0
- data/lib/gollum/public/gollum/livepreview/js/ace/lib/ace/ext/searchbox.css +153 -0
- data/lib/gollum/public/gollum/livepreview/js/ace/lib/ace/ext/searchbox.js +308 -0
- data/lib/gollum/public/gollum/livepreview/js/ace/lib/ace/ext/settings_menu.js +76 -0
- data/lib/gollum/public/gollum/livepreview/js/ace/lib/ace/ext/spellcheck.js +69 -0
- data/lib/gollum/public/gollum/livepreview/js/ace/lib/ace/{keyboard/vim/registers.js → ext/split.js} +8 -10
- data/lib/gollum/public/gollum/livepreview/js/ace/lib/ace/ext/static.css +18 -9
- data/lib/gollum/public/gollum/livepreview/js/ace/lib/ace/ext/static_highlight.js +128 -26
- data/lib/gollum/public/gollum/livepreview/js/ace/lib/ace/ext/static_highlight_test.js +56 -36
- data/lib/gollum/public/gollum/livepreview/js/ace/lib/ace/ext/statusbar.js +48 -0
- data/lib/gollum/public/gollum/livepreview/js/ace/lib/ace/ext/textarea.js +112 -117
- data/lib/gollum/public/gollum/livepreview/js/ace/lib/ace/ext/themelist.js +100 -0
- data/lib/gollum/public/gollum/livepreview/js/ace/lib/ace/ext/whitespace.js +213 -0
- data/lib/gollum/public/gollum/livepreview/js/ace/lib/ace/ext/whitespace_test.js +116 -0
- data/lib/gollum/public/gollum/livepreview/js/ace/lib/ace/incremental_search.js +317 -0
- data/lib/gollum/public/gollum/livepreview/js/ace/lib/ace/incremental_search_test.js +213 -0
- data/lib/gollum/public/gollum/livepreview/js/ace/lib/ace/keyboard/emacs.js +369 -92
- data/lib/gollum/public/gollum/livepreview/js/ace/lib/ace/keyboard/emacs_test.js +151 -0
- data/lib/gollum/public/gollum/livepreview/js/ace/lib/ace/keyboard/hash_handler.js +109 -41
- data/lib/gollum/public/gollum/livepreview/js/ace/lib/ace/keyboard/keybinding.js +35 -24
- data/lib/gollum/public/gollum/livepreview/js/ace/lib/ace/keyboard/keybinding_test.js +69 -0
- data/lib/gollum/public/gollum/livepreview/js/ace/lib/ace/keyboard/state_handler.js +1 -2
- data/lib/gollum/public/gollum/livepreview/js/ace/lib/ace/keyboard/textarea.js +82 -0
- data/lib/gollum/public/gollum/livepreview/js/ace/lib/ace/keyboard/textinput.js +337 -208
- data/lib/gollum/public/gollum/livepreview/js/ace/lib/ace/keyboard/vim.js +5987 -120
- data/lib/gollum/public/gollum/livepreview/js/ace/lib/ace/keyboard/vim_test.js +3866 -0
- data/lib/gollum/public/gollum/livepreview/js/ace/lib/ace/layer/cursor.js +48 -25
- data/lib/gollum/public/gollum/livepreview/js/ace/lib/ace/layer/font_metrics.js +176 -0
- data/lib/gollum/public/gollum/livepreview/js/ace/lib/ace/layer/gutter.js +110 -44
- data/lib/gollum/public/gollum/livepreview/js/ace/lib/ace/layer/marker.js +29 -14
- data/lib/gollum/public/gollum/livepreview/js/ace/lib/ace/layer/text.js +69 -150
- data/lib/gollum/public/gollum/livepreview/js/ace/lib/ace/layer/text_test.js +11 -10
- data/lib/gollum/public/gollum/livepreview/js/ace/lib/ace/lib/app_config.js +157 -0
- data/lib/gollum/public/gollum/livepreview/js/ace/lib/ace/lib/dom.js +33 -31
- data/lib/gollum/public/gollum/livepreview/js/ace/lib/ace/lib/es5-shim.js +284 -304
- data/lib/gollum/public/gollum/livepreview/js/ace/lib/ace/lib/event.js +147 -95
- data/lib/gollum/public/gollum/livepreview/js/ace/lib/ace/lib/event_emitter.js +64 -23
- data/lib/gollum/public/gollum/livepreview/js/ace/lib/ace/lib/keys.js +35 -9
- data/lib/gollum/public/gollum/livepreview/js/ace/lib/ace/lib/lang.js +30 -13
- data/lib/gollum/public/gollum/livepreview/js/ace/lib/ace/lib/net.js +21 -39
- data/lib/gollum/public/gollum/livepreview/js/ace/lib/ace/lib/oop.js +12 -9
- data/lib/gollum/public/gollum/livepreview/js/ace/lib/ace/lib/useragent.js +8 -4
- data/lib/gollum/public/gollum/livepreview/js/ace/lib/ace/line_widgets.js +297 -0
- data/lib/gollum/public/gollum/livepreview/js/ace/lib/ace/mode/_test/Readme.md +9 -0
- data/lib/gollum/public/gollum/livepreview/js/ace/lib/ace/mode/_test/highlight_rules_test.js +210 -0
- data/lib/gollum/public/gollum/livepreview/js/ace/lib/ace/mode/_test/text_asciidoc.txt +111 -0
- data/lib/gollum/public/gollum/livepreview/js/ace/lib/ace/mode/_test/text_coffee.txt +57 -0
- data/lib/gollum/public/gollum/livepreview/js/ace/lib/ace/mode/_test/text_curly.txt +9 -0
- data/lib/gollum/public/gollum/livepreview/js/ace/lib/ace/mode/_test/text_html.txt +10 -0
- data/lib/gollum/public/gollum/livepreview/js/ace/lib/ace/mode/_test/text_javascript.txt +34 -0
- data/lib/gollum/public/gollum/livepreview/js/ace/lib/ace/mode/_test/text_livescript.txt +1 -0
- data/lib/gollum/public/gollum/livepreview/js/ace/lib/ace/mode/_test/text_lucene.txt +16 -0
- data/lib/gollum/public/gollum/livepreview/js/ace/lib/ace/mode/_test/text_markdown.txt +22 -0
- data/lib/gollum/public/gollum/livepreview/js/ace/lib/ace/mode/_test/text_php.txt +24 -0
- data/lib/gollum/public/gollum/livepreview/js/ace/lib/ace/mode/_test/text_ruby.txt +34 -0
- data/lib/gollum/public/gollum/livepreview/js/ace/lib/ace/mode/_test/text_xml.txt +7 -0
- data/lib/gollum/public/gollum/livepreview/js/ace/lib/ace/mode/_test/tokens_abap.json +189 -0
- data/lib/gollum/public/gollum/livepreview/js/ace/lib/ace/mode/_test/tokens_abc.json +2207 -0
- data/lib/gollum/public/gollum/livepreview/js/ace/lib/ace/mode/_test/tokens_actionscript.json +263 -0
- data/lib/gollum/public/gollum/livepreview/js/ace/lib/ace/mode/_test/tokens_ada.json +39 -0
- data/lib/gollum/public/gollum/livepreview/js/ace/lib/ace/mode/_test/tokens_asciidoc.json +422 -0
- data/lib/gollum/public/gollum/livepreview/js/ace/lib/ace/mode/_test/tokens_assembly_x86.json +114 -0
- data/lib/gollum/public/gollum/livepreview/js/ace/lib/ace/mode/_test/tokens_autohotkey.json +261 -0
- data/lib/gollum/public/gollum/livepreview/js/ace/lib/ace/mode/_test/tokens_batchfile.json +70 -0
- data/lib/gollum/public/gollum/livepreview/js/ace/lib/ace/mode/_test/tokens_c9search.json +131 -175
- data/lib/gollum/public/gollum/livepreview/js/ace/lib/ace/mode/_test/tokens_c_cpp.json +190 -124
- data/lib/gollum/public/gollum/livepreview/js/ace/lib/ace/mode/_test/tokens_cirru.json +267 -0
- data/lib/gollum/public/gollum/livepreview/js/ace/lib/ace/mode/_test/tokens_clojure.json +162 -248
- data/lib/gollum/public/gollum/livepreview/js/ace/lib/ace/mode/_test/tokens_cobol.json +4 -0
- data/lib/gollum/public/gollum/livepreview/js/ace/lib/ace/mode/_test/tokens_coffee.json +545 -188
- data/lib/gollum/public/gollum/livepreview/js/ace/lib/ace/mode/_test/tokens_coldfusion.json +26 -41
- data/lib/gollum/public/gollum/livepreview/js/ace/lib/ace/mode/_test/tokens_csharp.json +31 -42
- data/lib/gollum/public/gollum/livepreview/js/ace/lib/ace/mode/_test/tokens_css.json +148 -231
- data/lib/gollum/public/gollum/livepreview/js/ace/lib/ace/mode/_test/tokens_curly.json +56 -0
- data/lib/gollum/public/gollum/livepreview/js/ace/lib/ace/mode/_test/tokens_d.json +111 -0
- data/lib/gollum/public/gollum/livepreview/js/ace/lib/ace/mode/_test/tokens_dart.json +368 -0
- data/lib/gollum/public/gollum/livepreview/js/ace/lib/ace/mode/_test/tokens_diff.json +262 -732
- data/lib/gollum/public/gollum/livepreview/js/ace/lib/ace/mode/_test/tokens_dot.json +2254 -0
- data/lib/gollum/public/gollum/livepreview/js/ace/lib/ace/mode/_test/tokens_eiffel.json +141 -0
- data/lib/gollum/public/gollum/livepreview/js/ace/lib/ace/mode/_test/tokens_ejs.json +296 -0
- data/lib/gollum/public/gollum/livepreview/js/ace/lib/ace/mode/_test/tokens_elixir.json +196 -0
- data/lib/gollum/public/gollum/livepreview/js/ace/lib/ace/mode/_test/tokens_elm.json +198 -0
- data/lib/gollum/public/gollum/livepreview/js/ace/lib/ace/mode/_test/tokens_erlang.json +166 -0
- data/lib/gollum/public/gollum/livepreview/js/ace/lib/ace/mode/_test/tokens_forth.json +219 -0
- data/lib/gollum/public/gollum/livepreview/js/ace/lib/ace/mode/_test/tokens_ftl.json +341 -0
- data/lib/gollum/public/gollum/livepreview/js/ace/lib/ace/mode/_test/tokens_gcode.json +296 -0
- data/lib/gollum/public/gollum/livepreview/js/ace/lib/ace/mode/_test/tokens_gherkin.json +142 -0
- data/lib/gollum/public/gollum/livepreview/js/ace/lib/ace/mode/_test/tokens_gitignore.json +33 -0
- data/lib/gollum/public/gollum/livepreview/js/ace/lib/ace/mode/_test/tokens_glsl.json +127 -185
- data/lib/gollum/public/gollum/livepreview/js/ace/lib/ace/mode/_test/tokens_golang.json +256 -362
- data/lib/gollum/public/gollum/livepreview/js/ace/lib/ace/mode/_test/tokens_groovy.json +410 -529
- data/lib/gollum/public/gollum/livepreview/js/ace/lib/ace/mode/_test/tokens_haml.json +174 -0
- data/lib/gollum/public/gollum/livepreview/js/ace/lib/ace/mode/_test/tokens_handlebars.json +81 -0
- data/lib/gollum/public/gollum/livepreview/js/ace/lib/ace/mode/_test/tokens_haskell.json +156 -0
- data/lib/gollum/public/gollum/livepreview/js/ace/lib/ace/mode/_test/tokens_haxe.json +143 -195
- data/lib/gollum/public/gollum/livepreview/js/ace/lib/ace/mode/_test/tokens_html.json +63 -150
- data/lib/gollum/public/gollum/livepreview/js/ace/lib/ace/mode/_test/tokens_html_ruby.json +257 -0
- data/lib/gollum/public/gollum/livepreview/js/ace/lib/ace/mode/_test/tokens_ini.json +23 -0
- data/lib/gollum/public/gollum/livepreview/js/ace/lib/ace/mode/_test/tokens_io.json +49 -0
- data/lib/gollum/public/gollum/livepreview/js/ace/lib/ace/mode/_test/tokens_jack.json +1786 -0
- data/lib/gollum/public/gollum/livepreview/js/ace/lib/ace/mode/_test/tokens_jade.json +188 -0
- data/lib/gollum/public/gollum/livepreview/js/ace/lib/ace/mode/_test/tokens_java.json +95 -139
- data/lib/gollum/public/gollum/livepreview/js/ace/lib/ace/mode/_test/tokens_javascript.json +593 -555
- data/lib/gollum/public/gollum/livepreview/js/ace/lib/ace/mode/_test/tokens_json.json +412 -611
- data/lib/gollum/public/gollum/livepreview/js/ace/lib/ace/mode/_test/tokens_jsoniq.json +4 -0
- data/lib/gollum/public/gollum/livepreview/js/ace/lib/ace/mode/_test/tokens_jsp.json +435 -0
- data/lib/gollum/public/gollum/livepreview/js/ace/lib/ace/mode/_test/tokens_jsx.json +51 -79
- data/lib/gollum/public/gollum/livepreview/js/ace/lib/ace/mode/_test/tokens_julia.json +111 -0
- data/lib/gollum/public/gollum/livepreview/js/ace/lib/ace/mode/_test/tokens_latex.json +127 -196
- data/lib/gollum/public/gollum/livepreview/js/ace/lib/ace/mode/_test/tokens_less.json +204 -292
- data/lib/gollum/public/gollum/livepreview/js/ace/lib/ace/mode/_test/tokens_liquid.json +551 -698
- data/lib/gollum/public/gollum/livepreview/js/ace/lib/ace/mode/_test/tokens_lisp.json +248 -0
- data/lib/gollum/public/gollum/livepreview/js/ace/lib/ace/mode/_test/tokens_livescript.json +6 -0
- data/lib/gollum/public/gollum/livepreview/js/ace/lib/ace/mode/_test/tokens_logiql.json +190 -0
- data/lib/gollum/public/gollum/livepreview/js/ace/lib/ace/mode/_test/tokens_lsl.json +503 -0
- data/lib/gollum/public/gollum/livepreview/js/ace/lib/ace/mode/_test/tokens_lua.json +348 -451
- data/lib/gollum/public/gollum/livepreview/js/ace/lib/ace/mode/_test/tokens_luapage.json +633 -824
- data/lib/gollum/public/gollum/livepreview/js/ace/lib/ace/mode/_test/tokens_lucene.json +92 -0
- data/lib/gollum/public/gollum/livepreview/js/ace/lib/ace/mode/_test/tokens_markdown.json +114 -1202
- data/lib/gollum/public/gollum/livepreview/js/ace/lib/ace/mode/_test/tokens_mask.json +302 -0
- data/lib/gollum/public/gollum/livepreview/js/ace/lib/ace/mode/_test/tokens_matlab.json +90 -0
- data/lib/gollum/public/gollum/livepreview/js/ace/lib/ace/mode/_test/tokens_mel.json +257 -0
- data/lib/gollum/public/gollum/livepreview/js/ace/lib/ace/mode/_test/tokens_mushcode.json +790 -0
- data/lib/gollum/public/gollum/livepreview/js/ace/lib/ace/mode/_test/tokens_mysql.json +4 -0
- data/lib/gollum/public/gollum/livepreview/js/ace/lib/ace/mode/_test/tokens_nix.json +360 -0
- data/lib/gollum/public/gollum/livepreview/js/ace/lib/ace/mode/_test/tokens_objectivec.json +793 -0
- data/lib/gollum/public/gollum/livepreview/js/ace/lib/ace/mode/_test/tokens_ocaml.json +200 -260
- data/lib/gollum/public/gollum/livepreview/js/ace/lib/ace/mode/_test/tokens_pascal.json +297 -0
- data/lib/gollum/public/gollum/livepreview/js/ace/lib/ace/mode/_test/tokens_perl.json +227 -311
- data/lib/gollum/public/gollum/livepreview/js/ace/lib/ace/mode/_test/tokens_pgsql.json +889 -1020
- data/lib/gollum/public/gollum/livepreview/js/ace/lib/ace/mode/_test/tokens_php.json +171 -238
- data/lib/gollum/public/gollum/livepreview/js/ace/lib/ace/mode/_test/tokens_powershell.json +184 -255
- data/lib/gollum/public/gollum/livepreview/js/ace/lib/ace/mode/_test/tokens_prolog.json +245 -0
- data/lib/gollum/public/gollum/livepreview/js/ace/lib/ace/mode/_test/tokens_properties.json +68 -0
- data/lib/gollum/public/gollum/livepreview/js/ace/lib/ace/mode/_test/tokens_protobuf.json +136 -0
- data/lib/gollum/public/gollum/livepreview/js/ace/lib/ace/mode/_test/tokens_python.json +152 -205
- data/lib/gollum/public/gollum/livepreview/js/ace/lib/ace/mode/_test/tokens_r.json +235 -0
- data/lib/gollum/public/gollum/livepreview/js/ace/lib/ace/mode/_test/tokens_rdoc.json +441 -0
- data/lib/gollum/public/gollum/livepreview/js/ace/lib/ace/mode/_test/tokens_rhtml.json +106 -0
- data/lib/gollum/public/gollum/livepreview/js/ace/lib/ace/mode/_test/tokens_ruby.json +242 -104
- data/lib/gollum/public/gollum/livepreview/js/ace/lib/ace/mode/_test/tokens_rust.json +136 -0
- data/lib/gollum/public/gollum/livepreview/js/ace/lib/ace/mode/_test/tokens_sass.json +229 -0
- data/lib/gollum/public/gollum/livepreview/js/ace/lib/ace/mode/_test/tokens_scad.json +194 -267
- data/lib/gollum/public/gollum/livepreview/js/ace/lib/ace/mode/_test/tokens_scala.json +542 -748
- data/lib/gollum/public/gollum/livepreview/js/ace/lib/ace/mode/_test/tokens_scheme.json +216 -0
- data/lib/gollum/public/gollum/livepreview/js/ace/lib/ace/mode/_test/tokens_scss.json +123 -181
- data/lib/gollum/public/gollum/livepreview/js/ace/lib/ace/mode/_test/tokens_sh.json +334 -434
- data/lib/gollum/public/gollum/livepreview/js/ace/lib/ace/mode/_test/tokens_sjs.json +276 -0
- data/lib/gollum/public/gollum/livepreview/js/ace/lib/ace/mode/_test/tokens_smarty.json +98 -0
- data/lib/gollum/public/gollum/livepreview/js/ace/lib/ace/mode/_test/tokens_snippets.json +159 -0
- data/lib/gollum/public/gollum/livepreview/js/ace/lib/ace/mode/_test/tokens_soy_template.json +286 -0
- data/lib/gollum/public/gollum/livepreview/js/ace/lib/ace/mode/_test/tokens_space.json +322 -0
- data/lib/gollum/public/gollum/livepreview/js/ace/lib/ace/mode/_test/tokens_sql.json +54 -73
- data/lib/gollum/public/gollum/livepreview/js/ace/lib/ace/mode/_test/tokens_stylus.json +271 -0
- data/lib/gollum/public/gollum/livepreview/js/ace/lib/ace/mode/_test/tokens_svg.json +684 -931
- data/lib/gollum/public/gollum/livepreview/js/ace/lib/ace/mode/_test/tokens_tcl.json +385 -536
- data/lib/gollum/public/gollum/livepreview/js/ace/lib/ace/mode/_test/tokens_tex.json +130 -0
- data/lib/gollum/public/gollum/livepreview/js/ace/lib/ace/mode/_test/tokens_text.json +29 -58
- data/lib/gollum/public/gollum/livepreview/js/ace/lib/ace/mode/_test/tokens_textile.json +113 -195
- data/lib/gollum/public/gollum/livepreview/js/ace/lib/ace/mode/_test/tokens_toml.json +131 -0
- data/lib/gollum/public/gollum/livepreview/js/ace/lib/ace/mode/_test/tokens_twig.json +288 -0
- data/lib/gollum/public/gollum/livepreview/js/ace/lib/ace/mode/_test/tokens_typescript.json +559 -0
- data/lib/gollum/public/gollum/livepreview/js/ace/lib/ace/mode/_test/tokens_vala.json +158 -0
- data/lib/gollum/public/gollum/livepreview/js/ace/lib/ace/mode/_test/tokens_vbscript.json +205 -0
- data/lib/gollum/public/gollum/livepreview/js/ace/lib/ace/mode/_test/tokens_velocity.json +285 -0
- data/lib/gollum/public/gollum/livepreview/js/ace/lib/ace/mode/_test/tokens_verilog.json +113 -0
- data/lib/gollum/public/gollum/livepreview/js/ace/lib/ace/mode/_test/tokens_vhdl.json +271 -0
- data/lib/gollum/public/gollum/livepreview/js/ace/lib/ace/mode/_test/tokens_xml.json +43 -705
- data/lib/gollum/public/gollum/livepreview/js/ace/lib/ace/mode/_test/tokens_xquery.json +44 -64
- data/lib/gollum/public/gollum/livepreview/js/ace/lib/ace/mode/_test/tokens_yaml.json +150 -260
- data/lib/gollum/public/gollum/livepreview/js/ace/lib/ace/mode/abap.js +2 -2
- data/lib/gollum/public/gollum/livepreview/js/ace/lib/ace/mode/abap_highlight_rules.js +7 -6
- data/lib/gollum/public/gollum/livepreview/js/ace/lib/ace/mode/abc.js +58 -0
- data/lib/gollum/public/gollum/livepreview/js/ace/lib/ace/mode/abc_highlight_rules.js +114 -0
- data/lib/gollum/public/gollum/livepreview/js/ace/lib/ace/mode/actionscript.js +58 -0
- data/lib/gollum/public/gollum/livepreview/js/ace/lib/ace/mode/actionscript_highlight_rules.js +141 -0
- data/lib/gollum/public/gollum/livepreview/js/ace/lib/ace/mode/ada.js +54 -0
- data/lib/gollum/public/gollum/livepreview/js/ace/lib/ace/mode/ada_highlight_rules.js +93 -0
- data/lib/gollum/public/gollum/livepreview/js/ace/lib/ace/mode/apache_conf.js +62 -0
- data/lib/gollum/public/gollum/livepreview/js/ace/lib/ace/mode/apache_conf_highlight_rules.js +231 -0
- data/lib/gollum/public/gollum/livepreview/js/ace/lib/ace/mode/applescript.js +55 -0
- data/lib/gollum/public/gollum/livepreview/js/ace/lib/ace/mode/applescript_highlight_rules.js +139 -0
- data/lib/gollum/public/gollum/livepreview/js/ace/lib/ace/mode/asciidoc.js +3 -3
- data/lib/gollum/public/gollum/livepreview/js/ace/lib/ace/mode/asciidoc_highlight_rules.js +11 -11
- data/lib/gollum/public/gollum/livepreview/js/ace/lib/ace/mode/assembly_x86.js +56 -0
- data/lib/gollum/public/gollum/livepreview/js/ace/lib/ace/mode/assembly_x86_highlight_rules.js +114 -0
- data/lib/gollum/public/gollum/livepreview/js/ace/lib/ace/mode/autohotkey.js +57 -0
- data/lib/gollum/public/gollum/livepreview/js/ace/lib/ace/mode/autohotkey_highlight_rules.js +107 -0
- data/lib/gollum/public/gollum/livepreview/js/ace/lib/ace/mode/batchfile.js +61 -0
- data/lib/gollum/public/gollum/livepreview/js/ace/lib/ace/mode/batchfile_highlight_rules.js +97 -0
- data/lib/gollum/public/gollum/livepreview/js/ace/lib/ace/mode/behaviour/behaviour_test.js +139 -0
- data/lib/gollum/public/gollum/livepreview/js/ace/lib/ace/mode/behaviour/css.js +108 -0
- data/lib/gollum/public/gollum/livepreview/js/ace/lib/ace/mode/behaviour/cstyle.js +164 -137
- data/lib/gollum/public/gollum/livepreview/js/ace/lib/ace/mode/behaviour/html.js +4 -48
- data/lib/gollum/public/gollum/livepreview/js/ace/lib/ace/mode/behaviour/xml.js +141 -44
- data/lib/gollum/public/gollum/livepreview/js/ace/lib/ace/mode/behaviour/xquery.js +76 -52
- data/lib/gollum/public/gollum/livepreview/js/ace/lib/ace/mode/c9search.js +2 -2
- data/lib/gollum/public/gollum/livepreview/js/ace/lib/ace/mode/c9search_highlight_rules.js +127 -4
- data/lib/gollum/public/gollum/livepreview/js/ace/lib/ace/mode/c_cpp.js +7 -30
- data/lib/gollum/public/gollum/livepreview/js/ace/lib/ace/mode/c_cpp_highlight_rules.js +60 -51
- data/lib/gollum/public/gollum/livepreview/js/ace/lib/ace/mode/cirru.js +51 -0
- data/lib/gollum/public/gollum/livepreview/js/ace/lib/ace/mode/cirru_highlight_rules.js +125 -0
- data/lib/gollum/public/gollum/livepreview/js/ace/lib/ace/mode/clojure.js +62 -46
- data/lib/gollum/public/gollum/livepreview/js/ace/lib/ace/mode/clojure_highlight_rules.js +4 -21
- data/lib/gollum/public/gollum/livepreview/js/ace/lib/ace/mode/cobol.js +53 -0
- data/lib/gollum/public/gollum/livepreview/js/ace/lib/ace/mode/cobol_highlight_rules.js +100 -0
- data/lib/gollum/public/gollum/livepreview/js/ace/lib/ace/mode/coffee.js +28 -7
- data/lib/gollum/public/gollum/livepreview/js/ace/lib/ace/mode/coffee/coffee-script.js +13 -7
- data/lib/gollum/public/gollum/livepreview/js/ace/lib/ace/mode/coffee/helpers.js +160 -4
- data/lib/gollum/public/gollum/livepreview/js/ace/lib/ace/mode/coffee/lexer.js +228 -108
- data/lib/gollum/public/gollum/livepreview/js/ace/lib/ace/mode/coffee/nodes.js +778 -670
- data/lib/gollum/public/gollum/livepreview/js/ace/lib/ace/mode/coffee/parser.js +377 -347
- data/lib/gollum/public/gollum/livepreview/js/ace/lib/ace/mode/coffee/parser_test.js +33 -6
- data/lib/gollum/public/gollum/livepreview/js/ace/lib/ace/mode/coffee/rewriter.js +275 -135
- data/lib/gollum/public/gollum/livepreview/js/ace/lib/ace/mode/coffee/scope.js +5 -4
- data/lib/gollum/public/gollum/livepreview/js/ace/lib/ace/mode/coffee_highlight_rules.js +72 -167
- data/lib/gollum/public/gollum/livepreview/js/ace/lib/ace/mode/coffee_worker.js +12 -24
- data/lib/gollum/public/gollum/livepreview/js/ace/lib/ace/mode/coldfusion.js +11 -14
- data/lib/gollum/public/gollum/livepreview/js/ace/lib/ace/mode/coldfusion_highlight_rules.js +5 -84
- data/lib/gollum/public/gollum/livepreview/js/ace/lib/ace/mode/coldfusion_test.js +3 -3
- data/lib/gollum/public/gollum/livepreview/js/ace/lib/ace/mode/csharp.js +7 -4
- data/lib/gollum/public/gollum/livepreview/js/ace/lib/ace/mode/csharp_highlight_rules.js +13 -10
- data/lib/gollum/public/gollum/livepreview/js/ace/lib/ace/mode/css.js +7 -6
- data/lib/gollum/public/gollum/livepreview/js/ace/lib/ace/mode/css/csslint.js +2325 -1216
- data/lib/gollum/public/gollum/livepreview/js/ace/lib/ace/mode/css_highlight_rules.js +72 -102
- data/lib/gollum/public/gollum/livepreview/js/ace/lib/ace/mode/css_test.js +2 -2
- data/lib/gollum/public/gollum/livepreview/js/ace/lib/ace/mode/css_worker.js +11 -5
- data/lib/gollum/public/gollum/livepreview/js/ace/lib/ace/mode/curly.js +63 -0
- data/lib/gollum/public/gollum/livepreview/js/ace/lib/ace/mode/curly_highlight_rules.js +66 -0
- data/lib/gollum/public/gollum/livepreview/js/ace/lib/ace/mode/d.js +56 -0
- data/lib/gollum/public/gollum/livepreview/js/ace/lib/ace/mode/d_highlight_rules.js +334 -0
- data/lib/gollum/public/gollum/livepreview/js/ace/lib/ace/mode/dart.js +8 -8
- data/lib/gollum/public/gollum/livepreview/js/ace/lib/ace/mode/dart_highlight_rules.js +70 -76
- data/lib/gollum/public/gollum/livepreview/js/ace/lib/ace/mode/diff.js +2 -2
- data/lib/gollum/public/gollum/livepreview/js/ace/lib/ace/mode/diff_highlight_rules.js +24 -18
- data/lib/gollum/public/gollum/livepreview/js/ace/lib/ace/mode/django.js +119 -0
- data/lib/gollum/public/gollum/livepreview/js/ace/lib/ace/mode/doc_comment_highlight_rules.js +12 -19
- data/lib/gollum/public/gollum/livepreview/js/ace/lib/ace/mode/dockerfile.js +52 -0
- data/lib/gollum/public/gollum/livepreview/js/ace/lib/ace/mode/dockerfile_highlight_rules.js +57 -0
- data/lib/gollum/public/gollum/livepreview/js/ace/lib/ace/mode/dot.js +55 -0
- data/lib/gollum/public/gollum/livepreview/js/ace/lib/ace/mode/dot_highlight_rules.js +126 -0
- data/lib/gollum/public/gollum/livepreview/js/ace/lib/ace/mode/eiffel.js +52 -0
- data/lib/gollum/public/gollum/livepreview/js/ace/lib/ace/mode/eiffel_highlight_rules.js +136 -0
- data/lib/gollum/public/gollum/livepreview/js/ace/lib/ace/mode/ejs.js +109 -0
- data/lib/gollum/public/gollum/livepreview/js/ace/lib/ace/mode/elixir.js +58 -0
- data/lib/gollum/public/gollum/livepreview/js/ace/lib/ace/mode/elixir_highlight_rules.js +433 -0
- data/lib/gollum/public/gollum/livepreview/js/ace/lib/ace/mode/elm.js +58 -0
- data/lib/gollum/public/gollum/livepreview/js/ace/lib/ace/mode/elm_highlight_rules.js +162 -0
- data/lib/gollum/public/gollum/livepreview/js/ace/lib/ace/mode/erlang.js +57 -0
- data/lib/gollum/public/gollum/livepreview/js/ace/lib/ace/mode/erlang_highlight_rules.js +876 -0
- data/lib/gollum/public/gollum/livepreview/js/ace/lib/ace/mode/folding/c9search.js +12 -6
- data/lib/gollum/public/gollum/livepreview/js/ace/lib/ace/mode/folding/csharp.js +137 -0
- data/lib/gollum/public/gollum/livepreview/js/ace/lib/ace/mode/folding/cstyle.js +118 -6
- data/lib/gollum/public/gollum/livepreview/js/ace/lib/ace/mode/folding/cstyle_test.js +24 -0
- data/lib/gollum/public/gollum/livepreview/js/ace/lib/ace/mode/folding/fold_mode.js +1 -1
- data/lib/gollum/public/gollum/livepreview/js/ace/lib/ace/mode/folding/html.js +2 -33
- data/lib/gollum/public/gollum/livepreview/js/ace/lib/ace/mode/folding/html_test.js +30 -6
- data/lib/gollum/public/gollum/livepreview/js/ace/lib/ace/mode/folding/ini.js +80 -0
- data/lib/gollum/public/gollum/livepreview/js/ace/lib/ace/mode/folding/latex.js +9 -9
- data/lib/gollum/public/gollum/livepreview/js/ace/lib/ace/mode/folding/lua.js +4 -4
- data/lib/gollum/public/gollum/livepreview/js/ace/lib/ace/mode/folding/mixed.js +2 -0
- data/lib/gollum/public/gollum/livepreview/js/ace/lib/ace/mode/folding/velocity.js +120 -0
- data/lib/gollum/public/gollum/livepreview/js/ace/lib/ace/mode/folding/xml.js +110 -87
- data/lib/gollum/public/gollum/livepreview/js/ace/lib/ace/mode/forth.js +58 -0
- data/lib/gollum/public/gollum/livepreview/js/ace/lib/ace/mode/forth_highlight_rules.js +164 -0
- data/lib/gollum/public/gollum/livepreview/js/ace/lib/ace/mode/ftl.js +49 -0
- data/lib/gollum/public/gollum/livepreview/js/ace/lib/ace/mode/ftl_highlight_rules.js +195 -0
- data/lib/gollum/public/gollum/livepreview/js/ace/lib/ace/mode/gcode.js +51 -0
- data/lib/gollum/public/gollum/livepreview/js/ace/lib/ace/mode/gcode_highlight_rules.js +94 -0
- data/lib/gollum/public/gollum/livepreview/js/ace/lib/ace/mode/gherkin.js +80 -0
- data/lib/gollum/public/gollum/livepreview/js/ace/lib/ace/mode/gherkin_highlight_rules.js +113 -0
- data/lib/gollum/public/gollum/livepreview/js/ace/lib/ace/mode/gitignore.js +20 -0
- data/lib/gollum/public/gollum/livepreview/js/ace/lib/ace/mode/gitignore_highlight_rules.js +31 -0
- data/lib/gollum/public/gollum/livepreview/js/ace/lib/ace/mode/glsl.js +6 -2
- data/lib/gollum/public/gollum/livepreview/js/ace/lib/ace/mode/golang.js +42 -67
- data/lib/gollum/public/gollum/livepreview/js/ace/lib/ace/mode/golang_highlight_rules.js +25 -39
- data/lib/gollum/public/gollum/livepreview/js/ace/lib/ace/mode/groovy.js +2 -2
- data/lib/gollum/public/gollum/livepreview/js/ace/lib/ace/mode/groovy_highlight_rules.js +0 -2
- data/lib/gollum/public/gollum/livepreview/js/ace/lib/ace/mode/haml.js +5 -6
- data/lib/gollum/public/gollum/livepreview/js/ace/lib/ace/mode/haml_highlight_rules.js +43 -43
- data/lib/gollum/public/gollum/livepreview/js/ace/lib/ace/mode/handlebars.js +29 -0
- data/lib/gollum/public/gollum/livepreview/js/ace/lib/ace/mode/handlebars_highlight_rules.js +72 -0
- data/lib/gollum/public/gollum/livepreview/js/ace/lib/ace/mode/haskell.js +62 -0
- data/lib/gollum/public/gollum/livepreview/js/ace/lib/ace/mode/haskell_highlight_rules.js +246 -0
- data/lib/gollum/public/gollum/livepreview/js/ace/lib/ace/mode/haxe.js +7 -4
- data/lib/gollum/public/gollum/livepreview/js/ace/lib/ace/mode/haxe_highlight_rules.js +0 -2
- data/lib/gollum/public/gollum/livepreview/js/ace/lib/ace/mode/html.js +42 -12
- data/lib/gollum/public/gollum/livepreview/js/ace/lib/ace/mode/html/saxparser.js +10430 -0
- data/lib/gollum/public/gollum/livepreview/js/ace/lib/ace/mode/html_completions.js +305 -0
- data/lib/gollum/public/gollum/livepreview/js/ace/lib/ace/mode/html_highlight_rules.js +43 -85
- data/lib/gollum/public/gollum/livepreview/js/ace/lib/ace/mode/html_ruby.js +59 -0
- data/lib/gollum/public/gollum/livepreview/js/ace/lib/ace/mode/html_ruby_highlight_rules.js +84 -0
- data/lib/gollum/public/gollum/livepreview/js/ace/lib/ace/mode/html_test.js +3 -3
- data/lib/gollum/public/gollum/livepreview/js/ace/lib/ace/{lib/browser_focus.js → mode/html_worker.js} +48 -51
- data/lib/gollum/public/gollum/livepreview/js/ace/lib/ace/mode/ini.js +53 -0
- data/lib/gollum/public/gollum/livepreview/js/ace/lib/ace/mode/ini_highlight_rules.js +112 -0
- data/lib/gollum/public/gollum/livepreview/js/ace/lib/ace/mode/io.js +58 -0
- data/lib/gollum/public/gollum/livepreview/js/ace/lib/ace/mode/io_highlight_rules.js +120 -0
- data/lib/gollum/public/gollum/livepreview/js/ace/lib/ace/mode/jack.js +79 -0
- data/lib/gollum/public/gollum/livepreview/js/ace/lib/ace/mode/jack_highlight_rules.js +142 -0
- data/lib/gollum/public/gollum/livepreview/js/ace/lib/ace/mode/jade.js +4 -5
- data/lib/gollum/public/gollum/livepreview/js/ace/lib/ace/mode/jade_highlight_rules.js +94 -100
- data/lib/gollum/public/gollum/livepreview/js/ace/lib/ace/mode/java.js +2 -3
- data/lib/gollum/public/gollum/livepreview/js/ace/lib/ace/mode/java_highlight_rules.js +0 -5
- data/lib/gollum/public/gollum/livepreview/js/ace/lib/ace/mode/javascript.js +15 -40
- data/lib/gollum/public/gollum/livepreview/js/ace/lib/ace/mode/javascript/jshint.js +10824 -4816
- data/lib/gollum/public/gollum/livepreview/js/ace/lib/ace/mode/javascript_highlight_rules.js +113 -97
- data/lib/gollum/public/gollum/livepreview/js/ace/lib/ace/mode/javascript_test.js +61 -6
- data/lib/gollum/public/gollum/livepreview/js/ace/lib/ace/mode/javascript_worker.js +5 -7
- data/lib/gollum/public/gollum/livepreview/js/ace/lib/ace/mode/javascript_worker_test.js +11 -2
- data/lib/gollum/public/gollum/livepreview/js/ace/lib/ace/mode/js_regex_highlight_rules.js +94 -0
- data/lib/gollum/public/gollum/livepreview/js/ace/lib/ace/mode/json.js +5 -5
- data/lib/gollum/public/gollum/livepreview/js/ace/lib/ace/mode/json_highlight_rules.js +3 -6
- data/lib/gollum/public/gollum/livepreview/js/ace/lib/ace/mode/json_worker.js +6 -35
- data/lib/gollum/public/gollum/livepreview/js/ace/lib/ace/mode/json_worker_test.js +12 -11
- data/lib/gollum/public/gollum/livepreview/js/ace/lib/ace/mode/jsoniq.js +203 -0
- data/lib/gollum/public/gollum/livepreview/js/ace/lib/ace/mode/jsp.js +2 -3
- data/lib/gollum/public/gollum/livepreview/js/ace/lib/ace/mode/jsp_highlight_rules.js +36 -30
- data/lib/gollum/public/gollum/livepreview/js/ace/lib/ace/mode/jsx.js +26 -23
- data/lib/gollum/public/gollum/livepreview/js/ace/lib/ace/mode/jsx_highlight_rules.js +113 -115
- data/lib/gollum/public/gollum/livepreview/js/ace/lib/ace/mode/julia.js +62 -0
- data/lib/gollum/public/gollum/livepreview/js/ace/lib/ace/mode/julia_highlight_rules.js +170 -0
- data/lib/gollum/public/gollum/livepreview/js/ace/lib/ace/mode/latex.js +5 -37
- data/lib/gollum/public/gollum/livepreview/js/ace/lib/ace/mode/latex_highlight_rules.js +44 -9
- data/lib/gollum/public/gollum/livepreview/js/ace/lib/ace/mode/less.js +8 -3
- data/lib/gollum/public/gollum/livepreview/js/ace/lib/ace/mode/less_highlight_rules.js +2 -2
- data/lib/gollum/public/gollum/livepreview/js/ace/lib/ace/mode/liquid.js +4 -31
- data/lib/gollum/public/gollum/livepreview/js/ace/lib/ace/mode/liquid_highlight_rules.js +15 -89
- data/lib/gollum/public/gollum/livepreview/js/ace/lib/ace/mode/lisp.js +5 -9
- data/lib/gollum/public/gollum/livepreview/js/ace/lib/ace/mode/lisp_highlight_rules.js +25 -28
- data/lib/gollum/public/gollum/livepreview/js/ace/lib/ace/mode/livescript.js +246 -0
- data/lib/gollum/public/gollum/livepreview/js/ace/lib/ace/mode/logiql.js +139 -0
- data/lib/gollum/public/gollum/livepreview/js/ace/lib/ace/mode/logiql_highlight_rules.js +119 -0
- data/lib/gollum/public/gollum/livepreview/js/ace/lib/ace/mode/logiql_test.js +98 -0
- data/lib/gollum/public/gollum/livepreview/js/ace/lib/ace/mode/lsl.js +92 -0
- data/lib/gollum/public/gollum/livepreview/js/ace/lib/ace/mode/lsl_highlight_rules.js +123 -0
- data/lib/gollum/public/gollum/livepreview/js/ace/lib/ace/mode/lua.js +27 -6
- data/lib/gollum/public/gollum/livepreview/js/ace/lib/ace/mode/lua/luaparse.js +1989 -0
- data/lib/gollum/public/gollum/livepreview/js/ace/lib/ace/mode/lua_highlight_rules.js +55 -272
- data/lib/gollum/public/gollum/livepreview/js/ace/lib/ace/mode/lua_worker.js +70 -0
- data/lib/gollum/public/gollum/livepreview/js/ace/lib/ace/mode/luapage.js +6 -4
- data/lib/gollum/public/gollum/livepreview/js/ace/lib/ace/mode/luapage_highlight_rules.js +21 -14
- data/lib/gollum/public/gollum/livepreview/js/ace/lib/ace/mode/lucene.js +5 -2
- data/lib/gollum/public/gollum/livepreview/js/ace/lib/ace/mode/makefile.js +6 -10
- data/lib/gollum/public/gollum/livepreview/js/ace/lib/ace/mode/makefile_highlight_rules.js +22 -22
- data/lib/gollum/public/gollum/livepreview/js/ace/lib/ace/mode/markdown.js +12 -11
- data/lib/gollum/public/gollum/livepreview/js/ace/lib/ace/mode/markdown_highlight_rules.js +130 -89
- data/lib/gollum/public/gollum/livepreview/js/ace/lib/ace/mode/mask.js +84 -0
- data/lib/gollum/public/gollum/livepreview/js/ace/lib/ace/mode/mask_highlight_rules.js +309 -0
- data/lib/gollum/public/gollum/livepreview/js/ace/lib/ace/mode/matching_brace_outdent.js +1 -6
- data/lib/gollum/public/gollum/livepreview/js/ace/lib/ace/mode/matlab.js +55 -0
- data/lib/gollum/public/gollum/livepreview/js/ace/lib/ace/mode/matlab_highlight_rules.js +262 -0
- data/lib/gollum/public/gollum/livepreview/js/ace/lib/ace/mode/mel.js +56 -0
- data/lib/gollum/public/gollum/livepreview/js/ace/lib/ace/mode/mel_highlight_rules.js +133 -0
- data/lib/gollum/public/gollum/livepreview/js/ace/lib/ace/mode/mushcode.js +116 -0
- data/lib/gollum/public/gollum/livepreview/js/ace/lib/ace/mode/mushcode_highlight_rules.js +569 -0
- data/lib/gollum/public/gollum/livepreview/js/ace/lib/ace/mode/mysql.js +51 -0
- data/lib/gollum/public/gollum/livepreview/js/ace/lib/ace/mode/mysql_highlight_rules.js +122 -0
- data/lib/gollum/public/gollum/livepreview/js/ace/lib/ace/mode/nix.js +62 -0
- data/lib/gollum/public/gollum/livepreview/js/ace/lib/ace/mode/nix_highlight_rules.js +119 -0
- data/lib/gollum/public/gollum/livepreview/js/ace/lib/ace/mode/objectivec.js +4 -5
- data/lib/gollum/public/gollum/livepreview/js/ace/lib/ace/mode/objectivec_highlight_rules.js +137 -149
- data/lib/gollum/public/gollum/livepreview/js/ace/lib/ace/mode/ocaml.js +4 -3
- data/lib/gollum/public/gollum/livepreview/js/ace/lib/ace/mode/ocaml_highlight_rules.js +0 -4
- data/lib/gollum/public/gollum/livepreview/js/ace/lib/ace/mode/pascal.js +67 -0
- data/lib/gollum/public/gollum/livepreview/js/ace/lib/ace/mode/pascal_highlight_rules.js +127 -0
- data/lib/gollum/public/gollum/livepreview/js/ace/lib/ace/mode/perl.js +10 -30
- data/lib/gollum/public/gollum/livepreview/js/ace/lib/ace/mode/perl_highlight_rules.js +17 -7
- data/lib/gollum/public/gollum/livepreview/js/ace/lib/ace/mode/pgsql.js +23 -51
- data/lib/gollum/public/gollum/livepreview/js/ace/lib/ace/mode/pgsql_highlight_rules.js +334 -302
- data/lib/gollum/public/gollum/livepreview/js/ace/lib/ace/mode/php.js +59 -38
- data/lib/gollum/public/gollum/livepreview/js/ace/lib/ace/mode/php/php.js +5031 -0
- data/lib/gollum/public/gollum/livepreview/js/ace/lib/ace/mode/php_highlight_rules.js +72 -52
- data/lib/gollum/public/gollum/livepreview/js/ace/lib/ace/mode/php_test.js +65 -0
- data/lib/gollum/public/gollum/livepreview/js/ace/lib/ace/mode/php_worker.js +77 -0
- data/lib/gollum/public/gollum/livepreview/js/ace/lib/ace/mode/plain_text.js +55 -0
- data/lib/gollum/public/gollum/livepreview/js/ace/lib/ace/{keyboard/vim/maps/aliases.js → mode/plain_text_test.js} +21 -59
- data/lib/gollum/public/gollum/livepreview/js/ace/lib/ace/mode/powershell.js +7 -4
- data/lib/gollum/public/gollum/livepreview/js/ace/lib/ace/mode/powershell_highlight_rules.js +0 -3
- data/lib/gollum/public/gollum/livepreview/js/ace/lib/ace/mode/{xquery/JSONParseTreeHandler.js → praat.js} +45 -53
- data/lib/gollum/public/gollum/livepreview/js/ace/lib/ace/mode/praat_highlight_rules.js +262 -0
- data/lib/gollum/public/gollum/livepreview/js/ace/lib/ace/mode/prolog.js +62 -0
- data/lib/gollum/public/gollum/livepreview/js/ace/lib/ace/mode/prolog_highlight_rules.js +238 -0
- data/lib/gollum/public/gollum/livepreview/js/ace/lib/ace/mode/properties.js +48 -0
- data/lib/gollum/public/gollum/livepreview/js/ace/lib/ace/mode/properties_highlight_rules.js +86 -0
- data/lib/gollum/public/gollum/livepreview/js/ace/lib/ace/mode/protobuf.js +63 -0
- data/lib/gollum/public/gollum/livepreview/js/ace/lib/ace/mode/protobuf_highlight_rules.js +66 -0
- data/lib/gollum/public/gollum/livepreview/js/ace/lib/ace/mode/python.js +5 -31
- data/lib/gollum/public/gollum/livepreview/js/ace/lib/ace/mode/python_highlight_rules.js +50 -24
- data/lib/gollum/public/gollum/livepreview/js/ace/lib/ace/mode/r.js +37 -18
- data/lib/gollum/public/gollum/livepreview/js/ace/lib/ace/mode/r_highlight_rules.js +29 -11
- data/lib/gollum/public/gollum/livepreview/js/ace/lib/ace/mode/rdoc.js +36 -11
- data/lib/gollum/public/gollum/livepreview/js/ace/lib/ace/mode/rdoc_highlight_rules.js +27 -7
- data/lib/gollum/public/gollum/livepreview/js/ace/lib/ace/mode/rhtml.js +31 -11
- data/lib/gollum/public/gollum/livepreview/js/ace/lib/ace/mode/rhtml_highlight_rules.js +31 -14
- data/lib/gollum/public/gollum/livepreview/js/ace/lib/ace/mode/ruby.js +26 -36
- data/lib/gollum/public/gollum/livepreview/js/ace/lib/ace/mode/ruby_highlight_rules.js +153 -33
- data/lib/gollum/public/gollum/livepreview/js/ace/lib/ace/mode/{css_highlight_rules_test.js → ruby_test.js} +24 -39
- data/lib/gollum/public/gollum/livepreview/js/ace/lib/ace/mode/rust.js +58 -0
- data/lib/gollum/public/gollum/livepreview/js/ace/lib/ace/mode/rust_highlight_rules.js +158 -0
- data/lib/gollum/public/gollum/livepreview/js/ace/lib/ace/mode/sass.js +52 -0
- data/lib/gollum/public/gollum/livepreview/js/ace/lib/ace/mode/sass_highlight_rules.js +79 -0
- data/lib/gollum/public/gollum/livepreview/js/ace/lib/ace/mode/scad.js +5 -30
- data/lib/gollum/public/gollum/livepreview/js/ace/lib/ace/mode/scad_highlight_rules.js +0 -4
- data/lib/gollum/public/gollum/livepreview/js/ace/lib/ace/mode/scala.js +2 -2
- data/lib/gollum/public/gollum/livepreview/js/ace/lib/ace/mode/scala_highlight_rules.js +1 -6
- data/lib/gollum/public/gollum/livepreview/js/ace/lib/ace/mode/scheme.js +56 -0
- data/lib/gollum/public/gollum/livepreview/js/ace/lib/ace/mode/scheme_highlight_rules.js +123 -0
- data/lib/gollum/public/gollum/livepreview/js/ace/lib/ace/mode/scss.js +9 -4
- data/lib/gollum/public/gollum/livepreview/js/ace/lib/ace/mode/scss_highlight_rules.js +7 -8
- data/lib/gollum/public/gollum/livepreview/js/ace/lib/ace/mode/sh.js +10 -31
- data/lib/gollum/public/gollum/livepreview/js/ace/lib/ace/mode/sh_highlight_rules.js +85 -11
- data/lib/gollum/public/gollum/livepreview/js/ace/lib/ace/mode/sjs.js +56 -0
- data/lib/gollum/public/gollum/livepreview/js/ace/lib/ace/mode/sjs_highlight_rules.js +233 -0
- data/lib/gollum/public/gollum/livepreview/js/ace/lib/ace/mode/smarty.js +51 -0
- data/lib/gollum/public/gollum/livepreview/js/ace/lib/ace/mode/smarty_highlight_rules.js +139 -0
- data/lib/gollum/public/gollum/livepreview/js/ace/lib/ace/mode/snippets.js +113 -0
- data/lib/gollum/public/gollum/livepreview/js/ace/lib/ace/mode/soy_template.js +60 -0
- data/lib/gollum/public/gollum/livepreview/js/ace/lib/ace/mode/soy_template_highlight_rules.js +356 -0
- data/lib/gollum/public/gollum/livepreview/js/ace/lib/ace/mode/space.js +21 -0
- data/lib/gollum/public/gollum/livepreview/js/ace/lib/ace/mode/space_highlight_rules.js +56 -0
- data/lib/gollum/public/gollum/livepreview/js/ace/lib/ace/mode/sql.js +3 -30
- data/lib/gollum/public/gollum/livepreview/js/ace/lib/ace/mode/sql_highlight_rules.js +6 -1
- data/lib/gollum/public/gollum/livepreview/js/ace/lib/ace/mode/stylus.js +5 -5
- data/lib/gollum/public/gollum/livepreview/js/ace/lib/ace/mode/stylus_highlight_rules.js +32 -42
- data/lib/gollum/public/gollum/livepreview/js/ace/lib/ace/mode/svg.js +3 -5
- data/lib/gollum/public/gollum/livepreview/js/ace/lib/ace/mode/svg_highlight_rules.js +3 -18
- data/lib/gollum/public/gollum/livepreview/js/ace/lib/ace/mode/tcl.js +4 -30
- data/lib/gollum/public/gollum/livepreview/js/ace/lib/ace/mode/tcl_highlight_rules.js +5 -13
- data/lib/gollum/public/gollum/livepreview/js/ace/lib/ace/mode/tex.js +30 -10
- data/lib/gollum/public/gollum/livepreview/js/ace/lib/ace/mode/tex_highlight_rules.js +27 -7
- data/lib/gollum/public/gollum/livepreview/js/ace/lib/ace/mode/text.js +266 -29
- data/lib/gollum/public/gollum/livepreview/js/ace/lib/ace/mode/text_highlight_rules.js +129 -15
- data/lib/gollum/public/gollum/livepreview/js/ace/lib/ace/mode/text_test.js +2 -2
- data/lib/gollum/public/gollum/livepreview/js/ace/lib/ace/mode/textile.js +3 -2
- data/lib/gollum/public/gollum/livepreview/js/ace/lib/ace/mode/toml.js +56 -0
- data/lib/gollum/public/gollum/livepreview/js/ace/lib/ace/mode/toml_highlight_rules.js +103 -0
- data/lib/gollum/public/gollum/livepreview/js/ace/lib/ace/mode/twig.js +81 -0
- data/lib/gollum/public/gollum/livepreview/js/ace/lib/ace/mode/twig_highlight_rules.js +166 -0
- data/lib/gollum/public/gollum/livepreview/js/ace/lib/ace/mode/typescript.js +2 -8
- data/lib/gollum/public/gollum/livepreview/js/ace/lib/ace/mode/typescript_highlight_rules.js +16 -16
- data/lib/gollum/public/gollum/livepreview/js/ace/lib/ace/mode/vala.js +105 -0
- data/lib/gollum/public/gollum/livepreview/js/ace/lib/ace/mode/vala_highlight_rules.js +457 -0
- data/lib/gollum/public/gollum/livepreview/js/ace/lib/ace/mode/vbscript.js +60 -0
- data/lib/gollum/public/gollum/livepreview/js/ace/lib/ace/mode/vbscript_highlight_rules.js +246 -0
- data/lib/gollum/public/gollum/livepreview/js/ace/lib/ace/mode/velocity.js +58 -0
- data/lib/gollum/public/gollum/livepreview/js/ace/lib/ace/mode/velocity_highlight_rules.js +177 -0
- data/lib/gollum/public/gollum/livepreview/js/ace/lib/ace/mode/verilog.js +54 -0
- data/lib/gollum/public/gollum/livepreview/js/ace/lib/ace/mode/verilog_highlight_rules.js +101 -0
- data/lib/gollum/public/gollum/livepreview/js/ace/lib/ace/mode/vhdl.js +52 -0
- data/lib/gollum/public/gollum/livepreview/js/ace/lib/ace/mode/vhdl_highlight_rules.js +115 -0
- data/lib/gollum/public/gollum/livepreview/js/ace/lib/ace/mode/xml.js +25 -8
- data/lib/gollum/public/gollum/livepreview/js/ace/lib/ace/mode/xml/dom-parser.js +260 -0
- data/lib/gollum/public/gollum/livepreview/js/ace/lib/ace/mode/xml/dom.js +1138 -0
- data/lib/gollum/public/gollum/livepreview/js/ace/lib/ace/mode/xml/sax.js +592 -0
- data/lib/gollum/public/gollum/livepreview/js/ace/lib/ace/mode/xml_highlight_rules.js +185 -45
- data/lib/gollum/public/gollum/livepreview/js/ace/lib/ace/mode/xml_test.js +3 -3
- data/lib/gollum/public/gollum/livepreview/js/ace/lib/ace/mode/xml_worker.js +92 -0
- data/lib/gollum/public/gollum/livepreview/js/ace/lib/ace/mode/xquery.js +107 -88
- data/lib/gollum/public/gollum/livepreview/js/ace/lib/ace/mode/xquery/Readme.md +1 -6
- data/lib/gollum/public/gollum/livepreview/js/ace/lib/ace/mode/xquery/jsoniq_lexer.js +4453 -0
- data/lib/gollum/public/gollum/livepreview/js/ace/lib/ace/mode/xquery/xqlint.js +78911 -0
- data/lib/gollum/public/gollum/livepreview/js/ace/lib/ace/mode/xquery/xquery_lexer.js +4422 -0
- data/lib/gollum/public/gollum/livepreview/js/ace/lib/ace/mode/xquery_worker.js +66 -29
- data/lib/gollum/public/gollum/livepreview/js/ace/lib/ace/mode/yaml.js +5 -3
- data/lib/gollum/public/gollum/livepreview/js/ace/lib/ace/mode/yaml_highlight_rules.js +2 -13
- data/lib/gollum/public/gollum/livepreview/js/ace/lib/ace/mouse/default_gutter_handler.js +50 -28
- data/lib/gollum/public/gollum/livepreview/js/ace/lib/ace/mouse/default_handlers.js +70 -137
- data/lib/gollum/public/gollum/livepreview/js/ace/lib/ace/mouse/dragdrop_handler.js +428 -0
- data/lib/gollum/public/gollum/livepreview/js/ace/lib/ace/mouse/fold_handler.js +6 -23
- data/lib/gollum/public/gollum/livepreview/js/ace/lib/ace/mouse/mouse_event.js +6 -9
- data/lib/gollum/public/gollum/livepreview/js/ace/lib/ace/mouse/mouse_handler.js +83 -39
- data/lib/gollum/public/gollum/livepreview/js/ace/lib/ace/{mode/liquid_highlight_rules_test.js → mouse/mouse_handler_test.js} +27 -34
- data/lib/gollum/public/gollum/livepreview/js/ace/lib/ace/mouse/multi_select_handler.js +94 -38
- data/lib/gollum/public/gollum/livepreview/js/ace/lib/ace/multi_select.js +192 -115
- data/lib/gollum/public/gollum/livepreview/js/ace/lib/ace/multi_select_test.js +124 -18
- data/lib/gollum/public/gollum/livepreview/js/ace/lib/ace/occur.js +193 -0
- data/lib/gollum/public/gollum/livepreview/js/ace/lib/ace/occur_test.js +154 -0
- data/lib/gollum/public/gollum/livepreview/js/ace/lib/ace/placeholder.js +9 -4
- data/lib/gollum/public/gollum/livepreview/js/ace/lib/ace/placeholder_test.js +2 -1
- data/lib/gollum/public/gollum/livepreview/js/ace/lib/ace/range.js +81 -102
- data/lib/gollum/public/gollum/livepreview/js/ace/lib/ace/range_list.js +38 -21
- data/lib/gollum/public/gollum/livepreview/js/ace/lib/ace/range_list_test.js +20 -1
- data/lib/gollum/public/gollum/livepreview/js/ace/lib/ace/range_test.js +1 -1
- data/lib/gollum/public/gollum/livepreview/js/ace/lib/ace/renderloop.js +1 -1
- data/lib/gollum/public/gollum/livepreview/js/ace/lib/ace/requirejs/text.js +9 -8
- data/lib/gollum/public/gollum/livepreview/js/ace/lib/ace/requirejs/text_build.js +60 -0
- data/lib/gollum/public/gollum/livepreview/js/ace/lib/ace/scrollbar.js +163 -32
- data/lib/gollum/public/gollum/livepreview/js/ace/lib/ace/search.js +38 -19
- data/lib/gollum/public/gollum/livepreview/js/ace/lib/ace/search_highlight.js +1 -3
- data/lib/gollum/public/gollum/livepreview/js/ace/lib/ace/search_test.js +33 -0
- data/lib/gollum/public/gollum/livepreview/js/ace/lib/ace/selection.js +167 -83
- data/lib/gollum/public/gollum/livepreview/js/ace/lib/ace/selection_test.js +22 -7
- data/lib/gollum/public/gollum/livepreview/js/ace/lib/ace/snippets.js +949 -0
- data/lib/gollum/public/gollum/livepreview/js/ace/lib/ace/snippets/_.snippets +240 -0
- data/lib/gollum/public/gollum/livepreview/js/ace/lib/ace/snippets/_all_modes.js +7 -0
- data/lib/gollum/public/gollum/livepreview/js/ace/lib/ace/snippets/_all_modes.snippets +0 -0
- data/lib/gollum/public/gollum/livepreview/js/ace/lib/ace/snippets/abap.js +7 -0
- data/lib/gollum/public/gollum/livepreview/js/ace/lib/ace/snippets/abap.snippets +0 -0
- data/lib/gollum/public/gollum/livepreview/js/ace/lib/ace/snippets/abc.js +7 -0
- data/lib/gollum/public/gollum/livepreview/js/ace/lib/ace/snippets/abc.snippets +31 -0
- data/lib/gollum/public/gollum/livepreview/js/ace/lib/ace/snippets/actionscript.js +7 -0
- data/lib/gollum/public/gollum/livepreview/js/ace/lib/ace/snippets/actionscript.snippets +157 -0
- data/lib/gollum/public/gollum/livepreview/js/ace/lib/ace/snippets/ada.js +7 -0
- data/lib/gollum/public/gollum/livepreview/js/ace/lib/ace/snippets/ada.snippets +0 -0
- data/lib/gollum/public/gollum/livepreview/js/ace/lib/ace/snippets/all_modes.js +7 -0
- data/lib/gollum/public/gollum/livepreview/js/ace/lib/ace/snippets/all_modes.snippets +0 -0
- data/lib/gollum/public/gollum/livepreview/js/ace/lib/ace/snippets/apache.snippets +35 -0
- data/lib/gollum/public/gollum/livepreview/js/ace/lib/ace/snippets/apache_conf.js +7 -0
- data/lib/gollum/public/gollum/livepreview/js/ace/lib/ace/snippets/apache_conf.snippets +0 -0
- data/lib/gollum/public/gollum/livepreview/js/ace/lib/ace/snippets/applescript.js +7 -0
- data/lib/gollum/public/gollum/livepreview/js/ace/lib/ace/snippets/applescript.snippets +0 -0
- data/lib/gollum/public/gollum/livepreview/js/ace/lib/ace/snippets/asciidoc.js +7 -0
- data/lib/gollum/public/gollum/livepreview/js/ace/lib/ace/snippets/asciidoc.snippets +0 -0
- data/lib/gollum/public/gollum/livepreview/js/ace/lib/ace/snippets/assembly_x86.js +7 -0
- data/lib/gollum/public/gollum/livepreview/js/ace/lib/ace/snippets/assembly_x86.snippets +0 -0
- data/lib/gollum/public/gollum/livepreview/js/ace/lib/ace/snippets/autohotkey.js +7 -0
- data/lib/gollum/public/gollum/livepreview/js/ace/lib/ace/snippets/autohotkey.snippets +0 -0
- data/lib/gollum/public/gollum/livepreview/js/ace/lib/ace/snippets/autoit.snippets +66 -0
- data/lib/gollum/public/gollum/livepreview/js/ace/lib/ace/snippets/batchfile.js +7 -0
- data/lib/gollum/public/gollum/livepreview/js/ace/lib/ace/snippets/batchfile.snippets +0 -0
- data/lib/gollum/public/gollum/livepreview/js/ace/lib/ace/snippets/c.snippets +235 -0
- data/lib/gollum/public/gollum/livepreview/js/ace/lib/ace/snippets/c9search.js +7 -0
- data/lib/gollum/public/gollum/livepreview/js/ace/lib/ace/snippets/c9search.snippets +0 -0
- data/lib/gollum/public/gollum/livepreview/js/ace/lib/ace/snippets/c_cpp.js +7 -0
- data/lib/gollum/public/gollum/livepreview/js/ace/lib/ace/snippets/c_cpp.snippets +131 -0
- data/lib/gollum/public/gollum/livepreview/js/ace/lib/ace/snippets/chef.snippets +204 -0
- data/lib/gollum/public/gollum/livepreview/js/ace/lib/ace/snippets/cirru.js +7 -0
- data/lib/gollum/public/gollum/livepreview/js/ace/lib/ace/snippets/cirru.snippets +0 -0
- data/lib/gollum/public/gollum/livepreview/js/ace/lib/ace/snippets/clojure.js +7 -0
- data/lib/gollum/public/gollum/livepreview/js/ace/lib/ace/snippets/clojure.snippets +90 -0
- data/lib/gollum/public/gollum/livepreview/js/ace/lib/ace/snippets/cmake.snippets +58 -0
- data/lib/gollum/public/gollum/livepreview/js/ace/lib/ace/snippets/cobol.js +7 -0
- data/lib/gollum/public/gollum/livepreview/js/ace/lib/ace/snippets/cobol.snippets +0 -0
- data/lib/gollum/public/gollum/livepreview/js/ace/lib/ace/snippets/coffee.js +7 -0
- data/lib/gollum/public/gollum/livepreview/js/ace/lib/ace/snippets/coffee.snippets +95 -0
- data/lib/gollum/public/gollum/livepreview/js/ace/lib/ace/snippets/coldfusion.js +7 -0
- data/lib/gollum/public/gollum/livepreview/js/ace/lib/ace/snippets/coldfusion.snippets +0 -0
- data/lib/gollum/public/gollum/livepreview/js/ace/lib/ace/snippets/cs.snippets +374 -0
- data/lib/gollum/public/gollum/livepreview/js/ace/lib/ace/snippets/csharp.js +7 -0
- data/lib/gollum/public/gollum/livepreview/js/ace/lib/ace/snippets/csharp.snippets +0 -0
- data/lib/gollum/public/gollum/livepreview/js/ace/lib/ace/snippets/css.js +7 -0
- data/lib/gollum/public/gollum/livepreview/js/ace/lib/ace/snippets/css.snippets +967 -0
- data/lib/gollum/public/gollum/livepreview/js/ace/lib/ace/snippets/curly.js +7 -0
- data/lib/gollum/public/gollum/livepreview/js/ace/lib/ace/snippets/curly.snippets +0 -0
- data/lib/gollum/public/gollum/livepreview/js/ace/lib/ace/snippets/d.js +7 -0
- data/lib/gollum/public/gollum/livepreview/js/ace/lib/ace/snippets/d.snippets +0 -0
- data/lib/gollum/public/gollum/livepreview/js/ace/lib/ace/snippets/dart.js +7 -0
- data/lib/gollum/public/gollum/livepreview/js/ace/lib/ace/snippets/dart.snippets +83 -0
- data/lib/gollum/public/gollum/livepreview/js/ace/lib/ace/snippets/diff.js +7 -0
- data/lib/gollum/public/gollum/livepreview/js/ace/lib/ace/snippets/diff.snippets +11 -0
- data/lib/gollum/public/gollum/livepreview/js/ace/lib/ace/snippets/django.js +7 -0
- data/lib/gollum/public/gollum/livepreview/js/ace/lib/ace/snippets/django.snippets +108 -0
- data/lib/gollum/public/gollum/livepreview/js/ace/lib/ace/snippets/dockerfile.js +7 -0
- data/lib/gollum/public/gollum/livepreview/js/ace/lib/ace/snippets/dockerfile.snippets +0 -0
- data/lib/gollum/public/gollum/livepreview/js/ace/lib/ace/snippets/dot.js +7 -0
- data/lib/gollum/public/gollum/livepreview/js/ace/lib/ace/snippets/dot.snippets +0 -0
- data/lib/gollum/public/gollum/livepreview/js/ace/lib/ace/snippets/dummy.js +7 -0
- data/lib/gollum/public/gollum/livepreview/js/ace/lib/ace/snippets/dummy_syntax.js +7 -0
- data/lib/gollum/public/gollum/livepreview/js/ace/lib/ace/snippets/eiffel.js +7 -0
- data/lib/gollum/public/gollum/livepreview/js/ace/lib/ace/snippets/eiffel.snippets +0 -0
- data/lib/gollum/public/gollum/livepreview/js/ace/lib/ace/snippets/ejs.js +7 -0
- data/lib/gollum/public/gollum/livepreview/js/ace/lib/ace/snippets/ejs.snippets +0 -0
- data/lib/gollum/public/gollum/livepreview/js/ace/lib/ace/snippets/elixir.js +7 -0
- data/lib/gollum/public/gollum/livepreview/js/ace/lib/ace/snippets/elixir.snippets +0 -0
- data/lib/gollum/public/gollum/livepreview/js/ace/lib/ace/snippets/elm.js +7 -0
- data/lib/gollum/public/gollum/livepreview/js/ace/lib/ace/snippets/elm.snippets +0 -0
- data/lib/gollum/public/gollum/livepreview/js/ace/lib/ace/snippets/erlang.js +7 -0
- data/lib/gollum/public/gollum/livepreview/js/ace/lib/ace/snippets/erlang.snippets +160 -0
- data/lib/gollum/public/gollum/livepreview/js/ace/lib/ace/snippets/eruby.snippets +113 -0
- data/lib/gollum/public/gollum/livepreview/js/ace/lib/ace/snippets/falcon.snippets +71 -0
- data/lib/gollum/public/gollum/livepreview/js/ace/lib/ace/snippets/forth.js +7 -0
- data/lib/gollum/public/gollum/livepreview/js/ace/lib/ace/snippets/forth.snippets +0 -0
- data/lib/gollum/public/gollum/livepreview/js/ace/lib/ace/snippets/ftl.js +7 -0
- data/lib/gollum/public/gollum/livepreview/js/ace/lib/ace/snippets/ftl.snippets +0 -0
- data/lib/gollum/public/gollum/livepreview/js/ace/lib/ace/snippets/gcode.js +7 -0
- data/lib/gollum/public/gollum/livepreview/js/ace/lib/ace/snippets/gcode.snippets +0 -0
- data/lib/gollum/public/gollum/livepreview/js/ace/lib/ace/snippets/gherkin.js +7 -0
- data/lib/gollum/public/gollum/livepreview/js/ace/lib/ace/snippets/gherkin.snippets +0 -0
- data/lib/gollum/public/gollum/livepreview/js/ace/lib/ace/snippets/gitignore.js +7 -0
- data/lib/gollum/public/gollum/livepreview/js/ace/lib/ace/snippets/gitignore.snippets +0 -0
- data/lib/gollum/public/gollum/livepreview/js/ace/lib/ace/snippets/glsl.js +7 -0
- data/lib/gollum/public/gollum/livepreview/js/ace/lib/ace/snippets/glsl.snippets +0 -0
- data/lib/gollum/public/gollum/livepreview/js/ace/lib/ace/snippets/go.snippets +201 -0
- data/lib/gollum/public/gollum/livepreview/js/ace/lib/ace/snippets/golang.js +7 -0
- data/lib/gollum/public/gollum/livepreview/js/ace/lib/ace/snippets/golang.snippets +0 -0
- data/lib/gollum/public/gollum/livepreview/js/ace/lib/ace/snippets/groovy.js +7 -0
- data/lib/gollum/public/gollum/livepreview/js/ace/lib/ace/snippets/groovy.snippets +0 -0
- data/lib/gollum/public/gollum/livepreview/js/ace/lib/ace/snippets/haml.js +7 -0
- data/lib/gollum/public/gollum/livepreview/js/ace/lib/ace/snippets/haml.snippets +20 -0
- data/lib/gollum/public/gollum/livepreview/js/ace/lib/ace/snippets/handlebars.js +7 -0
- data/lib/gollum/public/gollum/livepreview/js/ace/lib/ace/snippets/handlebars.snippets +0 -0
- data/lib/gollum/public/gollum/livepreview/js/ace/lib/ace/snippets/haskell.js +7 -0
- data/lib/gollum/public/gollum/livepreview/js/ace/lib/ace/snippets/haskell.snippets +82 -0
- data/lib/gollum/public/gollum/livepreview/js/ace/lib/ace/snippets/haxe.js +7 -0
- data/lib/gollum/public/gollum/livepreview/js/ace/lib/ace/snippets/haxe.snippets +0 -0
- data/lib/gollum/public/gollum/livepreview/js/ace/lib/ace/snippets/html.js +7 -0
- data/lib/gollum/public/gollum/livepreview/js/ace/lib/ace/snippets/html.snippets +828 -0
- data/lib/gollum/public/gollum/livepreview/js/ace/lib/ace/snippets/html_ruby.js +7 -0
- data/lib/gollum/public/gollum/livepreview/js/ace/lib/ace/snippets/html_ruby.snippets +0 -0
- data/lib/gollum/public/gollum/livepreview/js/ace/lib/ace/snippets/htmldjango.snippets +136 -0
- data/lib/gollum/public/gollum/livepreview/js/ace/lib/ace/snippets/htmltornado.snippets +55 -0
- data/lib/gollum/public/gollum/livepreview/js/ace/lib/ace/snippets/ini.js +7 -0
- data/lib/gollum/public/gollum/livepreview/js/ace/lib/ace/snippets/ini.snippets +0 -0
- data/lib/gollum/public/gollum/livepreview/js/ace/lib/ace/snippets/io.js +69 -0
- data/lib/gollum/public/gollum/livepreview/js/ace/lib/ace/snippets/io.snippets +0 -0
- data/lib/gollum/public/gollum/livepreview/js/ace/lib/ace/snippets/jack.js +7 -0
- data/lib/gollum/public/gollum/livepreview/js/ace/lib/ace/snippets/jack.snippets +0 -0
- data/lib/gollum/public/gollum/livepreview/js/ace/lib/ace/snippets/jade.js +7 -0
- data/lib/gollum/public/gollum/livepreview/js/ace/lib/ace/snippets/jade.snippets +0 -0
- data/lib/gollum/public/gollum/livepreview/js/ace/lib/ace/snippets/java.js +7 -0
- data/lib/gollum/public/gollum/livepreview/js/ace/lib/ace/snippets/java.snippets +240 -0
- data/lib/gollum/public/gollum/livepreview/js/ace/lib/ace/snippets/javascript-jquery.snippets +589 -0
- data/lib/gollum/public/gollum/livepreview/js/ace/lib/ace/snippets/javascript.js +7 -0
- data/lib/gollum/public/gollum/livepreview/js/ace/lib/ace/snippets/javascript.snippets +195 -0
- data/lib/gollum/public/gollum/livepreview/js/ace/lib/ace/snippets/json.js +7 -0
- data/lib/gollum/public/gollum/livepreview/js/ace/lib/ace/snippets/json.snippets +0 -0
- data/lib/gollum/public/gollum/livepreview/js/ace/lib/ace/snippets/jsoniq.js +7 -0
- data/lib/gollum/public/gollum/livepreview/js/ace/lib/ace/snippets/jsoniq.snippets +61 -0
- data/lib/gollum/public/gollum/livepreview/js/ace/lib/ace/snippets/jsp.js +7 -0
- data/lib/gollum/public/gollum/livepreview/js/ace/lib/ace/snippets/jsp.snippets +99 -0
- data/lib/gollum/public/gollum/livepreview/js/ace/lib/ace/snippets/jsx.js +7 -0
- data/lib/gollum/public/gollum/livepreview/js/ace/lib/ace/snippets/jsx.snippets +0 -0
- data/lib/gollum/public/gollum/livepreview/js/ace/lib/ace/snippets/julia.js +7 -0
- data/lib/gollum/public/gollum/livepreview/js/ace/lib/ace/snippets/julia.snippets +0 -0
- data/lib/gollum/public/gollum/livepreview/js/ace/lib/ace/snippets/latex.js +7 -0
- data/lib/gollum/public/gollum/livepreview/js/ace/lib/ace/snippets/latex.snippets +0 -0
- data/lib/gollum/public/gollum/livepreview/js/ace/lib/ace/snippets/ledger.snippets +5 -0
- data/lib/gollum/public/gollum/livepreview/js/ace/lib/ace/snippets/less.js +7 -0
- data/lib/gollum/public/gollum/livepreview/js/ace/lib/ace/snippets/less.snippets +0 -0
- data/lib/gollum/public/gollum/livepreview/js/ace/lib/ace/snippets/liquid.js +7 -0
- data/lib/gollum/public/gollum/livepreview/js/ace/lib/ace/snippets/liquid.snippets +0 -0
- data/lib/gollum/public/gollum/livepreview/js/ace/lib/ace/snippets/lisp.js +7 -0
- data/lib/gollum/public/gollum/livepreview/js/ace/lib/ace/snippets/lisp.snippets +0 -0
- data/lib/gollum/public/gollum/livepreview/js/ace/lib/ace/snippets/livescript.js +7 -0
- data/lib/gollum/public/gollum/livepreview/js/ace/lib/ace/snippets/livescript.snippets +0 -0
- data/lib/gollum/public/gollum/livepreview/js/ace/lib/ace/snippets/logiql.js +7 -0
- data/lib/gollum/public/gollum/livepreview/js/ace/lib/ace/snippets/logiql.snippets +0 -0
- data/lib/gollum/public/gollum/livepreview/js/ace/lib/ace/snippets/lsl.js +7 -0
- data/lib/gollum/public/gollum/livepreview/js/ace/lib/ace/snippets/lsl.snippets +1066 -0
- data/lib/gollum/public/gollum/livepreview/js/ace/lib/ace/snippets/lua.js +7 -0
- data/lib/gollum/public/gollum/livepreview/js/ace/lib/ace/snippets/lua.snippets +21 -0
- data/lib/gollum/public/gollum/livepreview/js/ace/lib/ace/snippets/luapage.js +7 -0
- data/lib/gollum/public/gollum/livepreview/js/ace/lib/ace/snippets/luapage.snippets +0 -0
- data/lib/gollum/public/gollum/livepreview/js/ace/lib/ace/snippets/lucene.js +7 -0
- data/lib/gollum/public/gollum/livepreview/js/ace/lib/ace/snippets/lucene.snippets +0 -0
- data/lib/gollum/public/gollum/livepreview/js/ace/lib/ace/snippets/makefile.js +7 -0
- data/lib/gollum/public/gollum/livepreview/js/ace/lib/ace/snippets/makefile.snippets +4 -0
- data/lib/gollum/public/gollum/livepreview/js/ace/lib/ace/snippets/mako.snippets +54 -0
- data/lib/gollum/public/gollum/livepreview/js/ace/lib/ace/snippets/markdown.js +7 -0
- data/lib/gollum/public/gollum/livepreview/js/ace/lib/ace/snippets/markdown.snippets +88 -0
- data/lib/gollum/public/gollum/livepreview/js/ace/lib/ace/snippets/matlab.js +7 -0
- data/lib/gollum/public/gollum/livepreview/js/ace/lib/ace/snippets/matlab.snippets +0 -0
- data/lib/gollum/public/gollum/livepreview/js/ace/lib/ace/snippets/mel.js +7 -0
- data/lib/gollum/public/gollum/livepreview/js/ace/lib/ace/snippets/mel.snippets +0 -0
- data/lib/gollum/public/gollum/livepreview/js/ace/lib/ace/snippets/mushcode.js +7 -0
- data/lib/gollum/public/gollum/livepreview/js/ace/lib/ace/snippets/mushcode.snippets +0 -0
- data/lib/gollum/public/gollum/livepreview/js/ace/lib/ace/snippets/mushcode_high_rules.js +7 -0
- data/lib/gollum/public/gollum/livepreview/js/ace/lib/ace/snippets/mushcode_high_rules.snippets +0 -0
- data/lib/gollum/public/gollum/livepreview/js/ace/lib/ace/snippets/mysql.js +7 -0
- data/lib/gollum/public/gollum/livepreview/js/ace/lib/ace/snippets/mysql.snippets +0 -0
- data/lib/gollum/public/gollum/livepreview/js/ace/lib/ace/snippets/nix.js +7 -0
- data/lib/gollum/public/gollum/livepreview/js/ace/lib/ace/snippets/nix.snippets +0 -0
- data/lib/gollum/public/gollum/livepreview/js/ace/lib/ace/snippets/objc.snippets +247 -0
- data/lib/gollum/public/gollum/livepreview/js/ace/lib/ace/snippets/objectivec.js +7 -0
- data/lib/gollum/public/gollum/livepreview/js/ace/lib/ace/snippets/objectivec.snippets +0 -0
- data/lib/gollum/public/gollum/livepreview/js/ace/lib/ace/snippets/ocaml.js +7 -0
- data/lib/gollum/public/gollum/livepreview/js/ace/lib/ace/snippets/ocaml.snippets +0 -0
- data/lib/gollum/public/gollum/livepreview/js/ace/lib/ace/snippets/pascal.js +7 -0
- data/lib/gollum/public/gollum/livepreview/js/ace/lib/ace/snippets/pascal.snippets +0 -0
- data/lib/gollum/public/gollum/livepreview/js/ace/lib/ace/snippets/perl.js +7 -0
- data/lib/gollum/public/gollum/livepreview/js/ace/lib/ace/snippets/perl.snippets +347 -0
- data/lib/gollum/public/gollum/livepreview/js/ace/lib/ace/snippets/pgsql.js +7 -0
- data/lib/gollum/public/gollum/livepreview/js/ace/lib/ace/snippets/pgsql.snippets +0 -0
- data/lib/gollum/public/gollum/livepreview/js/ace/lib/ace/snippets/php.js +7 -0
- data/lib/gollum/public/gollum/livepreview/js/ace/lib/ace/snippets/php.snippets +377 -0
- data/lib/gollum/public/gollum/livepreview/js/ace/lib/ace/snippets/plain_text.js +7 -0
- data/lib/gollum/public/gollum/livepreview/js/ace/lib/ace/snippets/plain_text.snippets +0 -0
- data/lib/gollum/public/gollum/livepreview/js/ace/lib/ace/snippets/powershell.js +7 -0
- data/lib/gollum/public/gollum/livepreview/js/ace/lib/ace/snippets/powershell.snippets +0 -0
- data/lib/gollum/public/gollum/livepreview/js/ace/lib/ace/snippets/praat.js +7 -0
- data/lib/gollum/public/gollum/livepreview/js/ace/lib/ace/snippets/praat.snippets +0 -0
- data/lib/gollum/public/gollum/livepreview/js/ace/lib/ace/snippets/prolog.js +7 -0
- data/lib/gollum/public/gollum/livepreview/js/ace/lib/ace/snippets/prolog.snippets +0 -0
- data/lib/gollum/public/gollum/livepreview/js/ace/lib/ace/snippets/properties.js +7 -0
- data/lib/gollum/public/gollum/livepreview/js/ace/lib/ace/snippets/properties.snippets +0 -0
- data/lib/gollum/public/gollum/livepreview/js/ace/lib/ace/snippets/protobuf.js +7 -0
- data/lib/gollum/public/gollum/livepreview/js/ace/lib/ace/snippets/protobuf.snippets +0 -0
- data/lib/gollum/public/gollum/livepreview/js/ace/lib/ace/snippets/python.js +7 -0
- data/lib/gollum/public/gollum/livepreview/js/ace/lib/ace/snippets/python.snippets +158 -0
- data/lib/gollum/public/gollum/livepreview/js/ace/lib/ace/snippets/r.js +7 -0
- data/lib/gollum/public/gollum/livepreview/js/ace/lib/ace/snippets/r.snippets +121 -0
- data/lib/gollum/public/gollum/livepreview/js/ace/lib/ace/snippets/rdoc.js +7 -0
- data/lib/gollum/public/gollum/livepreview/js/ace/lib/ace/snippets/rdoc.snippets +0 -0
- data/lib/gollum/public/gollum/livepreview/js/ace/lib/ace/snippets/rhtml.js +7 -0
- data/lib/gollum/public/gollum/livepreview/js/ace/lib/ace/snippets/rhtml.snippets +0 -0
- data/lib/gollum/public/gollum/livepreview/js/ace/lib/ace/snippets/rst.snippets +22 -0
- data/lib/gollum/public/gollum/livepreview/js/ace/lib/ace/snippets/ruby.js +7 -0
- data/lib/gollum/public/gollum/livepreview/js/ace/lib/ace/snippets/ruby.snippets +928 -0
- data/lib/gollum/public/gollum/livepreview/js/ace/lib/ace/snippets/rust.js +7 -0
- data/lib/gollum/public/gollum/livepreview/js/ace/lib/ace/snippets/rust.snippets +0 -0
- data/lib/gollum/public/gollum/livepreview/js/ace/lib/ace/snippets/sass.js +7 -0
- data/lib/gollum/public/gollum/livepreview/js/ace/lib/ace/snippets/sass.snippets +0 -0
- data/lib/gollum/public/gollum/livepreview/js/ace/lib/ace/snippets/scad.js +7 -0
- data/lib/gollum/public/gollum/livepreview/js/ace/lib/ace/snippets/scad.snippets +0 -0
- data/lib/gollum/public/gollum/livepreview/js/ace/lib/ace/snippets/scala.js +7 -0
- data/lib/gollum/public/gollum/livepreview/js/ace/lib/ace/snippets/scala.snippets +0 -0
- data/lib/gollum/public/gollum/livepreview/js/ace/lib/ace/snippets/scheme.js +7 -0
- data/lib/gollum/public/gollum/livepreview/js/ace/lib/ace/snippets/scheme.snippets +0 -0
- data/lib/gollum/public/gollum/livepreview/js/ace/lib/ace/snippets/scss.js +7 -0
- data/lib/gollum/public/gollum/livepreview/js/ace/lib/ace/snippets/scss.snippets +0 -0
- data/lib/gollum/public/gollum/livepreview/js/ace/lib/ace/snippets/sh.js +7 -0
- data/lib/gollum/public/gollum/livepreview/js/ace/lib/ace/snippets/sh.snippets +83 -0
- data/lib/gollum/public/gollum/livepreview/js/ace/lib/ace/snippets/sjs.js +7 -0
- data/lib/gollum/public/gollum/livepreview/js/ace/lib/ace/snippets/sjs.snippets +0 -0
- data/lib/gollum/public/gollum/livepreview/js/ace/lib/ace/snippets/smarty.js +7 -0
- data/lib/gollum/public/gollum/livepreview/js/ace/lib/ace/snippets/smarty.snippets +0 -0
- data/lib/gollum/public/gollum/livepreview/js/ace/lib/ace/snippets/snippets.js +7 -0
- data/lib/gollum/public/gollum/livepreview/js/ace/lib/ace/snippets/snippets.snippets +9 -0
- data/lib/gollum/public/gollum/livepreview/js/ace/lib/ace/snippets/soy_template.js +7 -0
- data/lib/gollum/public/gollum/livepreview/js/ace/lib/ace/snippets/soy_template.snippets +0 -0
- data/lib/gollum/public/gollum/livepreview/js/ace/lib/ace/snippets/space.js +7 -0
- data/lib/gollum/public/gollum/livepreview/js/ace/lib/ace/snippets/space.snippets +0 -0
- data/lib/gollum/public/gollum/livepreview/js/ace/lib/ace/snippets/sql.js +7 -0
- data/lib/gollum/public/gollum/livepreview/js/ace/lib/ace/snippets/sql.snippets +26 -0
- data/lib/gollum/public/gollum/livepreview/js/ace/lib/ace/snippets/stylus.js +7 -0
- data/lib/gollum/public/gollum/livepreview/js/ace/lib/ace/snippets/stylus.snippets +0 -0
- data/lib/gollum/public/gollum/livepreview/js/ace/lib/ace/snippets/svg.js +7 -0
- data/lib/gollum/public/gollum/livepreview/js/ace/lib/ace/snippets/svg.snippets +0 -0
- data/lib/gollum/public/gollum/livepreview/js/ace/lib/ace/snippets/tcl.js +7 -0
- data/lib/gollum/public/gollum/livepreview/js/ace/lib/ace/snippets/tcl.snippets +92 -0
- data/lib/gollum/public/gollum/livepreview/js/ace/lib/ace/snippets/tex.js +7 -0
- data/lib/gollum/public/gollum/livepreview/js/ace/lib/ace/snippets/tex.snippets +191 -0
- data/lib/gollum/public/gollum/livepreview/js/ace/lib/ace/snippets/text.js +7 -0
- data/lib/gollum/public/gollum/livepreview/js/ace/lib/ace/snippets/text.snippets +0 -0
- data/lib/gollum/public/gollum/livepreview/js/ace/lib/ace/snippets/textile.js +7 -0
- data/lib/gollum/public/gollum/livepreview/js/ace/lib/ace/snippets/textile.snippets +30 -0
- data/lib/gollum/public/gollum/livepreview/js/ace/lib/ace/snippets/tmsnippet.snippets +0 -0
- data/lib/gollum/public/gollum/livepreview/js/ace/lib/ace/snippets/toml.js +7 -0
- data/lib/gollum/public/gollum/livepreview/js/ace/lib/ace/snippets/toml.snippets +0 -0
- data/lib/gollum/public/gollum/livepreview/js/ace/lib/ace/snippets/twig.js +7 -0
- data/lib/gollum/public/gollum/livepreview/js/ace/lib/ace/snippets/twig.snippets +0 -0
- data/lib/gollum/public/gollum/livepreview/js/ace/lib/ace/snippets/typescript.js +7 -0
- data/lib/gollum/public/gollum/livepreview/js/ace/lib/ace/snippets/typescript.snippets +0 -0
- data/lib/gollum/public/gollum/livepreview/js/ace/lib/ace/snippets/vala.js +195 -0
- data/lib/gollum/public/gollum/livepreview/js/ace/lib/ace/snippets/vala.snippets +0 -0
- data/lib/gollum/public/gollum/livepreview/js/ace/lib/ace/snippets/vbscript.js +7 -0
- data/lib/gollum/public/gollum/livepreview/js/ace/lib/ace/snippets/vbscript.snippets +0 -0
- data/lib/gollum/public/gollum/livepreview/js/ace/lib/ace/snippets/velocity.js +8 -0
- data/lib/gollum/public/gollum/livepreview/js/ace/lib/ace/snippets/velocity.snippets +28 -0
- data/lib/gollum/public/gollum/livepreview/js/ace/lib/ace/snippets/verilog.js +7 -0
- data/lib/gollum/public/gollum/livepreview/js/ace/lib/ace/snippets/verilog.snippets +0 -0
- data/lib/gollum/public/gollum/livepreview/js/ace/lib/ace/snippets/vhdl.js +7 -0
- data/lib/gollum/public/gollum/livepreview/js/ace/lib/ace/snippets/vhdl.snippets +0 -0
- data/lib/gollum/public/gollum/livepreview/js/ace/lib/ace/snippets/xml.js +7 -0
- data/lib/gollum/public/gollum/livepreview/js/ace/lib/ace/snippets/xml.snippets +0 -0
- data/lib/gollum/public/gollum/livepreview/js/ace/lib/ace/snippets/xquery.js +7 -0
- data/lib/gollum/public/gollum/livepreview/js/ace/lib/ace/snippets/xquery.snippets +61 -0
- data/lib/gollum/public/gollum/livepreview/js/ace/lib/ace/snippets/xslt.snippets +97 -0
- data/lib/gollum/public/gollum/livepreview/js/ace/lib/ace/snippets/yaml.js +7 -0
- data/lib/gollum/public/gollum/livepreview/js/ace/lib/ace/snippets/yaml.snippets +0 -0
- data/lib/gollum/public/gollum/livepreview/js/ace/lib/ace/snippets_test.js +131 -0
- data/lib/gollum/public/gollum/livepreview/js/ace/lib/ace/split.js +3 -3
- data/lib/gollum/public/gollum/livepreview/js/ace/lib/ace/test/all_browser.js +20 -7
- data/lib/gollum/public/gollum/livepreview/js/ace/lib/ace/test/asyncjs/assert.js +2 -2
- data/lib/gollum/public/gollum/livepreview/js/ace/lib/ace/test/mockrenderer.js +8 -0
- data/lib/gollum/public/gollum/livepreview/js/ace/lib/ace/theme/ambiance.css +6 -2
- data/lib/gollum/public/gollum/livepreview/js/ace/lib/ace/theme/chaos.css +154 -0
- data/lib/gollum/public/gollum/livepreview/js/ace/lib/ace/theme/chaos.js +33 -0
- data/lib/gollum/public/gollum/livepreview/js/ace/lib/ace/theme/chrome.css +5 -9
- data/lib/gollum/public/gollum/livepreview/js/ace/lib/ace/theme/clouds.css +3 -15
- data/lib/gollum/public/gollum/livepreview/js/ace/lib/ace/theme/clouds.js +1 -1
- data/lib/gollum/public/gollum/livepreview/js/ace/lib/ace/theme/clouds_midnight.css +4 -16
- data/lib/gollum/public/gollum/livepreview/js/ace/lib/ace/theme/clouds_midnight.js +1 -1
- data/lib/gollum/public/gollum/livepreview/js/ace/lib/ace/theme/cobalt.css +16 -26
- data/lib/gollum/public/gollum/livepreview/js/ace/lib/ace/theme/cobalt.js +1 -1
- data/lib/gollum/public/gollum/livepreview/js/ace/lib/ace/theme/crimson_editor.css +2 -10
- data/lib/gollum/public/gollum/livepreview/js/ace/lib/ace/theme/dawn.css +10 -20
- data/lib/gollum/public/gollum/livepreview/js/ace/lib/ace/theme/dawn.js +1 -1
- data/lib/gollum/public/gollum/livepreview/js/ace/lib/ace/theme/dreamweaver.css +9 -12
- data/lib/gollum/public/gollum/livepreview/js/ace/lib/ace/theme/eclipse.css +16 -9
- data/lib/gollum/public/gollum/livepreview/js/ace/lib/ace/theme/github.css +3 -10
- data/lib/gollum/public/gollum/livepreview/js/ace/lib/ace/theme/idle_fingers.css +5 -17
- data/lib/gollum/public/gollum/livepreview/js/ace/lib/ace/theme/idle_fingers.js +1 -1
- data/lib/gollum/public/gollum/livepreview/js/ace/lib/ace/theme/katzenmilch.css +140 -0
- data/lib/gollum/public/gollum/livepreview/js/ace/lib/ace/theme/katzenmilch.js +39 -0
- data/lib/gollum/public/gollum/livepreview/js/ace/lib/ace/theme/kr_theme.css +9 -20
- data/lib/gollum/public/gollum/livepreview/js/ace/lib/ace/theme/kr_theme.js +1 -1
- data/lib/gollum/public/gollum/livepreview/js/ace/lib/ace/theme/kuroir.css +67 -0
- data/lib/gollum/public/gollum/livepreview/js/ace/lib/ace/theme/kuroir.js +39 -0
- data/lib/gollum/public/gollum/livepreview/js/ace/lib/ace/theme/merbivore.css +4 -16
- data/lib/gollum/public/gollum/livepreview/js/ace/lib/ace/theme/merbivore.js +1 -1
- data/lib/gollum/public/gollum/livepreview/js/ace/lib/ace/theme/merbivore_soft.css +4 -16
- data/lib/gollum/public/gollum/livepreview/js/ace/lib/ace/theme/merbivore_soft.js +1 -1
- data/lib/gollum/public/gollum/livepreview/js/ace/lib/ace/theme/mono_industrial.css +5 -17
- data/lib/gollum/public/gollum/livepreview/js/ace/lib/ace/theme/mono_industrial.js +1 -1
- data/lib/gollum/public/gollum/livepreview/js/ace/lib/ace/theme/monokai.css +14 -20
- data/lib/gollum/public/gollum/livepreview/js/ace/lib/ace/theme/monokai.js +1 -1
- data/lib/gollum/public/gollum/livepreview/js/ace/lib/ace/theme/pastel_on_dark.css +4 -16
- data/lib/gollum/public/gollum/livepreview/js/ace/lib/ace/theme/pastel_on_dark.js +1 -1
- data/lib/gollum/public/gollum/livepreview/js/ace/lib/ace/theme/solarized_dark.css +8 -20
- data/lib/gollum/public/gollum/livepreview/js/ace/lib/ace/theme/solarized_dark.js +1 -1
- data/lib/gollum/public/gollum/livepreview/js/ace/lib/ace/theme/solarized_light.css +6 -18
- data/lib/gollum/public/gollum/livepreview/js/ace/lib/ace/theme/solarized_light.js +1 -1
- data/lib/gollum/public/gollum/livepreview/js/ace/lib/ace/theme/terminal.css +132 -0
- data/lib/gollum/public/gollum/livepreview/js/ace/lib/ace/theme/terminal.js +39 -0
- data/lib/gollum/public/gollum/livepreview/js/ace/lib/ace/theme/textmate.css +5 -9
- data/lib/gollum/public/gollum/livepreview/js/ace/lib/ace/theme/tomorrow.css +4 -15
- data/lib/gollum/public/gollum/livepreview/js/ace/lib/ace/theme/tomorrow.js +1 -1
- data/lib/gollum/public/gollum/livepreview/js/ace/lib/ace/theme/tomorrow_night.css +5 -16
- data/lib/gollum/public/gollum/livepreview/js/ace/lib/ace/theme/tomorrow_night.js +1 -1
- data/lib/gollum/public/gollum/livepreview/js/ace/lib/ace/theme/tomorrow_night_blue.css +6 -17
- data/lib/gollum/public/gollum/livepreview/js/ace/lib/ace/theme/tomorrow_night_blue.js +1 -1
- data/lib/gollum/public/gollum/livepreview/js/ace/lib/ace/theme/tomorrow_night_bright.css +21 -16
- data/lib/gollum/public/gollum/livepreview/js/ace/lib/ace/theme/tomorrow_night_bright.js +1 -1
- data/lib/gollum/public/gollum/livepreview/js/ace/lib/ace/theme/tomorrow_night_eighties.css +10 -17
- data/lib/gollum/public/gollum/livepreview/js/ace/lib/ace/theme/tomorrow_night_eighties.js +1 -1
- data/lib/gollum/public/gollum/livepreview/js/ace/lib/ace/theme/twilight.css +6 -16
- data/lib/gollum/public/gollum/livepreview/js/ace/lib/ace/theme/twilight.js +1 -1
- data/lib/gollum/public/gollum/livepreview/js/ace/lib/ace/theme/vibrant_ink.css +4 -12
- data/lib/gollum/public/gollum/livepreview/js/ace/lib/ace/theme/vibrant_ink.js +1 -1
- data/lib/gollum/public/gollum/livepreview/js/ace/lib/ace/theme/xcode.css +4 -12
- data/lib/gollum/public/gollum/livepreview/js/ace/lib/ace/theme/xcode.js +1 -1
- data/lib/gollum/public/gollum/livepreview/js/ace/lib/ace/token_iterator.js +4 -3
- data/lib/gollum/public/gollum/livepreview/js/ace/lib/ace/tokenizer.js +246 -78
- data/lib/gollum/public/gollum/livepreview/js/ace/lib/ace/tokenizer_dev.js +71 -93
- data/lib/gollum/public/gollum/livepreview/js/ace/lib/ace/tokenizer_test.js +97 -0
- data/lib/gollum/public/gollum/livepreview/js/ace/lib/ace/tooltip.js +138 -0
- data/lib/gollum/public/gollum/livepreview/js/ace/lib/ace/undomanager.js +63 -30
- data/lib/gollum/public/gollum/livepreview/js/ace/lib/ace/virtual_renderer.js +788 -403
- data/lib/gollum/public/gollum/livepreview/js/ace/lib/ace/worker/mirror.js +9 -3
- data/lib/gollum/public/gollum/livepreview/js/ace/lib/ace/worker/worker.js +92 -55
- data/lib/gollum/public/gollum/livepreview/js/ace/lib/ace/worker/worker_client.js +90 -52
- data/lib/gollum/public/gollum/livepreview/js/ace/lib/ace/worker/worker_test.js +125 -0
- data/lib/gollum/public/gollum/livepreview/js/livepreview.js +18 -12
- data/lib/gollum/public/gollum/livepreview/readme.md +1 -1
- data/lib/gollum/templates/layout.mustache +1 -1
- data/lib/gollum/{public/gollum/livepreview/index.html → templates/livepreview.mustache} +23 -1
- data/lib/gollum/views/livepreview.rb +13 -0
- metadata +569 -37
- data/lib/gollum/editing_auth.rb +0 -34
- data/lib/gollum/public/gollum/livepreview/js/ace/lib/ace/keyboard/vim/commands.js +0 -561
- data/lib/gollum/public/gollum/livepreview/js/ace/lib/ace/keyboard/vim/maps/motions.js +0 -593
- data/lib/gollum/public/gollum/livepreview/js/ace/lib/ace/keyboard/vim/maps/operators.js +0 -196
- data/lib/gollum/public/gollum/livepreview/js/ace/lib/ace/keyboard/vim/maps/util.js +0 -134
- data/lib/gollum/public/gollum/livepreview/js/ace/lib/ace/mode/_test/test_highlight_rules.js +0 -144
- data/lib/gollum/public/gollum/livepreview/js/ace/lib/ace/mode/coffee_highlight_rules_test.js +0 -266
- data/lib/gollum/public/gollum/livepreview/js/ace/lib/ace/mode/html_highlight_rules_test.js +0 -186
- data/lib/gollum/public/gollum/livepreview/js/ace/lib/ace/mode/javascript_highlight_rules_test.js +0 -218
- data/lib/gollum/public/gollum/livepreview/js/ace/lib/ace/mode/lucene_highlight_rules_test.js +0 -99
- data/lib/gollum/public/gollum/livepreview/js/ace/lib/ace/mode/markdown_highlight_rules_test.js +0 -100
- data/lib/gollum/public/gollum/livepreview/js/ace/lib/ace/mode/ruby_highlight_rules_test.js +0 -108
- data/lib/gollum/public/gollum/livepreview/js/ace/lib/ace/mode/xml_highlight_rules_test.js +0 -208
- data/lib/gollum/public/gollum/livepreview/js/ace/lib/ace/mode/xml_util.js +0 -112
- data/lib/gollum/public/gollum/livepreview/js/ace/lib/ace/mode/xquery/XQueryParser.js +0 -32982
- data/lib/gollum/public/gollum/livepreview/js/ace/lib/ace/mode/xquery/visitors/SyntaxHighlighter.js +0 -316
- data/lib/gollum/public/gollum/livepreview/js/ace/lib/ace/mode/xquery_highlight_rules.js +0 -145
- data/lib/gollum/public/gollum/livepreview/js/ace/lib/ace/mouse/dragdrop.js +0 -98
- data/lib/gollum/public/gollum/livepreview/js/ace/lib/ace/worker/worker_sourcemint.js +0 -73
@@ -434,9 +434,7 @@ module.exports = {
|
|
434
434
|
},
|
435
435
|
|
436
436
|
"test (keyboard navigation) when curLine is not EOL and targetLine is all whitespace new column should be current column": function() {
|
437
|
-
var session = new EditSession("function (a) {\n\
|
438
|
-
\n\
|
439
|
-
}");
|
437
|
+
var session = new EditSession("function (a) {\n \n}");
|
440
438
|
var selection = session.getSelection();
|
441
439
|
|
442
440
|
selection.moveCursorTo(2, 0);
|
@@ -445,16 +443,33 @@ module.exports = {
|
|
445
443
|
assert.position(selection.getCursor(), 1, 0);
|
446
444
|
},
|
447
445
|
|
448
|
-
"test (keyboard navigation) when curLine is EOL and targetLine is shorter
|
449
|
-
var session = new EditSession("function (a) {\n\
|
450
|
-
\n\
|
451
|
-
}");
|
446
|
+
"test (keyboard navigation) when curLine is EOL and targetLine is shorter than current column, new column should be targetLine's EOL": function() {
|
447
|
+
var session = new EditSession("function (a) {\n \n}");
|
452
448
|
var selection = session.getSelection();
|
453
449
|
|
454
450
|
selection.moveCursorTo(0, 14);
|
455
451
|
selection.moveCursorDown();
|
456
452
|
|
457
453
|
assert.position(selection.getCursor(), 1, 4);
|
454
|
+
},
|
455
|
+
|
456
|
+
"test fromJSON/toJSON": function() {
|
457
|
+
var session = new EditSession("function (a) {\n \n}");
|
458
|
+
var selection = session.getSelection();
|
459
|
+
|
460
|
+
selection.moveCursorTo(0, 14);
|
461
|
+
selection.moveCursorDown();
|
462
|
+
assert.position(selection.getCursor(), 1, 4);
|
463
|
+
var data = selection.toJSON();
|
464
|
+
data = JSON.parse(JSON.stringify(data))
|
465
|
+
selection.moveCursorDown();
|
466
|
+
assert.position(selection.getCursor(), 2, 1);
|
467
|
+
|
468
|
+
assert.ok(!selection.isEqual(data));
|
469
|
+
|
470
|
+
selection.fromJSON(data);
|
471
|
+
assert.position(selection.getCursor(), 1, 4);
|
472
|
+
assert.ok(selection.isEqual(data));
|
458
473
|
}
|
459
474
|
};
|
460
475
|
|
@@ -0,0 +1,949 @@
|
|
1
|
+
/* ***** BEGIN LICENSE BLOCK *****
|
2
|
+
* Distributed under the BSD license:
|
3
|
+
*
|
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.
|
28
|
+
*
|
29
|
+
* ***** END LICENSE BLOCK ***** */
|
30
|
+
|
31
|
+
define(function(require, exports, module) {
|
32
|
+
"use strict";
|
33
|
+
var oop = require("./lib/oop");
|
34
|
+
var EventEmitter = require("./lib/event_emitter").EventEmitter;
|
35
|
+
var lang = require("./lib/lang");
|
36
|
+
var Range = require("./range").Range;
|
37
|
+
var Anchor = require("./anchor").Anchor;
|
38
|
+
var HashHandler = require("./keyboard/hash_handler").HashHandler;
|
39
|
+
var Tokenizer = require("./tokenizer").Tokenizer;
|
40
|
+
var comparePoints = Range.comparePoints;
|
41
|
+
|
42
|
+
var SnippetManager = function() {
|
43
|
+
this.snippetMap = {};
|
44
|
+
this.snippetNameMap = {};
|
45
|
+
};
|
46
|
+
|
47
|
+
(function() {
|
48
|
+
oop.implement(this, EventEmitter);
|
49
|
+
|
50
|
+
this.getTokenizer = function() {
|
51
|
+
function TabstopToken(str, _, stack) {
|
52
|
+
str = str.substr(1);
|
53
|
+
if (/^\d+$/.test(str) && !stack.inFormatString)
|
54
|
+
return [{tabstopId: parseInt(str, 10)}];
|
55
|
+
return [{text: str}];
|
56
|
+
}
|
57
|
+
function escape(ch) {
|
58
|
+
return "(?:[^\\\\" + ch + "]|\\\\.)";
|
59
|
+
}
|
60
|
+
SnippetManager.$tokenizer = new Tokenizer({
|
61
|
+
start: [
|
62
|
+
{regex: /:/, onMatch: function(val, state, stack) {
|
63
|
+
if (stack.length && stack[0].expectIf) {
|
64
|
+
stack[0].expectIf = false;
|
65
|
+
stack[0].elseBranch = stack[0];
|
66
|
+
return [stack[0]];
|
67
|
+
}
|
68
|
+
return ":";
|
69
|
+
}},
|
70
|
+
{regex: /\\./, onMatch: function(val, state, stack) {
|
71
|
+
var ch = val[1];
|
72
|
+
if (ch == "}" && stack.length) {
|
73
|
+
val = ch;
|
74
|
+
}else if ("`$\\".indexOf(ch) != -1) {
|
75
|
+
val = ch;
|
76
|
+
} else if (stack.inFormatString) {
|
77
|
+
if (ch == "n")
|
78
|
+
val = "\n";
|
79
|
+
else if (ch == "t")
|
80
|
+
val = "\n";
|
81
|
+
else if ("ulULE".indexOf(ch) != -1) {
|
82
|
+
val = {changeCase: ch, local: ch > "a"};
|
83
|
+
}
|
84
|
+
}
|
85
|
+
|
86
|
+
return [val];
|
87
|
+
}},
|
88
|
+
{regex: /}/, onMatch: function(val, state, stack) {
|
89
|
+
return [stack.length ? stack.shift() : val];
|
90
|
+
}},
|
91
|
+
{regex: /\$(?:\d+|\w+)/, onMatch: TabstopToken},
|
92
|
+
{regex: /\$\{[\dA-Z_a-z]+/, onMatch: function(str, state, stack) {
|
93
|
+
var t = TabstopToken(str.substr(1), state, stack);
|
94
|
+
stack.unshift(t[0]);
|
95
|
+
return t;
|
96
|
+
}, next: "snippetVar"},
|
97
|
+
{regex: /\n/, token: "newline", merge: false}
|
98
|
+
],
|
99
|
+
snippetVar: [
|
100
|
+
{regex: "\\|" + escape("\\|") + "*\\|", onMatch: function(val, state, stack) {
|
101
|
+
stack[0].choices = val.slice(1, -1).split(",");
|
102
|
+
}, next: "start"},
|
103
|
+
{regex: "/(" + escape("/") + "+)/(?:(" + escape("/") + "*)/)(\\w*):?",
|
104
|
+
onMatch: function(val, state, stack) {
|
105
|
+
var ts = stack[0];
|
106
|
+
ts.fmtString = val;
|
107
|
+
|
108
|
+
val = this.splitRegex.exec(val);
|
109
|
+
ts.guard = val[1];
|
110
|
+
ts.fmt = val[2];
|
111
|
+
ts.flag = val[3];
|
112
|
+
return "";
|
113
|
+
}, next: "start"},
|
114
|
+
{regex: "`" + escape("`") + "*`", onMatch: function(val, state, stack) {
|
115
|
+
stack[0].code = val.splice(1, -1);
|
116
|
+
return "";
|
117
|
+
}, next: "start"},
|
118
|
+
{regex: "\\?", onMatch: function(val, state, stack) {
|
119
|
+
if (stack[0])
|
120
|
+
stack[0].expectIf = true;
|
121
|
+
}, next: "start"},
|
122
|
+
{regex: "([^:}\\\\]|\\\\.)*:?", token: "", next: "start"}
|
123
|
+
],
|
124
|
+
formatString: [
|
125
|
+
{regex: "/(" + escape("/") + "+)/", token: "regex"},
|
126
|
+
{regex: "", onMatch: function(val, state, stack) {
|
127
|
+
stack.inFormatString = true;
|
128
|
+
}, next: "start"}
|
129
|
+
]
|
130
|
+
});
|
131
|
+
SnippetManager.prototype.getTokenizer = function() {
|
132
|
+
return SnippetManager.$tokenizer;
|
133
|
+
};
|
134
|
+
return SnippetManager.$tokenizer;
|
135
|
+
};
|
136
|
+
|
137
|
+
this.tokenizeTmSnippet = function(str, startState) {
|
138
|
+
return this.getTokenizer().getLineTokens(str, startState).tokens.map(function(x) {
|
139
|
+
return x.value || x;
|
140
|
+
});
|
141
|
+
};
|
142
|
+
|
143
|
+
this.$getDefaultValue = function(editor, name) {
|
144
|
+
if (/^[A-Z]\d+$/.test(name)) {
|
145
|
+
var i = name.substr(1);
|
146
|
+
return (this.variables[name[0] + "__"] || {})[i];
|
147
|
+
}
|
148
|
+
if (/^\d+$/.test(name)) {
|
149
|
+
return (this.variables.__ || {})[name];
|
150
|
+
}
|
151
|
+
name = name.replace(/^TM_/, "");
|
152
|
+
|
153
|
+
if (!editor)
|
154
|
+
return;
|
155
|
+
var s = editor.session;
|
156
|
+
switch(name) {
|
157
|
+
case "CURRENT_WORD":
|
158
|
+
var r = s.getWordRange();
|
159
|
+
/* falls through */
|
160
|
+
case "SELECTION":
|
161
|
+
case "SELECTED_TEXT":
|
162
|
+
return s.getTextRange(r);
|
163
|
+
case "CURRENT_LINE":
|
164
|
+
return s.getLine(editor.getCursorPosition().row);
|
165
|
+
case "PREV_LINE": // not possible in textmate
|
166
|
+
return s.getLine(editor.getCursorPosition().row - 1);
|
167
|
+
case "LINE_INDEX":
|
168
|
+
return editor.getCursorPosition().column;
|
169
|
+
case "LINE_NUMBER":
|
170
|
+
return editor.getCursorPosition().row + 1;
|
171
|
+
case "SOFT_TABS":
|
172
|
+
return s.getUseSoftTabs() ? "YES" : "NO";
|
173
|
+
case "TAB_SIZE":
|
174
|
+
return s.getTabSize();
|
175
|
+
// default but can't fill :(
|
176
|
+
case "FILENAME":
|
177
|
+
case "FILEPATH":
|
178
|
+
return "";
|
179
|
+
case "FULLNAME":
|
180
|
+
return "Ace";
|
181
|
+
}
|
182
|
+
};
|
183
|
+
this.variables = {};
|
184
|
+
this.getVariableValue = function(editor, varName) {
|
185
|
+
if (this.variables.hasOwnProperty(varName))
|
186
|
+
return this.variables[varName](editor, varName) || "";
|
187
|
+
return this.$getDefaultValue(editor, varName) || "";
|
188
|
+
};
|
189
|
+
|
190
|
+
// returns string formatted according to http://manual.macromates.com/en/regular_expressions#replacement_string_syntax_format_strings
|
191
|
+
this.tmStrFormat = function(str, ch, editor) {
|
192
|
+
var flag = ch.flag || "";
|
193
|
+
var re = ch.guard;
|
194
|
+
re = new RegExp(re, flag.replace(/[^gi]/, ""));
|
195
|
+
var fmtTokens = this.tokenizeTmSnippet(ch.fmt, "formatString");
|
196
|
+
var _self = this;
|
197
|
+
var formatted = str.replace(re, function() {
|
198
|
+
_self.variables.__ = arguments;
|
199
|
+
var fmtParts = _self.resolveVariables(fmtTokens, editor);
|
200
|
+
var gChangeCase = "E";
|
201
|
+
for (var i = 0; i < fmtParts.length; i++) {
|
202
|
+
var ch = fmtParts[i];
|
203
|
+
if (typeof ch == "object") {
|
204
|
+
fmtParts[i] = "";
|
205
|
+
if (ch.changeCase && ch.local) {
|
206
|
+
var next = fmtParts[i + 1];
|
207
|
+
if (next && typeof next == "string") {
|
208
|
+
if (ch.changeCase == "u")
|
209
|
+
fmtParts[i] = next[0].toUpperCase();
|
210
|
+
else
|
211
|
+
fmtParts[i] = next[0].toLowerCase();
|
212
|
+
fmtParts[i + 1] = next.substr(1);
|
213
|
+
}
|
214
|
+
} else if (ch.changeCase) {
|
215
|
+
gChangeCase = ch.changeCase;
|
216
|
+
}
|
217
|
+
} else if (gChangeCase == "U") {
|
218
|
+
fmtParts[i] = ch.toUpperCase();
|
219
|
+
} else if (gChangeCase == "L") {
|
220
|
+
fmtParts[i] = ch.toLowerCase();
|
221
|
+
}
|
222
|
+
}
|
223
|
+
return fmtParts.join("");
|
224
|
+
});
|
225
|
+
this.variables.__ = null;
|
226
|
+
return formatted;
|
227
|
+
};
|
228
|
+
|
229
|
+
this.resolveVariables = function(snippet, editor) {
|
230
|
+
var result = [];
|
231
|
+
for (var i = 0; i < snippet.length; i++) {
|
232
|
+
var ch = snippet[i];
|
233
|
+
if (typeof ch == "string") {
|
234
|
+
result.push(ch);
|
235
|
+
} else if (typeof ch != "object") {
|
236
|
+
continue;
|
237
|
+
} else if (ch.skip) {
|
238
|
+
gotoNext(ch);
|
239
|
+
} else if (ch.processed < i) {
|
240
|
+
continue;
|
241
|
+
} else if (ch.text) {
|
242
|
+
var value = this.getVariableValue(editor, ch.text);
|
243
|
+
if (value && ch.fmtString)
|
244
|
+
value = this.tmStrFormat(value, ch);
|
245
|
+
ch.processed = i;
|
246
|
+
if (ch.expectIf == null) {
|
247
|
+
if (value) {
|
248
|
+
result.push(value);
|
249
|
+
gotoNext(ch);
|
250
|
+
}
|
251
|
+
} else {
|
252
|
+
if (value) {
|
253
|
+
ch.skip = ch.elseBranch;
|
254
|
+
} else
|
255
|
+
gotoNext(ch);
|
256
|
+
}
|
257
|
+
} else if (ch.tabstopId != null) {
|
258
|
+
result.push(ch);
|
259
|
+
} else if (ch.changeCase != null) {
|
260
|
+
result.push(ch);
|
261
|
+
}
|
262
|
+
}
|
263
|
+
function gotoNext(ch) {
|
264
|
+
var i1 = snippet.indexOf(ch, i + 1);
|
265
|
+
if (i1 != -1)
|
266
|
+
i = i1;
|
267
|
+
}
|
268
|
+
return result;
|
269
|
+
};
|
270
|
+
|
271
|
+
this.insertSnippetForSelection = function(editor, snippetText) {
|
272
|
+
var cursor = editor.getCursorPosition();
|
273
|
+
var line = editor.session.getLine(cursor.row);
|
274
|
+
var tabString = editor.session.getTabString();
|
275
|
+
var indentString = line.match(/^\s*/)[0];
|
276
|
+
|
277
|
+
if (cursor.column < indentString.length)
|
278
|
+
indentString = indentString.slice(0, cursor.column);
|
279
|
+
|
280
|
+
var tokens = this.tokenizeTmSnippet(snippetText);
|
281
|
+
tokens = this.resolveVariables(tokens, editor);
|
282
|
+
// indent
|
283
|
+
tokens = tokens.map(function(x) {
|
284
|
+
if (x == "\n")
|
285
|
+
return x + indentString;
|
286
|
+
if (typeof x == "string")
|
287
|
+
return x.replace(/\t/g, tabString);
|
288
|
+
return x;
|
289
|
+
});
|
290
|
+
// tabstop values
|
291
|
+
var tabstops = [];
|
292
|
+
tokens.forEach(function(p, i) {
|
293
|
+
if (typeof p != "object")
|
294
|
+
return;
|
295
|
+
var id = p.tabstopId;
|
296
|
+
var ts = tabstops[id];
|
297
|
+
if (!ts) {
|
298
|
+
ts = tabstops[id] = [];
|
299
|
+
ts.index = id;
|
300
|
+
ts.value = "";
|
301
|
+
}
|
302
|
+
if (ts.indexOf(p) !== -1)
|
303
|
+
return;
|
304
|
+
ts.push(p);
|
305
|
+
var i1 = tokens.indexOf(p, i + 1);
|
306
|
+
if (i1 === -1)
|
307
|
+
return;
|
308
|
+
|
309
|
+
var value = tokens.slice(i + 1, i1);
|
310
|
+
var isNested = value.some(function(t) {return typeof t === "object"});
|
311
|
+
if (isNested && !ts.value) {
|
312
|
+
ts.value = value;
|
313
|
+
} else if (value.length && (!ts.value || typeof ts.value !== "string")) {
|
314
|
+
ts.value = value.join("");
|
315
|
+
}
|
316
|
+
});
|
317
|
+
|
318
|
+
// expand tabstop values
|
319
|
+
tabstops.forEach(function(ts) {ts.length = 0});
|
320
|
+
var expanding = {};
|
321
|
+
function copyValue(val) {
|
322
|
+
var copy = [];
|
323
|
+
for (var i = 0; i < val.length; i++) {
|
324
|
+
var p = val[i];
|
325
|
+
if (typeof p == "object") {
|
326
|
+
if (expanding[p.tabstopId])
|
327
|
+
continue;
|
328
|
+
var j = val.lastIndexOf(p, i - 1);
|
329
|
+
p = copy[j] || {tabstopId: p.tabstopId};
|
330
|
+
}
|
331
|
+
copy[i] = p;
|
332
|
+
}
|
333
|
+
return copy;
|
334
|
+
}
|
335
|
+
for (var i = 0; i < tokens.length; i++) {
|
336
|
+
var p = tokens[i];
|
337
|
+
if (typeof p != "object")
|
338
|
+
continue;
|
339
|
+
var id = p.tabstopId;
|
340
|
+
var i1 = tokens.indexOf(p, i + 1);
|
341
|
+
if (expanding[id]) {
|
342
|
+
// if reached closing bracket clear expanding state
|
343
|
+
if (expanding[id] === p)
|
344
|
+
expanding[id] = null;
|
345
|
+
// otherwise just ignore recursive tabstop
|
346
|
+
continue;
|
347
|
+
}
|
348
|
+
|
349
|
+
var ts = tabstops[id];
|
350
|
+
var arg = typeof ts.value == "string" ? [ts.value] : copyValue(ts.value);
|
351
|
+
arg.unshift(i + 1, Math.max(0, i1 - i));
|
352
|
+
arg.push(p);
|
353
|
+
expanding[id] = p;
|
354
|
+
tokens.splice.apply(tokens, arg);
|
355
|
+
|
356
|
+
if (ts.indexOf(p) === -1)
|
357
|
+
ts.push(p);
|
358
|
+
}
|
359
|
+
|
360
|
+
// convert to plain text
|
361
|
+
var row = 0, column = 0;
|
362
|
+
var text = "";
|
363
|
+
tokens.forEach(function(t) {
|
364
|
+
if (typeof t === "string") {
|
365
|
+
if (t[0] === "\n"){
|
366
|
+
column = t.length - 1;
|
367
|
+
row ++;
|
368
|
+
} else
|
369
|
+
column += t.length;
|
370
|
+
text += t;
|
371
|
+
} else {
|
372
|
+
if (!t.start)
|
373
|
+
t.start = {row: row, column: column};
|
374
|
+
else
|
375
|
+
t.end = {row: row, column: column};
|
376
|
+
}
|
377
|
+
});
|
378
|
+
var range = editor.getSelectionRange();
|
379
|
+
var end = editor.session.replace(range, text);
|
380
|
+
|
381
|
+
var tabstopManager = new TabstopManager(editor);
|
382
|
+
var selectionId = editor.inVirtualSelectionMode && editor.selection.index;
|
383
|
+
tabstopManager.addTabstops(tabstops, range.start, end, selectionId);
|
384
|
+
};
|
385
|
+
|
386
|
+
this.insertSnippet = function(editor, snippetText) {
|
387
|
+
var self = this;
|
388
|
+
if (editor.inVirtualSelectionMode)
|
389
|
+
return self.insertSnippetForSelection(editor, snippetText);
|
390
|
+
|
391
|
+
editor.forEachSelection(function() {
|
392
|
+
self.insertSnippetForSelection(editor, snippetText);
|
393
|
+
}, null, {keepOrder: true});
|
394
|
+
|
395
|
+
if (editor.tabstopManager)
|
396
|
+
editor.tabstopManager.tabNext();
|
397
|
+
};
|
398
|
+
|
399
|
+
this.$getScope = function(editor) {
|
400
|
+
var scope = editor.session.$mode.$id || "";
|
401
|
+
scope = scope.split("/").pop();
|
402
|
+
if (scope === "html" || scope === "php") {
|
403
|
+
// PHP is actually HTML
|
404
|
+
if (scope === "php" && !editor.session.$mode.inlinePhp)
|
405
|
+
scope = "html";
|
406
|
+
var c = editor.getCursorPosition();
|
407
|
+
var state = editor.session.getState(c.row);
|
408
|
+
if (typeof state === "object") {
|
409
|
+
state = state[0];
|
410
|
+
}
|
411
|
+
if (state.substring) {
|
412
|
+
if (state.substring(0, 3) == "js-")
|
413
|
+
scope = "javascript";
|
414
|
+
else if (state.substring(0, 4) == "css-")
|
415
|
+
scope = "css";
|
416
|
+
else if (state.substring(0, 4) == "php-")
|
417
|
+
scope = "php";
|
418
|
+
}
|
419
|
+
}
|
420
|
+
|
421
|
+
return scope;
|
422
|
+
};
|
423
|
+
|
424
|
+
this.getActiveScopes = function(editor) {
|
425
|
+
var scope = this.$getScope(editor);
|
426
|
+
var scopes = [scope];
|
427
|
+
var snippetMap = this.snippetMap;
|
428
|
+
if (snippetMap[scope] && snippetMap[scope].includeScopes) {
|
429
|
+
scopes.push.apply(scopes, snippetMap[scope].includeScopes);
|
430
|
+
}
|
431
|
+
scopes.push("_");
|
432
|
+
return scopes;
|
433
|
+
};
|
434
|
+
|
435
|
+
this.expandWithTab = function(editor, options) {
|
436
|
+
var self = this;
|
437
|
+
var result = editor.forEachSelection(function() {
|
438
|
+
return self.expandSnippetForSelection(editor, options);
|
439
|
+
}, null, {keepOrder: true});
|
440
|
+
if (result && editor.tabstopManager)
|
441
|
+
editor.tabstopManager.tabNext();
|
442
|
+
return result;
|
443
|
+
};
|
444
|
+
|
445
|
+
this.expandSnippetForSelection = function(editor, options) {
|
446
|
+
var cursor = editor.getCursorPosition();
|
447
|
+
var line = editor.session.getLine(cursor.row);
|
448
|
+
var before = line.substring(0, cursor.column);
|
449
|
+
var after = line.substr(cursor.column);
|
450
|
+
|
451
|
+
var snippetMap = this.snippetMap;
|
452
|
+
var snippet;
|
453
|
+
this.getActiveScopes(editor).some(function(scope) {
|
454
|
+
var snippets = snippetMap[scope];
|
455
|
+
if (snippets)
|
456
|
+
snippet = this.findMatchingSnippet(snippets, before, after);
|
457
|
+
return !!snippet;
|
458
|
+
}, this);
|
459
|
+
if (!snippet)
|
460
|
+
return false;
|
461
|
+
if (options && options.dryRun)
|
462
|
+
return true;
|
463
|
+
editor.session.doc.removeInLine(cursor.row,
|
464
|
+
cursor.column - snippet.replaceBefore.length,
|
465
|
+
cursor.column + snippet.replaceAfter.length
|
466
|
+
);
|
467
|
+
|
468
|
+
this.variables.M__ = snippet.matchBefore;
|
469
|
+
this.variables.T__ = snippet.matchAfter;
|
470
|
+
this.insertSnippetForSelection(editor, snippet.content);
|
471
|
+
|
472
|
+
this.variables.M__ = this.variables.T__ = null;
|
473
|
+
return true;
|
474
|
+
};
|
475
|
+
|
476
|
+
this.findMatchingSnippet = function(snippetList, before, after) {
|
477
|
+
for (var i = snippetList.length; i--;) {
|
478
|
+
var s = snippetList[i];
|
479
|
+
if (s.startRe && !s.startRe.test(before))
|
480
|
+
continue;
|
481
|
+
if (s.endRe && !s.endRe.test(after))
|
482
|
+
continue;
|
483
|
+
if (!s.startRe && !s.endRe)
|
484
|
+
continue;
|
485
|
+
|
486
|
+
s.matchBefore = s.startRe ? s.startRe.exec(before) : [""];
|
487
|
+
s.matchAfter = s.endRe ? s.endRe.exec(after) : [""];
|
488
|
+
s.replaceBefore = s.triggerRe ? s.triggerRe.exec(before)[0] : "";
|
489
|
+
s.replaceAfter = s.endTriggerRe ? s.endTriggerRe.exec(after)[0] : "";
|
490
|
+
return s;
|
491
|
+
}
|
492
|
+
};
|
493
|
+
|
494
|
+
this.snippetMap = {};
|
495
|
+
this.snippetNameMap = {};
|
496
|
+
this.register = function(snippets, scope) {
|
497
|
+
var snippetMap = this.snippetMap;
|
498
|
+
var snippetNameMap = this.snippetNameMap;
|
499
|
+
var self = this;
|
500
|
+
|
501
|
+
if (!snippets)
|
502
|
+
snippets = [];
|
503
|
+
|
504
|
+
function wrapRegexp(src) {
|
505
|
+
if (src && !/^\^?\(.*\)\$?$|^\\b$/.test(src))
|
506
|
+
src = "(?:" + src + ")";
|
507
|
+
|
508
|
+
return src || "";
|
509
|
+
}
|
510
|
+
function guardedRegexp(re, guard, opening) {
|
511
|
+
re = wrapRegexp(re);
|
512
|
+
guard = wrapRegexp(guard);
|
513
|
+
if (opening) {
|
514
|
+
re = guard + re;
|
515
|
+
if (re && re[re.length - 1] != "$")
|
516
|
+
re = re + "$";
|
517
|
+
} else {
|
518
|
+
re = re + guard;
|
519
|
+
if (re && re[0] != "^")
|
520
|
+
re = "^" + re;
|
521
|
+
}
|
522
|
+
return new RegExp(re);
|
523
|
+
}
|
524
|
+
|
525
|
+
function addSnippet(s) {
|
526
|
+
if (!s.scope)
|
527
|
+
s.scope = scope || "_";
|
528
|
+
scope = s.scope;
|
529
|
+
if (!snippetMap[scope]) {
|
530
|
+
snippetMap[scope] = [];
|
531
|
+
snippetNameMap[scope] = {};
|
532
|
+
}
|
533
|
+
|
534
|
+
var map = snippetNameMap[scope];
|
535
|
+
if (s.name) {
|
536
|
+
var old = map[s.name];
|
537
|
+
if (old)
|
538
|
+
self.unregister(old);
|
539
|
+
map[s.name] = s;
|
540
|
+
}
|
541
|
+
snippetMap[scope].push(s);
|
542
|
+
|
543
|
+
if (s.tabTrigger && !s.trigger) {
|
544
|
+
if (!s.guard && /^\w/.test(s.tabTrigger))
|
545
|
+
s.guard = "\\b";
|
546
|
+
s.trigger = lang.escapeRegExp(s.tabTrigger);
|
547
|
+
}
|
548
|
+
|
549
|
+
s.startRe = guardedRegexp(s.trigger, s.guard, true);
|
550
|
+
s.triggerRe = new RegExp(s.trigger, "", true);
|
551
|
+
|
552
|
+
s.endRe = guardedRegexp(s.endTrigger, s.endGuard, true);
|
553
|
+
s.endTriggerRe = new RegExp(s.endTrigger, "", true);
|
554
|
+
}
|
555
|
+
|
556
|
+
if (snippets && snippets.content)
|
557
|
+
addSnippet(snippets);
|
558
|
+
else if (Array.isArray(snippets))
|
559
|
+
snippets.forEach(addSnippet);
|
560
|
+
|
561
|
+
this._signal("registerSnippets", {scope: scope});
|
562
|
+
};
|
563
|
+
this.unregister = function(snippets, scope) {
|
564
|
+
var snippetMap = this.snippetMap;
|
565
|
+
var snippetNameMap = this.snippetNameMap;
|
566
|
+
|
567
|
+
function removeSnippet(s) {
|
568
|
+
var nameMap = snippetNameMap[s.scope||scope];
|
569
|
+
if (nameMap && nameMap[s.name]) {
|
570
|
+
delete nameMap[s.name];
|
571
|
+
var map = snippetMap[s.scope||scope];
|
572
|
+
var i = map && map.indexOf(s);
|
573
|
+
if (i >= 0)
|
574
|
+
map.splice(i, 1);
|
575
|
+
}
|
576
|
+
}
|
577
|
+
if (snippets.content)
|
578
|
+
removeSnippet(snippets);
|
579
|
+
else if (Array.isArray(snippets))
|
580
|
+
snippets.forEach(removeSnippet);
|
581
|
+
};
|
582
|
+
this.parseSnippetFile = function(str) {
|
583
|
+
str = str.replace(/\r/g, "");
|
584
|
+
var list = [], snippet = {};
|
585
|
+
var re = /^#.*|^({[\s\S]*})\s*$|^(\S+) (.*)$|^((?:\n*\t.*)+)/gm;
|
586
|
+
var m;
|
587
|
+
while (m = re.exec(str)) {
|
588
|
+
if (m[1]) {
|
589
|
+
try {
|
590
|
+
snippet = JSON.parse(m[1]);
|
591
|
+
list.push(snippet);
|
592
|
+
} catch (e) {}
|
593
|
+
} if (m[4]) {
|
594
|
+
snippet.content = m[4].replace(/^\t/gm, "");
|
595
|
+
list.push(snippet);
|
596
|
+
snippet = {};
|
597
|
+
} else {
|
598
|
+
var key = m[2], val = m[3];
|
599
|
+
if (key == "regex") {
|
600
|
+
var guardRe = /\/((?:[^\/\\]|\\.)*)|$/g;
|
601
|
+
snippet.guard = guardRe.exec(val)[1];
|
602
|
+
snippet.trigger = guardRe.exec(val)[1];
|
603
|
+
snippet.endTrigger = guardRe.exec(val)[1];
|
604
|
+
snippet.endGuard = guardRe.exec(val)[1];
|
605
|
+
} else if (key == "snippet") {
|
606
|
+
snippet.tabTrigger = val.match(/^\S*/)[0];
|
607
|
+
if (!snippet.name)
|
608
|
+
snippet.name = val;
|
609
|
+
} else {
|
610
|
+
snippet[key] = val;
|
611
|
+
}
|
612
|
+
}
|
613
|
+
}
|
614
|
+
return list;
|
615
|
+
};
|
616
|
+
this.getSnippetByName = function(name, editor) {
|
617
|
+
var snippetMap = this.snippetNameMap;
|
618
|
+
var snippet;
|
619
|
+
this.getActiveScopes(editor).some(function(scope) {
|
620
|
+
var snippets = snippetMap[scope];
|
621
|
+
if (snippets)
|
622
|
+
snippet = snippets[name];
|
623
|
+
return !!snippet;
|
624
|
+
}, this);
|
625
|
+
return snippet;
|
626
|
+
};
|
627
|
+
|
628
|
+
}).call(SnippetManager.prototype);
|
629
|
+
|
630
|
+
|
631
|
+
var TabstopManager = function(editor) {
|
632
|
+
if (editor.tabstopManager)
|
633
|
+
return editor.tabstopManager;
|
634
|
+
editor.tabstopManager = this;
|
635
|
+
this.$onChange = this.onChange.bind(this);
|
636
|
+
this.$onChangeSelection = lang.delayedCall(this.onChangeSelection.bind(this)).schedule;
|
637
|
+
this.$onChangeSession = this.onChangeSession.bind(this);
|
638
|
+
this.$onAfterExec = this.onAfterExec.bind(this);
|
639
|
+
this.attach(editor);
|
640
|
+
};
|
641
|
+
(function() {
|
642
|
+
this.attach = function(editor) {
|
643
|
+
this.index = 0;
|
644
|
+
this.ranges = [];
|
645
|
+
this.tabstops = [];
|
646
|
+
this.$openTabstops = null;
|
647
|
+
this.selectedTabstop = null;
|
648
|
+
|
649
|
+
this.editor = editor;
|
650
|
+
this.editor.on("change", this.$onChange);
|
651
|
+
this.editor.on("changeSelection", this.$onChangeSelection);
|
652
|
+
this.editor.on("changeSession", this.$onChangeSession);
|
653
|
+
this.editor.commands.on("afterExec", this.$onAfterExec);
|
654
|
+
this.editor.keyBinding.addKeyboardHandler(this.keyboardHandler);
|
655
|
+
};
|
656
|
+
this.detach = function() {
|
657
|
+
this.tabstops.forEach(this.removeTabstopMarkers, this);
|
658
|
+
this.ranges = null;
|
659
|
+
this.tabstops = null;
|
660
|
+
this.selectedTabstop = null;
|
661
|
+
this.editor.removeListener("change", this.$onChange);
|
662
|
+
this.editor.removeListener("changeSelection", this.$onChangeSelection);
|
663
|
+
this.editor.removeListener("changeSession", this.$onChangeSession);
|
664
|
+
this.editor.commands.removeListener("afterExec", this.$onAfterExec);
|
665
|
+
this.editor.keyBinding.removeKeyboardHandler(this.keyboardHandler);
|
666
|
+
this.editor.tabstopManager = null;
|
667
|
+
this.editor = null;
|
668
|
+
};
|
669
|
+
|
670
|
+
this.onChange = function(e) {
|
671
|
+
var changeRange = e.data.range;
|
672
|
+
var isRemove = e.data.action[0] == "r";
|
673
|
+
var start = changeRange.start;
|
674
|
+
var end = changeRange.end;
|
675
|
+
var startRow = start.row;
|
676
|
+
var endRow = end.row;
|
677
|
+
var lineDif = endRow - startRow;
|
678
|
+
var colDiff = end.column - start.column;
|
679
|
+
|
680
|
+
if (isRemove) {
|
681
|
+
lineDif = -lineDif;
|
682
|
+
colDiff = -colDiff;
|
683
|
+
}
|
684
|
+
if (!this.$inChange && isRemove) {
|
685
|
+
var ts = this.selectedTabstop;
|
686
|
+
var changedOutside = ts && !ts.some(function(r) {
|
687
|
+
return comparePoints(r.start, start) <= 0 && comparePoints(r.end, end) >= 0;
|
688
|
+
});
|
689
|
+
if (changedOutside)
|
690
|
+
return this.detach();
|
691
|
+
}
|
692
|
+
var ranges = this.ranges;
|
693
|
+
for (var i = 0; i < ranges.length; i++) {
|
694
|
+
var r = ranges[i];
|
695
|
+
if (r.end.row < start.row)
|
696
|
+
continue;
|
697
|
+
|
698
|
+
if (isRemove && comparePoints(start, r.start) < 0 && comparePoints(end, r.end) > 0) {
|
699
|
+
this.removeRange(r);
|
700
|
+
i--;
|
701
|
+
continue;
|
702
|
+
}
|
703
|
+
|
704
|
+
if (r.start.row == startRow && r.start.column > start.column)
|
705
|
+
r.start.column += colDiff;
|
706
|
+
if (r.end.row == startRow && r.end.column >= start.column)
|
707
|
+
r.end.column += colDiff;
|
708
|
+
if (r.start.row >= startRow)
|
709
|
+
r.start.row += lineDif;
|
710
|
+
if (r.end.row >= startRow)
|
711
|
+
r.end.row += lineDif;
|
712
|
+
|
713
|
+
if (comparePoints(r.start, r.end) > 0)
|
714
|
+
this.removeRange(r);
|
715
|
+
}
|
716
|
+
if (!ranges.length)
|
717
|
+
this.detach();
|
718
|
+
};
|
719
|
+
this.updateLinkedFields = function() {
|
720
|
+
var ts = this.selectedTabstop;
|
721
|
+
if (!ts || !ts.hasLinkedRanges)
|
722
|
+
return;
|
723
|
+
this.$inChange = true;
|
724
|
+
var session = this.editor.session;
|
725
|
+
var text = session.getTextRange(ts.firstNonLinked);
|
726
|
+
for (var i = ts.length; i--;) {
|
727
|
+
var range = ts[i];
|
728
|
+
if (!range.linked)
|
729
|
+
continue;
|
730
|
+
var fmt = exports.snippetManager.tmStrFormat(text, range.original);
|
731
|
+
session.replace(range, fmt);
|
732
|
+
}
|
733
|
+
this.$inChange = false;
|
734
|
+
};
|
735
|
+
this.onAfterExec = function(e) {
|
736
|
+
if (e.command && !e.command.readOnly)
|
737
|
+
this.updateLinkedFields();
|
738
|
+
};
|
739
|
+
this.onChangeSelection = function() {
|
740
|
+
if (!this.editor)
|
741
|
+
return;
|
742
|
+
var lead = this.editor.selection.lead;
|
743
|
+
var anchor = this.editor.selection.anchor;
|
744
|
+
var isEmpty = this.editor.selection.isEmpty();
|
745
|
+
for (var i = this.ranges.length; i--;) {
|
746
|
+
if (this.ranges[i].linked)
|
747
|
+
continue;
|
748
|
+
var containsLead = this.ranges[i].contains(lead.row, lead.column);
|
749
|
+
var containsAnchor = isEmpty || this.ranges[i].contains(anchor.row, anchor.column);
|
750
|
+
if (containsLead && containsAnchor)
|
751
|
+
return;
|
752
|
+
}
|
753
|
+
this.detach();
|
754
|
+
};
|
755
|
+
this.onChangeSession = function() {
|
756
|
+
this.detach();
|
757
|
+
};
|
758
|
+
this.tabNext = function(dir) {
|
759
|
+
var max = this.tabstops.length;
|
760
|
+
var index = this.index + (dir || 1);
|
761
|
+
index = Math.min(Math.max(index, 1), max);
|
762
|
+
if (index == max)
|
763
|
+
index = 0;
|
764
|
+
this.selectTabstop(index);
|
765
|
+
if (index === 0)
|
766
|
+
this.detach();
|
767
|
+
};
|
768
|
+
this.selectTabstop = function(index) {
|
769
|
+
this.$openTabstops = null;
|
770
|
+
var ts = this.tabstops[this.index];
|
771
|
+
if (ts)
|
772
|
+
this.addTabstopMarkers(ts);
|
773
|
+
this.index = index;
|
774
|
+
ts = this.tabstops[this.index];
|
775
|
+
if (!ts || !ts.length)
|
776
|
+
return;
|
777
|
+
|
778
|
+
this.selectedTabstop = ts;
|
779
|
+
if (!this.editor.inVirtualSelectionMode) {
|
780
|
+
var sel = this.editor.multiSelect;
|
781
|
+
sel.toSingleRange(ts.firstNonLinked.clone());
|
782
|
+
for (var i = ts.length; i--;) {
|
783
|
+
if (ts.hasLinkedRanges && ts[i].linked)
|
784
|
+
continue;
|
785
|
+
sel.addRange(ts[i].clone(), true);
|
786
|
+
}
|
787
|
+
// todo investigate why is this needed
|
788
|
+
if (sel.ranges[0])
|
789
|
+
sel.addRange(sel.ranges[0].clone());
|
790
|
+
} else {
|
791
|
+
this.editor.selection.setRange(ts.firstNonLinked);
|
792
|
+
}
|
793
|
+
|
794
|
+
this.editor.keyBinding.addKeyboardHandler(this.keyboardHandler);
|
795
|
+
};
|
796
|
+
this.addTabstops = function(tabstops, start, end) {
|
797
|
+
if (!this.$openTabstops)
|
798
|
+
this.$openTabstops = [];
|
799
|
+
// add final tabstop if missing
|
800
|
+
if (!tabstops[0]) {
|
801
|
+
var p = Range.fromPoints(end, end);
|
802
|
+
moveRelative(p.start, start);
|
803
|
+
moveRelative(p.end, start);
|
804
|
+
tabstops[0] = [p];
|
805
|
+
tabstops[0].index = 0;
|
806
|
+
}
|
807
|
+
|
808
|
+
var i = this.index;
|
809
|
+
var arg = [i + 1, 0];
|
810
|
+
var ranges = this.ranges;
|
811
|
+
tabstops.forEach(function(ts, index) {
|
812
|
+
var dest = this.$openTabstops[index] || ts;
|
813
|
+
|
814
|
+
for (var i = ts.length; i--;) {
|
815
|
+
var p = ts[i];
|
816
|
+
var range = Range.fromPoints(p.start, p.end || p.start);
|
817
|
+
movePoint(range.start, start);
|
818
|
+
movePoint(range.end, start);
|
819
|
+
range.original = p;
|
820
|
+
range.tabstop = dest;
|
821
|
+
ranges.push(range);
|
822
|
+
if (dest != ts)
|
823
|
+
dest.unshift(range);
|
824
|
+
else
|
825
|
+
dest[i] = range;
|
826
|
+
if (p.fmtString) {
|
827
|
+
range.linked = true;
|
828
|
+
dest.hasLinkedRanges = true;
|
829
|
+
} else if (!dest.firstNonLinked)
|
830
|
+
dest.firstNonLinked = range;
|
831
|
+
}
|
832
|
+
if (!dest.firstNonLinked)
|
833
|
+
dest.hasLinkedRanges = false;
|
834
|
+
if (dest === ts) {
|
835
|
+
arg.push(dest);
|
836
|
+
this.$openTabstops[index] = dest;
|
837
|
+
}
|
838
|
+
this.addTabstopMarkers(dest);
|
839
|
+
}, this);
|
840
|
+
|
841
|
+
if (arg.length > 2) {
|
842
|
+
// when adding new snippet inside existing one, make sure 0 tabstop is at the end
|
843
|
+
if (this.tabstops.length)
|
844
|
+
arg.push(arg.splice(2, 1)[0]);
|
845
|
+
this.tabstops.splice.apply(this.tabstops, arg);
|
846
|
+
}
|
847
|
+
};
|
848
|
+
|
849
|
+
this.addTabstopMarkers = function(ts) {
|
850
|
+
var session = this.editor.session;
|
851
|
+
ts.forEach(function(range) {
|
852
|
+
if (!range.markerId)
|
853
|
+
range.markerId = session.addMarker(range, "ace_snippet-marker", "text");
|
854
|
+
});
|
855
|
+
};
|
856
|
+
this.removeTabstopMarkers = function(ts) {
|
857
|
+
var session = this.editor.session;
|
858
|
+
ts.forEach(function(range) {
|
859
|
+
session.removeMarker(range.markerId);
|
860
|
+
range.markerId = null;
|
861
|
+
});
|
862
|
+
};
|
863
|
+
this.removeRange = function(range) {
|
864
|
+
var i = range.tabstop.indexOf(range);
|
865
|
+
range.tabstop.splice(i, 1);
|
866
|
+
i = this.ranges.indexOf(range);
|
867
|
+
this.ranges.splice(i, 1);
|
868
|
+
this.editor.session.removeMarker(range.markerId);
|
869
|
+
if (!range.tabstop.length) {
|
870
|
+
i = this.tabstops.indexOf(range.tabstop);
|
871
|
+
if (i != -1)
|
872
|
+
this.tabstops.splice(i, 1);
|
873
|
+
if (!this.tabstops.length)
|
874
|
+
this.detach();
|
875
|
+
}
|
876
|
+
};
|
877
|
+
|
878
|
+
this.keyboardHandler = new HashHandler();
|
879
|
+
this.keyboardHandler.bindKeys({
|
880
|
+
"Tab": function(ed) {
|
881
|
+
if (exports.snippetManager && exports.snippetManager.expandWithTab(ed)) {
|
882
|
+
return;
|
883
|
+
}
|
884
|
+
|
885
|
+
ed.tabstopManager.tabNext(1);
|
886
|
+
},
|
887
|
+
"Shift-Tab": function(ed) {
|
888
|
+
ed.tabstopManager.tabNext(-1);
|
889
|
+
},
|
890
|
+
"Esc": function(ed) {
|
891
|
+
ed.tabstopManager.detach();
|
892
|
+
},
|
893
|
+
"Return": function(ed) {
|
894
|
+
//ed.tabstopManager.tabNext(1);
|
895
|
+
return false;
|
896
|
+
}
|
897
|
+
});
|
898
|
+
}).call(TabstopManager.prototype);
|
899
|
+
|
900
|
+
|
901
|
+
|
902
|
+
var changeTracker = {};
|
903
|
+
changeTracker.onChange = Anchor.prototype.onChange;
|
904
|
+
changeTracker.setPosition = function(row, column) {
|
905
|
+
this.pos.row = row;
|
906
|
+
this.pos.column = column;
|
907
|
+
};
|
908
|
+
changeTracker.update = function(pos, delta, $insertRight) {
|
909
|
+
this.$insertRight = $insertRight;
|
910
|
+
this.pos = pos;
|
911
|
+
this.onChange(delta);
|
912
|
+
};
|
913
|
+
|
914
|
+
var movePoint = function(point, diff) {
|
915
|
+
if (point.row == 0)
|
916
|
+
point.column += diff.column;
|
917
|
+
point.row += diff.row;
|
918
|
+
};
|
919
|
+
|
920
|
+
var moveRelative = function(point, start) {
|
921
|
+
if (point.row == start.row)
|
922
|
+
point.column -= start.column;
|
923
|
+
point.row -= start.row;
|
924
|
+
};
|
925
|
+
|
926
|
+
|
927
|
+
require("./lib/dom").importCssString("\
|
928
|
+
.ace_snippet-marker {\
|
929
|
+
-moz-box-sizing: border-box;\
|
930
|
+
box-sizing: border-box;\
|
931
|
+
background: rgba(194, 193, 208, 0.09);\
|
932
|
+
border: 1px dotted rgba(211, 208, 235, 0.62);\
|
933
|
+
position: absolute;\
|
934
|
+
}");
|
935
|
+
|
936
|
+
exports.snippetManager = new SnippetManager();
|
937
|
+
|
938
|
+
|
939
|
+
var Editor = require("./editor").Editor;
|
940
|
+
(function() {
|
941
|
+
this.insertSnippet = function(content, options) {
|
942
|
+
return exports.snippetManager.insertSnippet(this, content, options);
|
943
|
+
};
|
944
|
+
this.expandSnippet = function(options) {
|
945
|
+
return exports.snippetManager.expandWithTab(this, options);
|
946
|
+
};
|
947
|
+
}).call(Editor.prototype);
|
948
|
+
|
949
|
+
});
|