gollum 2.4.4 → 2.4.5
Sign up to get free protection for your applications and to get access to all the features.
Potentially problematic release.
This version of gollum might be problematic. Click here for more details.
- data/gollum.gemspec +100 -19
- data/lib/gollum.rb +2 -3
- data/lib/gollum/frontend/public/gollum/css/gollum.css +3 -1
- data/lib/gollum/frontend/public/gollum/css/template.css +8 -12
- data/lib/gollum/frontend/public/gollum/livepreview/js/ace/lib/ace/ace.js +64 -60
- data/lib/gollum/frontend/public/gollum/livepreview/js/ace/lib/ace/anchor.js +56 -62
- data/lib/gollum/frontend/public/gollum/livepreview/js/ace/lib/ace/anchor_test.js +25 -32
- data/lib/gollum/frontend/public/gollum/livepreview/js/ace/lib/ace/background_tokenizer.js +56 -63
- data/lib/gollum/frontend/public/gollum/livepreview/js/ace/lib/ace/background_tokenizer_test.js +25 -32
- data/lib/gollum/frontend/public/gollum/livepreview/js/ace/lib/ace/commands/command_manager.js +11 -11
- data/lib/gollum/frontend/public/gollum/livepreview/js/ace/lib/ace/commands/command_manager_test.js +59 -53
- data/lib/gollum/frontend/public/gollum/livepreview/js/ace/lib/ace/commands/default_commands.js +46 -39
- data/lib/gollum/frontend/public/gollum/livepreview/js/ace/lib/ace/commands/multi_select_commands.js +32 -36
- data/lib/gollum/frontend/public/gollum/livepreview/js/ace/lib/ace/config.js +62 -47
- data/lib/gollum/frontend/public/gollum/livepreview/js/ace/lib/ace/config_test.js +71 -0
- data/lib/gollum/frontend/public/gollum/livepreview/js/ace/lib/ace/css/editor.css +82 -41
- data/lib/gollum/frontend/public/gollum/livepreview/js/ace/lib/ace/document.js +126 -145
- data/lib/gollum/frontend/public/gollum/livepreview/js/ace/lib/ace/document_test.js +25 -33
- data/lib/gollum/frontend/public/gollum/livepreview/js/ace/lib/ace/edit_session.js +484 -467
- data/lib/gollum/frontend/public/gollum/livepreview/js/ace/lib/ace/edit_session/bracket_match.js +30 -63
- data/lib/gollum/frontend/public/gollum/livepreview/js/ace/lib/ace/edit_session/fold.js +29 -37
- data/lib/gollum/frontend/public/gollum/livepreview/js/ace/lib/ace/edit_session/fold_line.js +27 -35
- data/lib/gollum/frontend/public/gollum/livepreview/js/ace/lib/ace/edit_session/folding.js +47 -55
- data/lib/gollum/frontend/public/gollum/livepreview/js/ace/lib/ace/edit_session_test.js +61 -41
- data/lib/gollum/frontend/public/gollum/livepreview/js/ace/lib/ace/editor.js +506 -517
- data/lib/gollum/frontend/public/gollum/livepreview/js/ace/lib/ace/editor_change_document_test.js +25 -32
- data/lib/gollum/frontend/public/gollum/livepreview/js/ace/lib/ace/editor_highlight_selected_word_test.js +26 -34
- data/lib/gollum/frontend/public/gollum/livepreview/js/ace/lib/ace/editor_navigation_test.js +25 -32
- data/lib/gollum/frontend/public/gollum/livepreview/js/ace/lib/ace/editor_text_edit_test.js +25 -32
- data/lib/gollum/frontend/public/gollum/livepreview/js/ace/lib/ace/ext/static_highlight.js +28 -38
- data/lib/gollum/frontend/public/gollum/livepreview/js/ace/lib/ace/ext/static_highlight_test.js +9 -14
- data/lib/gollum/frontend/public/gollum/livepreview/js/ace/lib/ace/ext/textarea.js +26 -36
- data/lib/gollum/frontend/public/gollum/livepreview/js/ace/lib/ace/keyboard/emacs.js +44 -36
- data/lib/gollum/frontend/public/gollum/livepreview/js/ace/lib/ace/keyboard/hash_handler.js +45 -52
- data/lib/gollum/frontend/public/gollum/livepreview/js/ace/lib/ace/keyboard/keybinding.js +25 -34
- data/lib/gollum/frontend/public/gollum/livepreview/js/ace/lib/ace/keyboard/state_handler.js +26 -33
- data/lib/gollum/frontend/public/gollum/livepreview/js/ace/lib/ace/keyboard/textinput.js +230 -165
- data/lib/gollum/frontend/public/gollum/livepreview/js/ace/lib/ace/keyboard/vim.js +76 -49
- data/lib/gollum/frontend/public/gollum/livepreview/js/ace/lib/ace/keyboard/vim/commands.js +66 -61
- data/lib/gollum/frontend/public/gollum/livepreview/js/ace/lib/ace/keyboard/vim/maps/aliases.js +36 -43
- data/lib/gollum/frontend/public/gollum/livepreview/js/ace/lib/ace/keyboard/vim/maps/motions.js +138 -156
- data/lib/gollum/frontend/public/gollum/livepreview/js/ace/lib/ace/keyboard/vim/maps/operators.js +35 -32
- data/lib/gollum/frontend/public/gollum/livepreview/js/ace/lib/ace/keyboard/vim/maps/util.js +18 -18
- data/lib/gollum/frontend/public/gollum/livepreview/js/ace/lib/ace/keyboard/vim/registers.js +25 -32
- data/lib/gollum/frontend/public/gollum/livepreview/js/ace/lib/ace/layer/cursor.js +116 -101
- data/lib/gollum/frontend/public/gollum/livepreview/js/ace/lib/ace/layer/gutter.js +117 -83
- data/lib/gollum/frontend/public/gollum/livepreview/js/ace/lib/ace/layer/marker.js +60 -71
- data/lib/gollum/frontend/public/gollum/livepreview/js/ace/lib/ace/layer/text.js +163 -102
- data/lib/gollum/frontend/public/gollum/livepreview/js/ace/lib/ace/layer/text_test.js +60 -41
- data/lib/gollum/frontend/public/gollum/livepreview/js/ace/lib/ace/lib/browser_focus.js +26 -36
- data/lib/gollum/frontend/public/gollum/livepreview/js/ace/lib/ace/lib/dom.js +26 -36
- data/lib/gollum/frontend/public/gollum/livepreview/js/ace/lib/ace/lib/es5-shim.js +24 -1
- data/lib/gollum/frontend/public/gollum/livepreview/js/ace/lib/ace/lib/event.js +52 -54
- data/lib/gollum/frontend/public/gollum/livepreview/js/ace/lib/ace/lib/event_emitter.js +32 -39
- data/lib/gollum/frontend/public/gollum/livepreview/js/ace/lib/ace/lib/event_emitter_test.js +25 -32
- data/lib/gollum/frontend/public/gollum/livepreview/js/ace/lib/ace/lib/keys.js +9 -1
- data/lib/gollum/frontend/public/gollum/livepreview/js/ace/lib/ace/lib/lang.js +73 -33
- data/lib/gollum/frontend/public/gollum/livepreview/js/ace/lib/ace/lib/net.js +10 -3
- data/lib/gollum/frontend/public/gollum/livepreview/js/ace/lib/ace/lib/oop.js +25 -32
- data/lib/gollum/frontend/public/gollum/livepreview/js/ace/lib/ace/lib/regexp.js +2 -2
- data/lib/gollum/frontend/public/gollum/livepreview/js/ace/lib/ace/lib/useragent.js +55 -58
- data/lib/gollum/frontend/public/gollum/livepreview/js/ace/lib/ace/mode/_test/package.json +8 -0
- data/lib/gollum/frontend/public/gollum/livepreview/js/ace/lib/ace/mode/_test/test_highlight_rules.js +144 -0
- data/lib/gollum/frontend/public/gollum/livepreview/js/ace/lib/ace/mode/_test/text_javascript.txt +52 -0
- data/lib/gollum/frontend/public/gollum/livepreview/js/ace/lib/ace/mode/_test/tokens_c9search.json +175 -0
- data/lib/gollum/frontend/public/gollum/livepreview/js/ace/lib/ace/mode/_test/tokens_c_cpp.json +124 -0
- data/lib/gollum/frontend/public/gollum/livepreview/js/ace/lib/ace/mode/_test/tokens_clojure.json +248 -0
- data/lib/gollum/frontend/public/gollum/livepreview/js/ace/lib/ace/mode/_test/tokens_coffee.json +188 -0
- data/lib/gollum/frontend/public/gollum/livepreview/js/ace/lib/ace/mode/_test/tokens_coldfusion.json +41 -0
- data/lib/gollum/frontend/public/gollum/livepreview/js/ace/lib/ace/mode/_test/tokens_csharp.json +42 -0
- data/lib/gollum/frontend/public/gollum/livepreview/js/ace/lib/ace/mode/_test/tokens_css.json +231 -0
- data/lib/gollum/frontend/public/gollum/livepreview/js/ace/lib/ace/mode/_test/tokens_diff.json +732 -0
- data/lib/gollum/frontend/public/gollum/livepreview/js/ace/lib/ace/mode/_test/tokens_glsl.json +185 -0
- data/lib/gollum/frontend/public/gollum/livepreview/js/ace/lib/ace/mode/_test/tokens_golang.json +362 -0
- data/lib/gollum/frontend/public/gollum/livepreview/js/ace/lib/ace/mode/_test/tokens_groovy.json +529 -0
- data/lib/gollum/frontend/public/gollum/livepreview/js/ace/lib/ace/mode/_test/tokens_haxe.json +195 -0
- data/lib/gollum/frontend/public/gollum/livepreview/js/ace/lib/ace/mode/_test/tokens_html.json +150 -0
- data/lib/gollum/frontend/public/gollum/livepreview/js/ace/lib/ace/mode/_test/tokens_java.json +139 -0
- data/lib/gollum/frontend/public/gollum/livepreview/js/ace/lib/ace/mode/_test/tokens_javascript.json +555 -0
- data/lib/gollum/frontend/public/gollum/livepreview/js/ace/lib/ace/mode/_test/tokens_json.json +611 -0
- data/lib/gollum/frontend/public/gollum/livepreview/js/ace/lib/ace/mode/_test/tokens_jsx.json +79 -0
- data/lib/gollum/frontend/public/gollum/livepreview/js/ace/lib/ace/mode/_test/tokens_latex.json +196 -0
- data/lib/gollum/frontend/public/gollum/livepreview/js/ace/lib/ace/mode/_test/tokens_less.json +292 -0
- data/lib/gollum/frontend/public/gollum/livepreview/js/ace/lib/ace/mode/_test/tokens_liquid.json +698 -0
- data/lib/gollum/frontend/public/gollum/livepreview/js/ace/lib/ace/mode/_test/tokens_lua.json +451 -0
- data/lib/gollum/frontend/public/gollum/livepreview/js/ace/lib/ace/mode/_test/tokens_luapage.json +824 -0
- data/lib/gollum/frontend/public/gollum/livepreview/js/ace/lib/ace/mode/_test/tokens_markdown.json +1202 -0
- data/lib/gollum/frontend/public/gollum/livepreview/js/ace/lib/ace/mode/_test/tokens_ocaml.json +260 -0
- data/lib/gollum/frontend/public/gollum/livepreview/js/ace/lib/ace/mode/_test/tokens_perl.json +311 -0
- data/lib/gollum/frontend/public/gollum/livepreview/js/ace/lib/ace/mode/_test/tokens_pgsql.json +1020 -0
- data/lib/gollum/frontend/public/gollum/livepreview/js/ace/lib/ace/mode/_test/tokens_php.json +238 -0
- data/lib/gollum/frontend/public/gollum/livepreview/js/ace/lib/ace/mode/_test/tokens_powershell.json +255 -0
- data/lib/gollum/frontend/public/gollum/livepreview/js/ace/lib/ace/mode/_test/tokens_python.json +205 -0
- data/lib/gollum/frontend/public/gollum/livepreview/js/ace/lib/ace/mode/_test/tokens_ruby.json +104 -0
- data/lib/gollum/frontend/public/gollum/livepreview/js/ace/lib/ace/mode/_test/tokens_scad.json +267 -0
- data/lib/gollum/frontend/public/gollum/livepreview/js/ace/lib/ace/mode/_test/tokens_scala.json +748 -0
- data/lib/gollum/frontend/public/gollum/livepreview/js/ace/lib/ace/mode/_test/tokens_scss.json +181 -0
- data/lib/gollum/frontend/public/gollum/livepreview/js/ace/lib/ace/mode/_test/tokens_sh.json +434 -0
- data/lib/gollum/frontend/public/gollum/livepreview/js/ace/lib/ace/mode/_test/tokens_sql.json +73 -0
- data/lib/gollum/frontend/public/gollum/livepreview/js/ace/lib/ace/mode/_test/tokens_svg.json +931 -0
- data/lib/gollum/frontend/public/gollum/livepreview/js/ace/lib/ace/mode/_test/tokens_tcl.json +536 -0
- data/lib/gollum/frontend/public/gollum/livepreview/js/ace/lib/ace/mode/_test/tokens_text.json +58 -0
- data/lib/gollum/frontend/public/gollum/livepreview/js/ace/lib/ace/mode/_test/tokens_textile.json +195 -0
- data/lib/gollum/frontend/public/gollum/livepreview/js/ace/lib/ace/mode/_test/tokens_xml.json +705 -0
- data/lib/gollum/frontend/public/gollum/livepreview/js/ace/lib/ace/mode/_test/tokens_xquery.json +64 -0
- data/lib/gollum/frontend/public/gollum/livepreview/js/ace/lib/ace/mode/_test/tokens_yaml.json +260 -0
- data/lib/gollum/frontend/public/gollum/livepreview/js/ace/lib/ace/mode/abap.js +77 -0
- data/lib/gollum/frontend/public/gollum/livepreview/js/ace/lib/ace/mode/abap_highlight_rules.js +133 -0
- data/lib/gollum/frontend/public/gollum/livepreview/js/ace/lib/ace/mode/asciidoc.js +64 -0
- data/lib/gollum/frontend/public/gollum/livepreview/js/ace/lib/ace/mode/asciidoc_highlight_rules.js +234 -0
- data/lib/gollum/frontend/public/gollum/livepreview/js/ace/lib/ace/mode/behaviour.js +26 -34
- data/lib/gollum/frontend/public/gollum/livepreview/js/ace/lib/ace/mode/behaviour/cstyle.js +195 -55
- data/lib/gollum/frontend/public/gollum/livepreview/js/ace/lib/ace/mode/behaviour/html.js +26 -34
- data/lib/gollum/frontend/public/gollum/livepreview/js/ace/lib/ace/mode/behaviour/xml.js +26 -34
- data/lib/gollum/frontend/public/gollum/livepreview/js/ace/lib/ace/mode/behaviour/xquery.js +31 -31
- data/lib/gollum/frontend/public/gollum/livepreview/js/ace/lib/ace/mode/c9search.js +25 -32
- data/lib/gollum/frontend/public/gollum/livepreview/js/ace/lib/ace/mode/c9search_highlight_rules.js +25 -32
- data/lib/gollum/frontend/public/gollum/livepreview/js/ace/lib/ace/mode/c_cpp.js +25 -33
- data/lib/gollum/frontend/public/gollum/livepreview/js/ace/lib/ace/mode/c_cpp_highlight_rules.js +67 -60
- data/lib/gollum/frontend/public/gollum/livepreview/js/ace/lib/ace/mode/clojure.js +25 -34
- data/lib/gollum/frontend/public/gollum/livepreview/js/ace/lib/ace/mode/clojure_highlight_rules.js +112 -130
- data/lib/gollum/frontend/public/gollum/livepreview/js/ace/lib/ace/mode/coffee.js +29 -36
- data/lib/gollum/frontend/public/gollum/livepreview/js/ace/lib/ace/mode/coffee/coffee-script.js +25 -32
- data/lib/gollum/frontend/public/gollum/livepreview/js/ace/lib/ace/mode/coffee/helpers.js +22 -7
- data/lib/gollum/frontend/public/gollum/livepreview/js/ace/lib/ace/mode/coffee/lexer.js +140 -64
- data/lib/gollum/frontend/public/gollum/livepreview/js/ace/lib/ace/mode/coffee/nodes.js +479 -237
- data/lib/gollum/frontend/public/gollum/livepreview/js/ace/lib/ace/mode/coffee/parser.js +321 -230
- data/lib/gollum/frontend/public/gollum/livepreview/js/ace/lib/ace/mode/coffee/parser_test.js +25 -32
- data/lib/gollum/frontend/public/gollum/livepreview/js/ace/lib/ace/mode/coffee/rewriter.js +62 -28
- data/lib/gollum/frontend/public/gollum/livepreview/js/ace/lib/ace/mode/coffee/scope.js +39 -20
- data/lib/gollum/frontend/public/gollum/livepreview/js/ace/lib/ace/mode/coffee_highlight_rules.js +183 -82
- data/lib/gollum/frontend/public/gollum/livepreview/js/ace/lib/ace/mode/coffee_highlight_rules_test.js +226 -32
- data/lib/gollum/frontend/public/gollum/livepreview/js/ace/lib/ace/mode/coffee_worker.js +25 -32
- data/lib/gollum/frontend/public/gollum/livepreview/js/ace/lib/ace/mode/coldfusion.js +25 -32
- data/lib/gollum/frontend/public/gollum/livepreview/js/ace/lib/ace/mode/coldfusion_highlight_rules.js +28 -35
- data/lib/gollum/frontend/public/gollum/livepreview/js/ace/lib/ace/mode/coldfusion_test.js +25 -32
- data/lib/gollum/frontend/public/gollum/livepreview/js/ace/lib/ace/mode/csharp_highlight_rules.js +7 -21
- data/lib/gollum/frontend/public/gollum/livepreview/js/ace/lib/ace/mode/css.js +36 -47
- data/lib/gollum/frontend/public/gollum/livepreview/js/ace/lib/ace/mode/css/csslint.js +202 -697
- data/lib/gollum/frontend/public/gollum/livepreview/js/ace/lib/ace/mode/css_highlight_rules.js +51 -84
- data/lib/gollum/frontend/public/gollum/livepreview/js/ace/lib/ace/mode/css_highlight_rules_test.js +25 -32
- data/lib/gollum/frontend/public/gollum/livepreview/js/ace/lib/ace/mode/css_test.js +25 -32
- data/lib/gollum/frontend/public/gollum/livepreview/js/ace/lib/ace/mode/css_worker.js +68 -40
- data/lib/gollum/frontend/public/gollum/livepreview/js/ace/lib/ace/mode/css_worker_test.js +25 -32
- data/lib/gollum/frontend/public/gollum/livepreview/js/ace/lib/ace/mode/dart.js +62 -0
- data/lib/gollum/frontend/public/gollum/livepreview/js/ace/lib/ace/mode/dart_highlight_rules.js +192 -0
- data/lib/gollum/frontend/public/gollum/livepreview/js/ace/lib/ace/mode/diff.js +25 -31
- data/lib/gollum/frontend/public/gollum/livepreview/js/ace/lib/ace/mode/diff_highlight_rules.js +27 -33
- data/lib/gollum/frontend/public/gollum/livepreview/js/ace/lib/ace/mode/doc_comment_highlight_rules.js +25 -32
- data/lib/gollum/frontend/public/gollum/livepreview/js/ace/lib/ace/mode/folding/asciidoc.js +142 -0
- data/lib/gollum/frontend/public/gollum/livepreview/js/ace/lib/ace/mode/folding/c9search.js +31 -37
- data/lib/gollum/frontend/public/gollum/livepreview/js/ace/lib/ace/mode/folding/coffee.js +26 -33
- data/lib/gollum/frontend/public/gollum/livepreview/js/ace/lib/ace/mode/folding/coffee_test.js +25 -32
- data/lib/gollum/frontend/public/gollum/livepreview/js/ace/lib/ace/mode/folding/cstyle.js +30 -51
- data/lib/gollum/frontend/public/gollum/livepreview/js/ace/lib/ace/mode/folding/cstyle_test.js +25 -32
- data/lib/gollum/frontend/public/gollum/livepreview/js/ace/lib/ace/mode/folding/diff.js +28 -35
- data/lib/gollum/frontend/public/gollum/livepreview/js/ace/lib/ace/mode/folding/fold_mode.js +35 -30
- data/lib/gollum/frontend/public/gollum/livepreview/js/ace/lib/ace/mode/folding/html.js +25 -32
- data/lib/gollum/frontend/public/gollum/livepreview/js/ace/lib/ace/mode/folding/html_test.js +25 -32
- data/lib/gollum/frontend/public/gollum/livepreview/js/ace/lib/ace/mode/folding/latex.js +162 -0
- data/lib/gollum/frontend/public/gollum/livepreview/js/ace/lib/ace/mode/folding/lua.js +163 -0
- data/lib/gollum/frontend/public/gollum/livepreview/js/ace/lib/ace/mode/folding/markdown.js +125 -0
- data/lib/gollum/frontend/public/gollum/livepreview/js/ace/lib/ace/mode/folding/mixed.js +25 -32
- data/lib/gollum/frontend/public/gollum/livepreview/js/ace/lib/ace/mode/folding/pythonic.js +25 -32
- data/lib/gollum/frontend/public/gollum/livepreview/js/ace/lib/ace/mode/folding/pythonic_test.js +26 -33
- data/lib/gollum/frontend/public/gollum/livepreview/js/ace/lib/ace/mode/folding/xml.js +25 -32
- data/lib/gollum/frontend/public/gollum/livepreview/js/ace/lib/ace/mode/folding/xml_test.js +25 -32
- data/lib/gollum/frontend/public/gollum/livepreview/js/ace/lib/ace/mode/glsl.js +52 -0
- data/lib/gollum/frontend/public/gollum/livepreview/js/ace/lib/ace/mode/glsl_highlight_rules.js +81 -0
- data/lib/gollum/frontend/public/gollum/livepreview/js/ace/lib/ace/mode/golang.js +0 -1
- data/lib/gollum/frontend/public/gollum/livepreview/js/ace/lib/ace/mode/golang_highlight_rules.js +15 -22
- data/lib/gollum/frontend/public/gollum/livepreview/js/ace/lib/ace/mode/groovy_highlight_rules.js +28 -36
- data/lib/gollum/frontend/public/gollum/livepreview/js/ace/lib/ace/mode/haml.js +62 -0
- data/lib/gollum/frontend/public/gollum/livepreview/js/ace/lib/ace/mode/haml_highlight_rules.js +132 -0
- data/lib/gollum/frontend/public/gollum/livepreview/js/ace/lib/ace/mode/haxe.js +20 -25
- data/lib/gollum/frontend/public/gollum/livepreview/js/ace/lib/ace/mode/haxe_highlight_rules.js +11 -15
- data/lib/gollum/frontend/public/gollum/livepreview/js/ace/lib/ace/mode/html.js +25 -32
- data/lib/gollum/frontend/public/gollum/livepreview/js/ace/lib/ace/mode/html_highlight_rules.js +32 -38
- data/lib/gollum/frontend/public/gollum/livepreview/js/ace/lib/ace/mode/html_highlight_rules_test.js +162 -69
- data/lib/gollum/frontend/public/gollum/livepreview/js/ace/lib/ace/mode/html_test.js +25 -32
- data/lib/gollum/frontend/public/gollum/livepreview/js/ace/lib/ace/mode/jade.js +58 -0
- data/lib/gollum/frontend/public/gollum/livepreview/js/ace/lib/ace/mode/jade_highlight_rules.js +347 -0
- data/lib/gollum/frontend/public/gollum/livepreview/js/ace/lib/ace/mode/java_highlight_rules.js +18 -29
- data/lib/gollum/frontend/public/gollum/livepreview/js/ace/lib/ace/mode/javascript.js +28 -51
- data/lib/gollum/frontend/public/gollum/livepreview/js/ace/lib/ace/mode/javascript/jshint.js +4838 -0
- data/lib/gollum/frontend/public/gollum/livepreview/js/ace/lib/ace/mode/javascript_highlight_rules.js +98 -180
- data/lib/gollum/frontend/public/gollum/livepreview/js/ace/lib/ace/mode/javascript_highlight_rules_test.js +26 -33
- data/lib/gollum/frontend/public/gollum/livepreview/js/ace/lib/ace/mode/javascript_test.js +25 -32
- data/lib/gollum/frontend/public/gollum/livepreview/js/ace/lib/ace/mode/javascript_worker.js +163 -64
- data/lib/gollum/frontend/public/gollum/livepreview/js/ace/lib/ace/mode/javascript_worker_test.js +38 -40
- data/lib/gollum/frontend/public/gollum/livepreview/js/ace/lib/ace/mode/json.js +26 -33
- data/lib/gollum/frontend/public/gollum/livepreview/js/ace/lib/ace/mode/json_highlight_rules.js +26 -34
- data/lib/gollum/frontend/public/gollum/livepreview/js/ace/lib/ace/mode/json_worker.js +25 -32
- data/lib/gollum/frontend/public/gollum/livepreview/js/ace/lib/ace/mode/json_worker_test.js +25 -32
- data/lib/gollum/frontend/public/gollum/livepreview/js/ace/lib/ace/mode/jsp.js +56 -0
- data/lib/gollum/frontend/public/gollum/livepreview/js/ace/lib/ace/mode/jsp_highlight_rules.js +85 -0
- data/lib/gollum/frontend/public/gollum/livepreview/js/ace/lib/ace/mode/latex.js +3 -2
- data/lib/gollum/frontend/public/gollum/livepreview/js/ace/lib/ace/mode/latex_highlight_rules.js +1 -1
- data/lib/gollum/frontend/public/gollum/livepreview/js/ace/lib/ace/mode/less.js +25 -33
- data/lib/gollum/frontend/public/gollum/livepreview/js/ace/lib/ace/mode/less_highlight_rules.js +25 -33
- data/lib/gollum/frontend/public/gollum/livepreview/js/ace/lib/ace/mode/liquid.js +25 -32
- data/lib/gollum/frontend/public/gollum/livepreview/js/ace/lib/ace/mode/liquid_highlight_rules.js +146 -161
- data/lib/gollum/frontend/public/gollum/livepreview/js/ace/lib/ace/mode/liquid_highlight_rules_test.js +25 -32
- data/lib/gollum/frontend/public/gollum/livepreview/js/ace/lib/ace/mode/lisp.js +60 -0
- data/lib/gollum/frontend/public/gollum/livepreview/js/ace/lib/ace/mode/lisp_highlight_rules.js +127 -0
- data/lib/gollum/frontend/public/gollum/livepreview/js/ace/lib/ace/mode/lua.js +116 -56
- data/lib/gollum/frontend/public/gollum/livepreview/js/ace/lib/ace/mode/lua_highlight_rules.js +75 -101
- data/lib/gollum/frontend/public/gollum/livepreview/js/ace/lib/ace/mode/lucene.js +16 -0
- data/lib/gollum/frontend/public/gollum/livepreview/js/ace/lib/ace/mode/lucene_highlight_rules.js +49 -0
- data/lib/gollum/frontend/public/gollum/livepreview/js/ace/lib/ace/mode/lucene_highlight_rules_test.js +99 -0
- data/lib/gollum/frontend/public/gollum/livepreview/js/ace/lib/ace/mode/makefile.js +62 -0
- data/lib/gollum/frontend/public/gollum/livepreview/js/ace/lib/ace/mode/makefile_highlight_rules.js +75 -0
- data/lib/gollum/frontend/public/gollum/livepreview/js/ace/lib/ace/mode/markdown.js +35 -41
- data/lib/gollum/frontend/public/gollum/livepreview/js/ace/lib/ace/mode/markdown_highlight_rules.js +29 -37
- data/lib/gollum/frontend/public/gollum/livepreview/js/ace/lib/ace/mode/markdown_highlight_rules_test.js +100 -0
- data/lib/gollum/frontend/public/gollum/livepreview/js/ace/lib/ace/mode/matching_brace_outdent.js +25 -32
- data/lib/gollum/frontend/public/gollum/livepreview/js/ace/lib/ace/mode/matching_parens_outdent.js +25 -32
- data/lib/gollum/frontend/public/gollum/livepreview/js/ace/lib/ace/mode/objectivec.js +62 -0
- data/lib/gollum/frontend/public/gollum/livepreview/js/ace/lib/ace/mode/objectivec_highlight_rules.js +343 -0
- data/lib/gollum/frontend/public/gollum/livepreview/js/ace/lib/ace/mode/ocaml.js +25 -32
- data/lib/gollum/frontend/public/gollum/livepreview/js/ace/lib/ace/mode/ocaml_highlight_rules.js +39 -53
- data/lib/gollum/frontend/public/gollum/livepreview/js/ace/lib/ace/mode/perl.js +25 -32
- data/lib/gollum/frontend/public/gollum/livepreview/js/ace/lib/ace/mode/perl_highlight_rules.js +39 -52
- data/lib/gollum/frontend/public/gollum/livepreview/js/ace/lib/ace/mode/pgsql.js +33 -24
- data/lib/gollum/frontend/public/gollum/livepreview/js/ace/lib/ace/mode/pgsql_highlight_rules.js +55 -51
- data/lib/gollum/frontend/public/gollum/livepreview/js/ace/lib/ace/mode/php.js +57 -36
- data/lib/gollum/frontend/public/gollum/livepreview/js/ace/lib/ace/mode/php_highlight_rules.js +53 -153
- data/lib/gollum/frontend/public/gollum/livepreview/js/ace/lib/ace/mode/powershell_highlight_rules.js +31 -21
- data/lib/gollum/frontend/public/gollum/livepreview/js/ace/lib/ace/mode/python.js +28 -36
- data/lib/gollum/frontend/public/gollum/livepreview/js/ace/lib/ace/mode/python_highlight_rules.js +44 -61
- data/lib/gollum/frontend/public/gollum/livepreview/js/ace/lib/ace/mode/python_test.js +25 -32
- data/lib/gollum/frontend/public/gollum/livepreview/js/ace/lib/ace/mode/r.js +135 -0
- data/lib/gollum/frontend/public/gollum/livepreview/js/ace/lib/ace/mode/r_highlight_rules.js +190 -0
- data/lib/gollum/frontend/public/gollum/livepreview/js/ace/lib/ace/mode/rdoc.js +36 -0
- data/lib/gollum/frontend/public/gollum/livepreview/js/ace/lib/ace/mode/rdoc_highlight_rules.js +99 -0
- data/lib/gollum/frontend/public/gollum/livepreview/js/ace/lib/ace/mode/rhtml.js +67 -0
- data/lib/gollum/frontend/public/gollum/livepreview/js/ace/lib/ace/mode/rhtml_highlight_rules.js +49 -0
- data/lib/gollum/frontend/public/gollum/livepreview/js/ace/lib/ace/mode/ruby.js +27 -33
- data/lib/gollum/frontend/public/gollum/livepreview/js/ace/lib/ace/mode/ruby_highlight_rules.js +102 -90
- data/lib/gollum/frontend/public/gollum/livepreview/js/ace/lib/ace/mode/ruby_highlight_rules_test.js +29 -37
- data/lib/gollum/frontend/public/gollum/livepreview/js/ace/lib/ace/mode/scad.js +25 -33
- data/lib/gollum/frontend/public/gollum/livepreview/js/ace/lib/ace/mode/scad_highlight_rules.js +32 -54
- data/lib/gollum/frontend/public/gollum/livepreview/js/ace/lib/ace/mode/scala_highlight_rules.js +18 -32
- data/lib/gollum/frontend/public/gollum/livepreview/js/ace/lib/ace/mode/scss.js +25 -32
- data/lib/gollum/frontend/public/gollum/livepreview/js/ace/lib/ace/mode/scss_highlight_rules.js +25 -32
- data/lib/gollum/frontend/public/gollum/livepreview/js/ace/lib/ace/mode/sh.js +28 -35
- data/lib/gollum/frontend/public/gollum/livepreview/js/ace/lib/ace/mode/sh_highlight_rules.js +48 -64
- data/lib/gollum/frontend/public/gollum/livepreview/js/ace/lib/ace/mode/sql.js +28 -18
- data/lib/gollum/frontend/public/gollum/livepreview/js/ace/lib/ace/mode/sql_highlight_rules.js +41 -36
- data/lib/gollum/frontend/public/gollum/livepreview/js/ace/lib/ace/mode/stylus.js +62 -0
- data/lib/gollum/frontend/public/gollum/livepreview/js/ace/lib/ace/mode/stylus_highlight_rules.js +175 -0
- data/lib/gollum/frontend/public/gollum/livepreview/js/ace/lib/ace/mode/svg.js +25 -32
- data/lib/gollum/frontend/public/gollum/livepreview/js/ace/lib/ace/mode/svg_highlight_rules.js +26 -33
- data/lib/gollum/frontend/public/gollum/livepreview/js/ace/lib/ace/mode/tcl.js +110 -0
- data/lib/gollum/frontend/public/gollum/livepreview/js/ace/lib/ace/mode/tcl_highlight_rules.js +180 -0
- data/lib/gollum/frontend/public/gollum/livepreview/js/ace/lib/ace/mode/tex.js +48 -0
- data/lib/gollum/frontend/public/gollum/livepreview/js/ace/lib/ace/mode/tex_highlight_rules.js +107 -0
- data/lib/gollum/frontend/public/gollum/livepreview/js/ace/lib/ace/mode/text.js +26 -36
- data/lib/gollum/frontend/public/gollum/livepreview/js/ace/lib/ace/mode/text_highlight_rules.js +57 -46
- data/lib/gollum/frontend/public/gollum/livepreview/js/ace/lib/ace/mode/text_test.js +25 -32
- data/lib/gollum/frontend/public/gollum/livepreview/js/ace/lib/ace/mode/textile.js +25 -32
- data/lib/gollum/frontend/public/gollum/livepreview/js/ace/lib/ace/mode/textile_highlight_rules.js +26 -33
- data/lib/gollum/frontend/public/gollum/livepreview/js/ace/lib/ace/mode/typescript.js +68 -0
- data/lib/gollum/frontend/public/gollum/livepreview/js/ace/lib/ace/mode/typescript_highlight_rules.js +98 -0
- data/lib/gollum/frontend/public/gollum/livepreview/js/ace/lib/ace/mode/xml.js +25 -32
- data/lib/gollum/frontend/public/gollum/livepreview/js/ace/lib/ace/mode/xml_highlight_rules.js +27 -34
- data/lib/gollum/frontend/public/gollum/livepreview/js/ace/lib/ace/mode/xml_highlight_rules_test.js +183 -78
- data/lib/gollum/frontend/public/gollum/livepreview/js/ace/lib/ace/mode/xml_test.js +25 -32
- data/lib/gollum/frontend/public/gollum/livepreview/js/ace/lib/ace/mode/xml_util.js +30 -38
- data/lib/gollum/frontend/public/gollum/livepreview/js/ace/lib/ace/mode/xquery.js +32 -37
- data/lib/gollum/frontend/public/gollum/livepreview/js/ace/lib/ace/mode/xquery/JSONParseTreeHandler.js +92 -0
- data/lib/gollum/frontend/public/gollum/livepreview/js/ace/lib/ace/mode/xquery/XQueryParser.js +32954 -42497
- data/lib/gollum/frontend/public/gollum/livepreview/js/ace/lib/ace/mode/xquery/visitors/SyntaxHighlighter.js +316 -0
- data/lib/gollum/frontend/public/gollum/livepreview/js/ace/lib/ace/mode/xquery_highlight_rules.js +31 -44
- data/lib/gollum/frontend/public/gollum/livepreview/js/ace/lib/ace/mode/xquery_worker.js +48 -57
- data/lib/gollum/frontend/public/gollum/livepreview/js/ace/lib/ace/mode/yaml.js +30 -18
- data/lib/gollum/frontend/public/gollum/livepreview/js/ace/lib/ace/mode/yaml_highlight_rules.js +48 -40
- data/lib/gollum/frontend/public/gollum/livepreview/js/ace/lib/ace/model/editor.js +26 -34
- data/lib/gollum/frontend/public/gollum/livepreview/js/ace/lib/ace/mouse/default_gutter_handler.js +126 -40
- data/lib/gollum/frontend/public/gollum/livepreview/js/ace/lib/ace/mouse/default_handlers.js +35 -43
- data/lib/gollum/frontend/public/gollum/livepreview/js/ace/lib/ace/mouse/dragdrop.js +28 -35
- data/lib/gollum/frontend/public/gollum/livepreview/js/ace/lib/ace/mouse/fold_handler.js +78 -39
- data/lib/gollum/frontend/public/gollum/livepreview/js/ace/lib/ace/mouse/mouse_event.js +26 -34
- data/lib/gollum/frontend/public/gollum/livepreview/js/ace/lib/ace/mouse/mouse_handler.js +39 -36
- data/lib/gollum/frontend/public/gollum/livepreview/js/ace/lib/ace/mouse/multi_select_handler.js +26 -34
- data/lib/gollum/frontend/public/gollum/livepreview/js/ace/lib/ace/multi_select.js +234 -103
- data/lib/gollum/frontend/public/gollum/livepreview/js/ace/lib/ace/multi_select_test.js +26 -34
- data/lib/gollum/frontend/public/gollum/livepreview/js/ace/lib/ace/placeholder.js +30 -39
- data/lib/gollum/frontend/public/gollum/livepreview/js/ace/lib/ace/placeholder_test.js +27 -35
- data/lib/gollum/frontend/public/gollum/livepreview/js/ace/lib/ace/range.js +190 -201
- data/lib/gollum/frontend/public/gollum/livepreview/js/ace/lib/ace/range_list.js +25 -32
- data/lib/gollum/frontend/public/gollum/livepreview/js/ace/lib/ace/range_list_test.js +25 -32
- data/lib/gollum/frontend/public/gollum/livepreview/js/ace/lib/ace/range_test.js +25 -32
- data/lib/gollum/frontend/public/gollum/livepreview/js/ace/lib/ace/renderloop.js +31 -49
- data/lib/gollum/frontend/public/gollum/livepreview/js/ace/lib/ace/requirejs/text.js +27 -34
- data/lib/gollum/frontend/public/gollum/livepreview/js/ace/lib/ace/scrollbar.js +52 -55
- data/lib/gollum/frontend/public/gollum/livepreview/js/ace/lib/ace/search.js +91 -105
- data/lib/gollum/frontend/public/gollum/livepreview/js/ace/lib/ace/search_highlight.js +31 -34
- data/lib/gollum/frontend/public/gollum/livepreview/js/ace/lib/ace/search_test.js +47 -37
- data/lib/gollum/frontend/public/gollum/livepreview/js/ace/lib/ace/selection.js +138 -153
- data/lib/gollum/frontend/public/gollum/livepreview/js/ace/lib/ace/selection_test.js +25 -32
- data/lib/gollum/frontend/public/gollum/livepreview/js/ace/lib/ace/split.js +67 -105
- data/lib/gollum/frontend/public/gollum/livepreview/js/ace/lib/ace/test/all.js +25 -32
- data/lib/gollum/frontend/public/gollum/livepreview/js/ace/lib/ace/test/all_browser.js +3 -2
- data/lib/gollum/frontend/public/gollum/livepreview/js/ace/lib/ace/test/assertions.js +25 -32
- data/lib/gollum/frontend/public/gollum/livepreview/js/ace/lib/ace/test/benchmark.js +25 -32
- data/lib/gollum/frontend/public/gollum/livepreview/js/ace/lib/ace/test/mockrenderer.js +30 -34
- data/lib/gollum/frontend/public/gollum/livepreview/js/ace/lib/ace/theme/ambiance.css +217 -0
- data/lib/gollum/frontend/public/gollum/livepreview/js/ace/lib/ace/theme/ambiance.js +33 -0
- data/lib/gollum/frontend/public/gollum/livepreview/js/ace/lib/ace/theme/chrome.css +37 -38
- data/lib/gollum/frontend/public/gollum/livepreview/js/ace/lib/ace/theme/chrome.js +27 -34
- data/lib/gollum/frontend/public/gollum/livepreview/js/ace/lib/ace/theme/clouds.css +53 -47
- data/lib/gollum/frontend/public/gollum/livepreview/js/ace/lib/ace/theme/clouds.js +28 -35
- data/lib/gollum/frontend/public/gollum/livepreview/js/ace/lib/ace/theme/clouds_midnight.css +54 -48
- data/lib/gollum/frontend/public/gollum/livepreview/js/ace/lib/ace/theme/clouds_midnight.js +28 -35
- data/lib/gollum/frontend/public/gollum/livepreview/js/ace/lib/ace/theme/cobalt.css +58 -59
- data/lib/gollum/frontend/public/gollum/livepreview/js/ace/lib/ace/theme/cobalt.js +28 -35
- data/lib/gollum/frontend/public/gollum/livepreview/js/ace/lib/ace/theme/crimson_editor.css +33 -33
- data/lib/gollum/frontend/public/gollum/livepreview/js/ace/lib/ace/theme/crimson_editor.js +26 -33
- data/lib/gollum/frontend/public/gollum/livepreview/js/ace/lib/ace/theme/dawn.css +52 -64
- data/lib/gollum/frontend/public/gollum/livepreview/js/ace/lib/ace/theme/dawn.js +28 -35
- data/lib/gollum/frontend/public/gollum/livepreview/js/ace/lib/ace/theme/dreamweaver.css +33 -36
- data/lib/gollum/frontend/public/gollum/livepreview/js/ace/lib/ace/theme/dreamweaver.js +26 -33
- data/lib/gollum/frontend/public/gollum/livepreview/js/ace/lib/ace/theme/eclipse.css +29 -25
- data/lib/gollum/frontend/public/gollum/livepreview/js/ace/lib/ace/theme/eclipse.js +26 -33
- data/lib/gollum/frontend/public/gollum/livepreview/js/ace/lib/ace/theme/github.css +14 -21
- data/lib/gollum/frontend/public/gollum/livepreview/js/ace/lib/ace/theme/github.js +26 -33
- data/lib/gollum/frontend/public/gollum/livepreview/js/ace/lib/ace/theme/idle_fingers.css +48 -60
- data/lib/gollum/frontend/public/gollum/livepreview/js/ace/lib/ace/theme/idle_fingers.js +28 -35
- data/lib/gollum/frontend/public/gollum/livepreview/js/ace/lib/ace/theme/kr_theme.css +52 -57
- data/lib/gollum/frontend/public/gollum/livepreview/js/ace/lib/ace/theme/kr_theme.js +28 -35
- data/lib/gollum/frontend/public/gollum/livepreview/js/ace/lib/ace/theme/merbivore.css +53 -71
- data/lib/gollum/frontend/public/gollum/livepreview/js/ace/lib/ace/theme/merbivore.js +28 -35
- data/lib/gollum/frontend/public/gollum/livepreview/js/ace/lib/ace/theme/merbivore_soft.css +54 -77
- data/lib/gollum/frontend/public/gollum/livepreview/js/ace/lib/ace/theme/merbivore_soft.js +28 -35
- data/lib/gollum/frontend/public/gollum/livepreview/js/ace/lib/ace/theme/mono_industrial.css +60 -70
- data/lib/gollum/frontend/public/gollum/livepreview/js/ace/lib/ace/theme/mono_industrial.js +28 -35
- data/lib/gollum/frontend/public/gollum/livepreview/js/ace/lib/ace/theme/monokai.css +55 -72
- data/lib/gollum/frontend/public/gollum/livepreview/js/ace/lib/ace/theme/monokai.js +28 -35
- data/lib/gollum/frontend/public/gollum/livepreview/js/ace/lib/ace/theme/pastel_on_dark.css +55 -64
- data/lib/gollum/frontend/public/gollum/livepreview/js/ace/lib/ace/theme/pastel_on_dark.js +28 -35
- data/lib/gollum/frontend/public/gollum/livepreview/js/ace/lib/ace/theme/solarized_dark.css +48 -66
- data/lib/gollum/frontend/public/gollum/livepreview/js/ace/lib/ace/theme/solarized_dark.js +28 -35
- data/lib/gollum/frontend/public/gollum/livepreview/js/ace/lib/ace/theme/solarized_light.css +49 -61
- data/lib/gollum/frontend/public/gollum/livepreview/js/ace/lib/ace/theme/solarized_light.js +28 -35
- data/lib/gollum/frontend/public/gollum/livepreview/js/ace/lib/ace/theme/textmate.css +38 -44
- data/lib/gollum/frontend/public/gollum/livepreview/js/ace/lib/ace/theme/textmate.js +26 -33
- data/lib/gollum/frontend/public/gollum/livepreview/js/ace/lib/ace/theme/tomorrow.css +59 -87
- data/lib/gollum/frontend/public/gollum/livepreview/js/ace/lib/ace/theme/tomorrow.js +28 -35
- data/lib/gollum/frontend/public/gollum/livepreview/js/ace/lib/ace/theme/tomorrow_night.css +59 -87
- data/lib/gollum/frontend/public/gollum/livepreview/js/ace/lib/ace/theme/tomorrow_night.js +28 -35
- data/lib/gollum/frontend/public/gollum/livepreview/js/ace/lib/ace/theme/tomorrow_night_blue.css +59 -90
- data/lib/gollum/frontend/public/gollum/livepreview/js/ace/lib/ace/theme/tomorrow_night_blue.js +28 -35
- data/lib/gollum/frontend/public/gollum/livepreview/js/ace/lib/ace/theme/tomorrow_night_bright.css +59 -87
- data/lib/gollum/frontend/public/gollum/livepreview/js/ace/lib/ace/theme/tomorrow_night_bright.js +28 -35
- data/lib/gollum/frontend/public/gollum/livepreview/js/ace/lib/ace/theme/tomorrow_night_eighties.css +57 -85
- data/lib/gollum/frontend/public/gollum/livepreview/js/ace/lib/ace/theme/tomorrow_night_eighties.js +28 -35
- data/lib/gollum/frontend/public/gollum/livepreview/js/ace/lib/ace/theme/twilight.css +54 -78
- data/lib/gollum/frontend/public/gollum/livepreview/js/ace/lib/ace/theme/twilight.js +28 -35
- data/lib/gollum/frontend/public/gollum/livepreview/js/ace/lib/ace/theme/vibrant_ink.css +45 -68
- data/lib/gollum/frontend/public/gollum/livepreview/js/ace/lib/ace/theme/vibrant_ink.js +28 -35
- data/lib/gollum/frontend/public/gollum/livepreview/js/ace/lib/ace/theme/xcode.css +111 -0
- data/lib/gollum/frontend/public/gollum/livepreview/js/ace/lib/ace/theme/xcode.js +39 -0
- data/lib/gollum/frontend/public/gollum/livepreview/js/ace/lib/ace/token_iterator.js +37 -50
- data/lib/gollum/frontend/public/gollum/livepreview/js/ace/lib/ace/token_iterator_test.js +26 -33
- data/lib/gollum/frontend/public/gollum/livepreview/js/ace/lib/ace/tokenizer.js +40 -41
- data/lib/gollum/frontend/public/gollum/livepreview/js/ace/lib/ace/tokenizer_dev.js +205 -0
- data/lib/gollum/frontend/public/gollum/livepreview/js/ace/lib/ace/undomanager.js +48 -55
- data/lib/gollum/frontend/public/gollum/livepreview/js/ace/lib/ace/virtual_renderer.js +254 -277
- data/lib/gollum/frontend/public/gollum/livepreview/js/ace/lib/ace/virtual_renderer_test.js +25 -32
- data/lib/gollum/frontend/public/gollum/livepreview/js/ace/lib/ace/worker/worker.js +22 -4
- data/lib/gollum/frontend/public/gollum/livepreview/js/ace/lib/ace/worker/worker_client.js +97 -56
- data/lib/gollum/frontend/public/gollum/livepreview/licenses/ace/LICENSE.txt +24 -476
- data/lib/gollum/frontend/public/gollum/livepreview/licenses/licenses.txt +2 -2
- data/lib/gollum/frontend/views/page.rb +3 -2
- metadata +102 -21
- data/lib/gollum/frontend/public/gollum/livepreview/js/ace/lib/ace/mode/xquery/Position.js +0 -59
- data/lib/gollum/frontend/public/gollum/livepreview/js/ace/lib/ace/mode/xquery/StringLexer.js +0 -1686
- data/lib/gollum/frontend/public/gollum/livepreview/js/ace/lib/ace/mode/xquery/XMLLexer.js +0 -2993
- data/lib/gollum/frontend/public/gollum/livepreview/js/ace/lib/ace/mode/xquery/XQDTLexer.js +0 -69
- data/lib/gollum/frontend/public/gollum/livepreview/js/ace/lib/ace/mode/xquery/XQDTParser.js +0 -63
- data/lib/gollum/frontend/public/gollum/livepreview/js/ace/lib/ace/mode/xquery/XQueryLexer.js +0 -10363
- data/lib/gollum/frontend/public/gollum/livepreview/js/ace/lib/ace/mode/xquery/XQuerySemanticHighlighter.js +0 -165
- data/lib/gollum/frontend/public/gollum/livepreview/js/ace/lib/ace/mode/xquery/antlr3-all.js +0 -6177
- data/lib/gollum/frontend/public/gollum/livepreview/js/ace/lib/ace/mode/xquery/xquery.js +0 -55
- data/lib/gollum/frontend/public/gollum/livepreview/js/ace/lib/ace/narcissus/definitions.js +0 -696
- data/lib/gollum/frontend/public/gollum/livepreview/js/ace/lib/ace/narcissus/lexer.js +0 -598
- data/lib/gollum/frontend/public/gollum/livepreview/js/ace/lib/ace/narcissus/options.js +0 -61
- data/lib/gollum/frontend/public/gollum/livepreview/js/ace/lib/ace/narcissus/parser.js +0 -2072
- data/lib/gollum/frontend/public/gollum/livepreview/js/ace/lib/ace/worker/jshint.js +0 -4469
- data/lib/gollum/frontend/public/gollum/livepreview/js/ace/lib/ace/worker/jslint.js +0 -6396
data/lib/gollum/frontend/public/gollum/livepreview/js/ace/lib/ace/mouse/multi_select_handler.js
CHANGED
@@ -1,38 +1,30 @@
|
|
1
|
-
/*
|
2
|
-
*
|
3
|
-
* Version: MPL 1.1/GPL 2.0/LGPL 2.1
|
1
|
+
/* ***** BEGIN LICENSE BLOCK *****
|
2
|
+
* Distributed under the BSD license:
|
4
3
|
*
|
5
|
-
*
|
6
|
-
*
|
7
|
-
*
|
8
|
-
*
|
9
|
-
*
|
10
|
-
*
|
11
|
-
*
|
12
|
-
*
|
13
|
-
*
|
14
|
-
*
|
15
|
-
*
|
16
|
-
*
|
17
|
-
*
|
18
|
-
*
|
19
|
-
*
|
20
|
-
*
|
21
|
-
*
|
22
|
-
*
|
23
|
-
*
|
24
|
-
*
|
25
|
-
*
|
26
|
-
*
|
27
|
-
*
|
28
|
-
*
|
29
|
-
* of those above. If you wish to allow use of your version of this file only
|
30
|
-
* under the terms of either the GPL or the LGPL, and not to allow others to
|
31
|
-
* use your version of this file under the terms of the MPL, indicate your
|
32
|
-
* decision by deleting the provisions above and replace them with the notice
|
33
|
-
* and other provisions required by the GPL or the LGPL. If you do not delete
|
34
|
-
* the provisions above, a recipient may use your version of this file under
|
35
|
-
* the terms of any one of the MPL, the GPL or the LGPL.
|
4
|
+
* Copyright (c) 2010, Ajax.org B.V.
|
5
|
+
* All rights reserved.
|
6
|
+
*
|
7
|
+
* Redistribution and use in source and binary forms, with or without
|
8
|
+
* modification, are permitted provided that the following conditions are met:
|
9
|
+
* * Redistributions of source code must retain the above copyright
|
10
|
+
* notice, this list of conditions and the following disclaimer.
|
11
|
+
* * Redistributions in binary form must reproduce the above copyright
|
12
|
+
* notice, this list of conditions and the following disclaimer in the
|
13
|
+
* documentation and/or other materials provided with the distribution.
|
14
|
+
* * Neither the name of Ajax.org B.V. nor the
|
15
|
+
* names of its contributors may be used to endorse or promote products
|
16
|
+
* derived from this software without specific prior written permission.
|
17
|
+
*
|
18
|
+
* THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND
|
19
|
+
* ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED
|
20
|
+
* WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
|
21
|
+
* DISCLAIMED. IN NO EVENT SHALL AJAX.ORG B.V. BE LIABLE FOR ANY
|
22
|
+
* DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES
|
23
|
+
* (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;
|
24
|
+
* LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND
|
25
|
+
* ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
|
26
|
+
* (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS
|
27
|
+
* SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
|
36
28
|
*
|
37
29
|
* ***** END LICENSE BLOCK ***** */
|
38
30
|
|
@@ -1,38 +1,30 @@
|
|
1
|
-
/*
|
2
|
-
*
|
3
|
-
* Version: MPL 1.1/GPL 2.0/LGPL 2.1
|
1
|
+
/* ***** BEGIN LICENSE BLOCK *****
|
2
|
+
* Distributed under the BSD license:
|
4
3
|
*
|
5
|
-
*
|
6
|
-
*
|
7
|
-
* the License. You may obtain a copy of the License at
|
8
|
-
* http://www.mozilla.org/MPL/
|
4
|
+
* Copyright (c) 2010, Ajax.org B.V.
|
5
|
+
* All rights reserved.
|
9
6
|
*
|
10
|
-
*
|
11
|
-
*
|
12
|
-
*
|
13
|
-
*
|
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.
|
14
17
|
*
|
15
|
-
*
|
16
|
-
*
|
17
|
-
*
|
18
|
-
*
|
19
|
-
*
|
20
|
-
*
|
21
|
-
*
|
22
|
-
*
|
23
|
-
*
|
24
|
-
*
|
25
|
-
* Alternatively, the contents of this file may be used under the terms of
|
26
|
-
* either the GNU General Public License Version 2 or later (the "GPL"), or
|
27
|
-
* the GNU Lesser General Public License Version 2.1 or later (the "LGPL"),
|
28
|
-
* in which case the provisions of the GPL or the LGPL are applicable instead
|
29
|
-
* of those above. If you wish to allow use of your version of this file only
|
30
|
-
* under the terms of either the GPL or the LGPL, and not to allow others to
|
31
|
-
* use your version of this file under the terms of the MPL, indicate your
|
32
|
-
* decision by deleting the provisions above and replace them with the notice
|
33
|
-
* and other provisions required by the GPL or the LGPL. If you do not delete
|
34
|
-
* the provisions above, a recipient may use your version of this file under
|
35
|
-
* the terms of any one of the MPL, the GPL or the LGPL.
|
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.
|
36
28
|
*
|
37
29
|
* ***** END LICENSE BLOCK ***** */
|
38
30
|
|
@@ -43,6 +35,7 @@ var Range = require("./range").Range;
|
|
43
35
|
var Selection = require("./selection").Selection;
|
44
36
|
var onMouseDown = require("./mouse/multi_select_handler").onMouseDown;
|
45
37
|
var event = require("./lib/event");
|
38
|
+
var lang = require("./lib/lang");
|
46
39
|
var commands = require("./commands/multi_select_commands");
|
47
40
|
exports.commands = commands.defaultCommands.concat(commands.multiSelectCommands);
|
48
41
|
|
@@ -73,12 +66,11 @@ var EditSession = require("./edit_session").EditSession;
|
|
73
66
|
// automatically sorted list of ranges
|
74
67
|
this.rangeList = null;
|
75
68
|
|
76
|
-
/**
|
77
|
-
* Selection.addRange(range, $blockChangeEvents)
|
78
|
-
* - range (Range): The new range to add
|
79
|
-
* - $blockChangeEvents (Boolean): Whether or not to block changing events
|
80
|
-
*
|
69
|
+
/**
|
81
70
|
* Adds a range to a selection by entering multiselect mode, if necessary.
|
71
|
+
* @param {Range} range The new range to add
|
72
|
+
* @param {Boolean} $blockChangeEvents Whether or not to block changing events
|
73
|
+
* @method Selection.addRange
|
82
74
|
**/
|
83
75
|
this.addRange = function(range, $blockChangeEvents) {
|
84
76
|
if (!range)
|
@@ -113,6 +105,10 @@ var EditSession = require("./edit_session").EditSession;
|
|
113
105
|
return $blockChangeEvents || this.fromOrientedRange(range);
|
114
106
|
};
|
115
107
|
|
108
|
+
/**
|
109
|
+
* @method Selection.toSingleRange
|
110
|
+
**/
|
111
|
+
|
116
112
|
this.toSingleRange = function(range) {
|
117
113
|
range = range || this.ranges[0];
|
118
114
|
var removed = this.rangeList.removeAll();
|
@@ -121,12 +117,11 @@ var EditSession = require("./edit_session").EditSession;
|
|
121
117
|
|
122
118
|
range && this.fromOrientedRange(range);
|
123
119
|
};
|
124
|
-
|
125
|
-
/**
|
126
|
-
* Selection.substractPoint(pos) -> Range
|
127
|
-
* - pos (Range): The position to remove, as a `{row, column}` object
|
128
|
-
*
|
120
|
+
|
121
|
+
/**
|
129
122
|
* Removes a Range containing pos (if it exists).
|
123
|
+
* @param {Range} pos The position to remove, as a `{row, column}` object
|
124
|
+
* @method Selection.substractPoint
|
130
125
|
**/
|
131
126
|
this.substractPoint = function(pos) {
|
132
127
|
var removed = this.rangeList.substractPoint(pos);
|
@@ -136,10 +131,9 @@ var EditSession = require("./edit_session").EditSession;
|
|
136
131
|
}
|
137
132
|
};
|
138
133
|
|
139
|
-
/**
|
140
|
-
* Selection.mergeOverlappingRanges()
|
141
|
-
*
|
134
|
+
/**
|
142
135
|
* Merges overlapping ranges ensuring consistency after changes
|
136
|
+
* @method Selection.mergeOverlappingRanges
|
143
137
|
**/
|
144
138
|
this.mergeOverlappingRanges = function() {
|
145
139
|
var removed = this.rangeList.merge();
|
@@ -192,10 +186,20 @@ var EditSession = require("./edit_session").EditSession;
|
|
192
186
|
this.rangeCount = 0;
|
193
187
|
};
|
194
188
|
|
189
|
+
/**
|
190
|
+
* Returns a concatenation of all the ranges.
|
191
|
+
* @returns Array
|
192
|
+
* @method Selection.getAllRanges
|
193
|
+
**/
|
195
194
|
this.getAllRanges = function() {
|
196
195
|
return this.rangeList.ranges.concat();
|
197
196
|
};
|
198
197
|
|
198
|
+
/**
|
199
|
+
* Splits all the ranges into lines.
|
200
|
+
* @method Selection.splitIntoLines
|
201
|
+
**/
|
202
|
+
|
199
203
|
this.splitIntoLines = function () {
|
200
204
|
if (this.rangeCount > 1) {
|
201
205
|
var ranges = this.rangeList.ranges;
|
@@ -206,10 +210,19 @@ var EditSession = require("./edit_session").EditSession;
|
|
206
210
|
this.setSelectionRange(range, lastRange.cursor == lastRange.start);
|
207
211
|
} else {
|
208
212
|
var range = this.getRange();
|
213
|
+
var isBackwards = this.isBackwards();
|
209
214
|
var startRow = range.start.row;
|
210
215
|
var endRow = range.end.row;
|
211
|
-
if (startRow == endRow)
|
216
|
+
if (startRow == endRow) {
|
217
|
+
if (isBackwards)
|
218
|
+
var start = range.end, end = range.start;
|
219
|
+
else
|
220
|
+
var start = range.start, end = range.end;
|
221
|
+
|
222
|
+
this.addRange(Range.fromPoints(end, end));
|
223
|
+
this.addRange(Range.fromPoints(start, start));
|
212
224
|
return;
|
225
|
+
}
|
213
226
|
|
214
227
|
var rectSel = [];
|
215
228
|
var r = this.getLineRange(startRow, true);
|
@@ -227,6 +240,9 @@ var EditSession = require("./edit_session").EditSession;
|
|
227
240
|
}
|
228
241
|
};
|
229
242
|
|
243
|
+
/**
|
244
|
+
* @method Selection.toggleBlockSelection
|
245
|
+
**/
|
230
246
|
this.toggleBlockSelection = function () {
|
231
247
|
if (this.rangeCount > 1) {
|
232
248
|
var ranges = this.rangeList.ranges;
|
@@ -244,15 +260,16 @@ var EditSession = require("./edit_session").EditSession;
|
|
244
260
|
}
|
245
261
|
};
|
246
262
|
|
247
|
-
/**
|
248
|
-
*
|
249
|
-
* - screenCursor (Cursor): The cursor to use
|
250
|
-
* - screenAnchor (Anchor): The anchor to use
|
251
|
-
* - includeEmptyLins (Boolean): If true, this includes ranges inside the block which are empty due to clipping
|
252
|
-
*
|
263
|
+
/**
|
264
|
+
*
|
253
265
|
* Gets list of ranges composing rectangular block on the screen
|
254
|
-
*
|
255
|
-
|
266
|
+
*
|
267
|
+
* @param {Cursor} screenCursor The cursor to use
|
268
|
+
* @param {Anchor} screenAnchor The anchor to use
|
269
|
+
* @param {Boolean} includeEmptyLines If true, this includes ranges inside the block which are empty due to clipping
|
270
|
+
* @returns Range
|
271
|
+
* @method Selection.rectangularRangeBlock
|
272
|
+
**/
|
256
273
|
this.rectangularRangeBlock = function(screenCursor, screenAnchor, includeEmptyLines) {
|
257
274
|
var rectSel = [];
|
258
275
|
|
@@ -321,22 +338,23 @@ var EditSession = require("./edit_session").EditSession;
|
|
321
338
|
// extend Editor
|
322
339
|
var Editor = require("./editor").Editor;
|
323
340
|
(function() {
|
324
|
-
|
325
|
-
/**
|
326
|
-
*
|
327
|
-
*
|
341
|
+
|
342
|
+
/**
|
343
|
+
*
|
328
344
|
* Updates the cursor and marker layers.
|
345
|
+
* @method Editor.updateSelectionMarkers
|
346
|
+
*
|
329
347
|
**/
|
330
348
|
this.updateSelectionMarkers = function() {
|
331
349
|
this.renderer.updateCursor();
|
332
350
|
this.renderer.updateBackMarkers();
|
333
351
|
};
|
334
352
|
|
335
|
-
/**
|
336
|
-
* Editor.addSelectionMarker(orientedRange) -> Range
|
337
|
-
* - orientedRange (Range): A range containing a cursor
|
338
|
-
*
|
353
|
+
/**
|
339
354
|
* Adds the selection and cursor.
|
355
|
+
* @param {Range} orientedRange A range containing a cursor
|
356
|
+
* @returns Range
|
357
|
+
* @method Editor.addSelectionMarker
|
340
358
|
**/
|
341
359
|
this.addSelectionMarker = function(orientedRange) {
|
342
360
|
if (!orientedRange.cursor)
|
@@ -350,11 +368,10 @@ var Editor = require("./editor").Editor;
|
|
350
368
|
return orientedRange;
|
351
369
|
};
|
352
370
|
|
353
|
-
/**
|
354
|
-
* Editor.removeSelectionMarker(range)
|
355
|
-
* - range (Range): The selection range added with [[Editor.addSelectionMarker `addSelectionMarker()`]].
|
356
|
-
*
|
371
|
+
/**
|
357
372
|
* Removes the selection marker.
|
373
|
+
* @param {Range} The selection range added with [[Editor.addSelectionMarker `addSelectionMarker()`]].
|
374
|
+
* @method Editor.removeSelectionMarker
|
358
375
|
**/
|
359
376
|
this.removeSelectionMarker = function(range) {
|
360
377
|
if (!range.marker)
|
@@ -397,7 +414,7 @@ var Editor = require("./editor").Editor;
|
|
397
414
|
return;
|
398
415
|
this.inMultiSelectMode = true;
|
399
416
|
|
400
|
-
this.setStyle("
|
417
|
+
this.setStyle("ace_multiselect");
|
401
418
|
this.keyBinding.addKeyboardHandler(commands.keyboardHandler);
|
402
419
|
this.commands.on("exec", this.$onMultiSelectExec);
|
403
420
|
|
@@ -410,7 +427,7 @@ var Editor = require("./editor").Editor;
|
|
410
427
|
return;
|
411
428
|
this.inMultiSelectMode = false;
|
412
429
|
|
413
|
-
this.unsetStyle("
|
430
|
+
this.unsetStyle("ace_multiselect");
|
414
431
|
this.keyBinding.removeKeyboardHandler(commands.keyboardHandler);
|
415
432
|
|
416
433
|
this.commands.removeEventListener("exec", this.$onMultiSelectExec);
|
@@ -438,13 +455,12 @@ var Editor = require("./editor").Editor;
|
|
438
455
|
e.preventDefault();
|
439
456
|
};
|
440
457
|
|
441
|
-
/**
|
442
|
-
* Editor.forEachSelection(cmd, args)
|
443
|
-
* - cmd (String): The command to execute
|
444
|
-
* - args (String): Any arguments for the command
|
445
|
-
*
|
458
|
+
/**
|
446
459
|
* Executes a command for each selection range.
|
447
|
-
|
460
|
+
* @param {String} cmd The command to execute
|
461
|
+
* @param {String} args Any arguments for the command
|
462
|
+
* @method Editor.forEachSelection
|
463
|
+
**/
|
448
464
|
this.forEachSelection = function(cmd, args) {
|
449
465
|
if (this.inVirtualSelectionMode)
|
450
466
|
return;
|
@@ -475,10 +491,9 @@ var Editor = require("./editor").Editor;
|
|
475
491
|
this.onSelectionChange();
|
476
492
|
};
|
477
493
|
|
478
|
-
/**
|
479
|
-
* Editor.exitMultiSelectMode() -> Void
|
480
|
-
*
|
494
|
+
/**
|
481
495
|
* Removes all the selections except the last added one.
|
496
|
+
* @method Editor.exitMultiSelectMode
|
482
497
|
**/
|
483
498
|
this.exitMultiSelectMode = function() {
|
484
499
|
if (this.inVirtualSelectionMode)
|
@@ -502,7 +517,11 @@ var Editor = require("./editor").Editor;
|
|
502
517
|
return text;
|
503
518
|
};
|
504
519
|
|
520
|
+
// todo this should change when paste becomes a command
|
505
521
|
this.onPaste = function(text) {
|
522
|
+
if (this.$readOnly)
|
523
|
+
return;
|
524
|
+
|
506
525
|
this._emit("paste", text);
|
507
526
|
if (!this.inMultiSelectMode)
|
508
527
|
return this.insert(text);
|
@@ -522,13 +541,13 @@ var Editor = require("./editor").Editor;
|
|
522
541
|
}
|
523
542
|
};
|
524
543
|
|
525
|
-
/**
|
526
|
-
* Editor.findAll(needle, options, additive) -> Number
|
527
|
-
* - needle (String): The text to find
|
528
|
-
* - options (Object): The search options
|
529
|
-
* - additive (Boolean): keeps
|
530
|
-
*
|
544
|
+
/**
|
531
545
|
* Finds and selects all the occurences of `needle`.
|
546
|
+
* @param {String} The text to find
|
547
|
+
* @param {Object} The search options
|
548
|
+
* @param {Boolean} keeps
|
549
|
+
* @returns Number
|
550
|
+
* @method Editor.findAll
|
532
551
|
**/
|
533
552
|
this.findAll = function(needle, options, additive) {
|
534
553
|
options = options || {};
|
@@ -553,14 +572,14 @@ var Editor = require("./editor").Editor;
|
|
553
572
|
return ranges.length;
|
554
573
|
};
|
555
574
|
|
556
|
-
|
557
|
-
/** extension
|
558
|
-
* Editor.selectMoreLines(dir, skip)
|
559
|
-
* - dir (Number): The direction of lines to select: -1 for up, 1 for down
|
560
|
-
* - skip (Boolean): If `true`, removes the active selection range
|
561
|
-
*
|
575
|
+
/**
|
562
576
|
* Adds a cursor above or below the active cursor.
|
563
|
-
|
577
|
+
*
|
578
|
+
* @param {Number} dir The direction of lines to select: -1 for up, 1 for down
|
579
|
+
* @param {Boolean} skip If `true`, removes the active selection range
|
580
|
+
*
|
581
|
+
* @method Editor.selectMoreLines
|
582
|
+
*/
|
564
583
|
this.selectMoreLines = function(dir, skip) {
|
565
584
|
var range = this.selection.toOrientedRange();
|
566
585
|
var isBackwards = range.cursor == range.end;
|
@@ -599,11 +618,10 @@ var Editor = require("./editor").Editor;
|
|
599
618
|
this.selection.substractPoint(toRemove);
|
600
619
|
};
|
601
620
|
|
602
|
-
/**
|
603
|
-
*
|
604
|
-
*
|
605
|
-
*
|
606
|
-
* Transposes the selected ranges.
|
621
|
+
/**
|
622
|
+
* Transposes the selected ranges.
|
623
|
+
* @param dir {Number} The direction to rotate selections
|
624
|
+
* @method Editor.transposeSelections
|
607
625
|
**/
|
608
626
|
this.transposeSelections = function(dir) {
|
609
627
|
var session = this.session;
|
@@ -640,16 +658,15 @@ var Editor = require("./editor").Editor;
|
|
640
658
|
range.start.row = tmp.start.row;
|
641
659
|
range.start.column = tmp.start.column;
|
642
660
|
}
|
643
|
-
}
|
661
|
+
};
|
644
662
|
|
645
|
-
/**
|
646
|
-
* Editor.selectMore(dir, skip)
|
647
|
-
* - dir (Number): The direction of lines to select: -1 for up, 1 for down
|
648
|
-
* - skip (Boolean): If `true`, removes the active selection range
|
649
|
-
*
|
663
|
+
/**
|
650
664
|
* Finds the next occurence of text in an active selection and adds it to the selections.
|
665
|
+
* @param {Number} dir The direction of lines to select: -1 for up, 1 for down
|
666
|
+
* @param {Boolean} skip If `true`, removes the active selection range
|
667
|
+
* @method Editor.selectMore
|
651
668
|
**/
|
652
|
-
this.selectMore = function
|
669
|
+
this.selectMore = function(dir, skip) {
|
653
670
|
var session = this.session;
|
654
671
|
var sel = session.multiSelect;
|
655
672
|
|
@@ -669,6 +686,120 @@ var Editor = require("./editor").Editor;
|
|
669
686
|
if (skip)
|
670
687
|
this.multiSelect.substractPoint(range.cursor);
|
671
688
|
};
|
689
|
+
|
690
|
+
/**
|
691
|
+
* Aligns the cursors or selected text.
|
692
|
+
* @method Editor.alignCursors
|
693
|
+
**/
|
694
|
+
this.alignCursors = function() {
|
695
|
+
var session = this.session;
|
696
|
+
var sel = session.multiSelect;
|
697
|
+
var ranges = sel.ranges;
|
698
|
+
|
699
|
+
if (!ranges.length) {
|
700
|
+
var range = this.selection.getRange();
|
701
|
+
var fr = range.start.row, lr = range.end.row;
|
702
|
+
var lines = this.session.doc.removeLines(fr, lr);
|
703
|
+
lines = this.$reAlignText(lines);
|
704
|
+
this.session.doc.insertLines(fr, lines);
|
705
|
+
range.start.column = 0;
|
706
|
+
range.end.column = lines[lines.length - 1].length;
|
707
|
+
this.selection.setRange(range);
|
708
|
+
} else {
|
709
|
+
// filter out ranges on same row
|
710
|
+
var row = -1;
|
711
|
+
var sameRowRanges = ranges.filter(function(r) {
|
712
|
+
if (r.cursor.row == row)
|
713
|
+
return true;
|
714
|
+
row = r.cursor.row;
|
715
|
+
});
|
716
|
+
sel.$onRemoveRange(sameRowRanges);
|
717
|
+
|
718
|
+
var maxCol = 0;
|
719
|
+
var minSpace = Infinity;
|
720
|
+
var spaceOffsets = ranges.map(function(r) {
|
721
|
+
var p = r.cursor;
|
722
|
+
var line = session.getLine(p.row);
|
723
|
+
var spaceOffset = line.substr(p.column).search(/\S/g);
|
724
|
+
if (spaceOffset == -1)
|
725
|
+
spaceOffset = 0;
|
726
|
+
|
727
|
+
if (p.column > maxCol)
|
728
|
+
maxCol = p.column;
|
729
|
+
if (spaceOffset < minSpace)
|
730
|
+
minSpace = spaceOffset;
|
731
|
+
return spaceOffset;
|
732
|
+
});
|
733
|
+
ranges.forEach(function(r, i) {
|
734
|
+
var p = r.cursor;
|
735
|
+
var l = maxCol - p.column;
|
736
|
+
var d = spaceOffsets[i] - minSpace;
|
737
|
+
if (l > d)
|
738
|
+
session.insert(p, lang.stringRepeat(" ", l - d));
|
739
|
+
else
|
740
|
+
session.remove(new Range(p.row, p.column, p.row, p.column - l + d));
|
741
|
+
|
742
|
+
r.start.column = r.end.column = maxCol;
|
743
|
+
r.start.row = r.end.row = p.row;
|
744
|
+
r.cursor = r.end;
|
745
|
+
});
|
746
|
+
sel.fromOrientedRange(ranges[0]);
|
747
|
+
this.renderer.updateCursor();
|
748
|
+
this.renderer.updateBackMarkers();
|
749
|
+
}
|
750
|
+
};
|
751
|
+
|
752
|
+
this.$reAlignText = function(lines) {
|
753
|
+
var isLeftAligned = true, isRightAligned = true;
|
754
|
+
var startW, textW, endW;
|
755
|
+
|
756
|
+
return lines.map(function(line) {
|
757
|
+
var m = line.match(/(\s*)(.*?)(\s*)([=:].*)/);
|
758
|
+
if (!m)
|
759
|
+
return [line];
|
760
|
+
|
761
|
+
if (startW == null) {
|
762
|
+
startW = m[1].length;
|
763
|
+
textW = m[2].length;
|
764
|
+
endW = m[3].length;
|
765
|
+
return m;
|
766
|
+
}
|
767
|
+
|
768
|
+
if (startW + textW + endW != m[1].length + m[2].length + m[3].length)
|
769
|
+
isRightAligned = false;
|
770
|
+
if (startW != m[1].length)
|
771
|
+
isLeftAligned = false;
|
772
|
+
|
773
|
+
if (startW > m[1].length)
|
774
|
+
startW = m[1].length;
|
775
|
+
if (textW < m[2].length)
|
776
|
+
textW = m[2].length;
|
777
|
+
if (endW > m[3].length)
|
778
|
+
endW = m[3].length;
|
779
|
+
|
780
|
+
return m;
|
781
|
+
}).map(isLeftAligned ? isRightAligned ? alignRight : alignLeft : unAlign);
|
782
|
+
|
783
|
+
function strRepeat(n, ch) {
|
784
|
+
return Array(n + 1).join(ch)
|
785
|
+
}
|
786
|
+
|
787
|
+
function alignLeft(m) {
|
788
|
+
return !m[2] ? m[0] : strRepeat(startW, " ") + m[2]
|
789
|
+
+ strRepeat(textW - m[2].length + endW, " ")
|
790
|
+
+ m[4].replace(/^([=:])\s+/, "$1 ")
|
791
|
+
}
|
792
|
+
function alignRight(m) {
|
793
|
+
return !m[2] ? m[0] : strRepeat(startW + textW - m[2].length, " ") + m[2]
|
794
|
+
+ strRepeat(endW, " ")
|
795
|
+
+ m[4].replace(/^([=:])\s+/, "$1 ")
|
796
|
+
}
|
797
|
+
function unAlign(m) {
|
798
|
+
return !m[2] ? m[0] : strRepeat(startW, " ") + m[2]
|
799
|
+
+ strRepeat(endW, " ")
|
800
|
+
+ m[4].replace(/^([=:])\s+/, "$1 ")
|
801
|
+
}
|
802
|
+
}
|
672
803
|
}).call(Editor.prototype);
|
673
804
|
|
674
805
|
|
@@ -714,7 +845,7 @@ exports.onSessionChange = function(e) {
|
|
714
845
|
}
|
715
846
|
};
|
716
847
|
|
717
|
-
// MultiSelect(editor)
|
848
|
+
// MultiSelect(editor)
|
718
849
|
// adds multiple selection support to the editor
|
719
850
|
// (note: should be called only once for each editor instance)
|
720
851
|
function MultiSelect(editor) {
|