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
@@ -0,0 +1,1138 @@
|
|
1
|
+
define(function(require, exports, module) {
|
2
|
+
|
3
|
+
/*
|
4
|
+
* DOM Level 2
|
5
|
+
* Object DOMException
|
6
|
+
* @see http://www.w3.org/TR/REC-DOM-Level-1/ecma-script-language-binding.html
|
7
|
+
* @see http://www.w3.org/TR/2000/REC-DOM-Level-2-Core-20001113/ecma-script-binding.html
|
8
|
+
*/
|
9
|
+
|
10
|
+
function copy(src,dest){
|
11
|
+
for(var p in src){
|
12
|
+
dest[p] = src[p];
|
13
|
+
}
|
14
|
+
}
|
15
|
+
/**
|
16
|
+
^\w+\.prototype\.([_\w]+)\s*=\s*((?:.*\{\s*?[\r\n][\s\S]*?^})|\S.*?(?=[;\r\n]));?
|
17
|
+
^\w+\.prototype\.([_\w]+)\s*=\s*(\S.*?(?=[;\r\n]));?
|
18
|
+
*/
|
19
|
+
function _extends(Class,Super){
|
20
|
+
var pt = Class.prototype;
|
21
|
+
if(Object.create){
|
22
|
+
var ppt = Object.create(Super.prototype)
|
23
|
+
pt.__proto__ = ppt;
|
24
|
+
}
|
25
|
+
if(!(pt instanceof Super)){
|
26
|
+
function t(){};
|
27
|
+
t.prototype = Super.prototype;
|
28
|
+
t = new t();
|
29
|
+
copy(pt,t);
|
30
|
+
Class.prototype = pt = t;
|
31
|
+
}
|
32
|
+
if(pt.constructor != Class){
|
33
|
+
if(typeof Class != 'function'){
|
34
|
+
console.error("unknow Class:"+Class)
|
35
|
+
}
|
36
|
+
pt.constructor = Class
|
37
|
+
}
|
38
|
+
}
|
39
|
+
var htmlns = 'http://www.w3.org/1999/xhtml' ;
|
40
|
+
// Node Types
|
41
|
+
var NodeType = {}
|
42
|
+
var ELEMENT_NODE = NodeType.ELEMENT_NODE = 1;
|
43
|
+
var ATTRIBUTE_NODE = NodeType.ATTRIBUTE_NODE = 2;
|
44
|
+
var TEXT_NODE = NodeType.TEXT_NODE = 3;
|
45
|
+
var CDATA_SECTION_NODE = NodeType.CDATA_SECTION_NODE = 4;
|
46
|
+
var ENTITY_REFERENCE_NODE = NodeType.ENTITY_REFERENCE_NODE = 5;
|
47
|
+
var ENTITY_NODE = NodeType.ENTITY_NODE = 6;
|
48
|
+
var PROCESSING_INSTRUCTION_NODE = NodeType.PROCESSING_INSTRUCTION_NODE = 7;
|
49
|
+
var COMMENT_NODE = NodeType.COMMENT_NODE = 8;
|
50
|
+
var DOCUMENT_NODE = NodeType.DOCUMENT_NODE = 9;
|
51
|
+
var DOCUMENT_TYPE_NODE = NodeType.DOCUMENT_TYPE_NODE = 10;
|
52
|
+
var DOCUMENT_FRAGMENT_NODE = NodeType.DOCUMENT_FRAGMENT_NODE = 11;
|
53
|
+
var NOTATION_NODE = NodeType.NOTATION_NODE = 12;
|
54
|
+
|
55
|
+
// ExceptionCode
|
56
|
+
var ExceptionCode = {}
|
57
|
+
var ExceptionMessage = {};
|
58
|
+
var INDEX_SIZE_ERR = ExceptionCode.INDEX_SIZE_ERR = ((ExceptionMessage[1]="Index size error"),1);
|
59
|
+
var DOMSTRING_SIZE_ERR = ExceptionCode.DOMSTRING_SIZE_ERR = ((ExceptionMessage[2]="DOMString size error"),2);
|
60
|
+
var HIERARCHY_REQUEST_ERR = ExceptionCode.HIERARCHY_REQUEST_ERR = ((ExceptionMessage[3]="Hierarchy request error"),3);
|
61
|
+
var WRONG_DOCUMENT_ERR = ExceptionCode.WRONG_DOCUMENT_ERR = ((ExceptionMessage[4]="Wrong document"),4);
|
62
|
+
var INVALID_CHARACTER_ERR = ExceptionCode.INVALID_CHARACTER_ERR = ((ExceptionMessage[5]="Invalid character"),5);
|
63
|
+
var NO_DATA_ALLOWED_ERR = ExceptionCode.NO_DATA_ALLOWED_ERR = ((ExceptionMessage[6]="No data allowed"),6);
|
64
|
+
var NO_MODIFICATION_ALLOWED_ERR = ExceptionCode.NO_MODIFICATION_ALLOWED_ERR = ((ExceptionMessage[7]="No modification allowed"),7);
|
65
|
+
var NOT_FOUND_ERR = ExceptionCode.NOT_FOUND_ERR = ((ExceptionMessage[8]="Not found"),8);
|
66
|
+
var NOT_SUPPORTED_ERR = ExceptionCode.NOT_SUPPORTED_ERR = ((ExceptionMessage[9]="Not supported"),9);
|
67
|
+
var INUSE_ATTRIBUTE_ERR = ExceptionCode.INUSE_ATTRIBUTE_ERR = ((ExceptionMessage[10]="Attribute in use"),10);
|
68
|
+
//level2
|
69
|
+
var INVALID_STATE_ERR = ExceptionCode.INVALID_STATE_ERR = ((ExceptionMessage[11]="Invalid state"),11);
|
70
|
+
var SYNTAX_ERR = ExceptionCode.SYNTAX_ERR = ((ExceptionMessage[12]="Syntax error"),12);
|
71
|
+
var INVALID_MODIFICATION_ERR = ExceptionCode.INVALID_MODIFICATION_ERR = ((ExceptionMessage[13]="Invalid modification"),13);
|
72
|
+
var NAMESPACE_ERR = ExceptionCode.NAMESPACE_ERR = ((ExceptionMessage[14]="Invalid namespace"),14);
|
73
|
+
var INVALID_ACCESS_ERR = ExceptionCode.INVALID_ACCESS_ERR = ((ExceptionMessage[15]="Invalid access"),15);
|
74
|
+
|
75
|
+
|
76
|
+
function DOMException(code, message) {
|
77
|
+
if(message instanceof Error){
|
78
|
+
var error = message;
|
79
|
+
}else{
|
80
|
+
error = this;
|
81
|
+
Error.call(this, ExceptionMessage[code]);
|
82
|
+
this.message = ExceptionMessage[code];
|
83
|
+
if(Error.captureStackTrace) Error.captureStackTrace(this, DOMException);
|
84
|
+
}
|
85
|
+
error.code = code;
|
86
|
+
if(message) this.message = this.message + ": " + message;
|
87
|
+
return error;
|
88
|
+
};
|
89
|
+
DOMException.prototype = Error.prototype;
|
90
|
+
copy(ExceptionCode,DOMException)
|
91
|
+
/**
|
92
|
+
* @see http://www.w3.org/TR/2000/REC-DOM-Level-2-Core-20001113/core.html#ID-536297177
|
93
|
+
* The NodeList interface provides the abstraction of an ordered collection of nodes, without defining or constraining how this collection is implemented. NodeList objects in the DOM are live.
|
94
|
+
* The items in the NodeList are accessible via an integral index, starting from 0.
|
95
|
+
*/
|
96
|
+
function NodeList() {
|
97
|
+
};
|
98
|
+
NodeList.prototype = {
|
99
|
+
/**
|
100
|
+
* The number of nodes in the list. The range of valid child node indices is 0 to length-1 inclusive.
|
101
|
+
* @standard level1
|
102
|
+
*/
|
103
|
+
length:0,
|
104
|
+
/**
|
105
|
+
* Returns the indexth item in the collection. If index is greater than or equal to the number of nodes in the list, this returns null.
|
106
|
+
* @standard level1
|
107
|
+
* @param index unsigned long
|
108
|
+
* Index into the collection.
|
109
|
+
* @return Node
|
110
|
+
* The node at the indexth position in the NodeList, or null if that is not a valid index.
|
111
|
+
*/
|
112
|
+
item: function(index) {
|
113
|
+
return this[index] || null;
|
114
|
+
}
|
115
|
+
};
|
116
|
+
function LiveNodeList(node,refresh){
|
117
|
+
this._node = node;
|
118
|
+
this._refresh = refresh
|
119
|
+
_updateLiveList(this);
|
120
|
+
}
|
121
|
+
function _updateLiveList(list){
|
122
|
+
var inc = list._node._inc || list._node.ownerDocument._inc;
|
123
|
+
if(list._inc != inc){
|
124
|
+
var ls = list._refresh(list._node);
|
125
|
+
//console.log(ls.length)
|
126
|
+
__set__(list,'length',ls.length);
|
127
|
+
copy(ls,list);
|
128
|
+
list._inc = inc;
|
129
|
+
}
|
130
|
+
}
|
131
|
+
LiveNodeList.prototype.item = function(i){
|
132
|
+
_updateLiveList(this);
|
133
|
+
return this[i];
|
134
|
+
}
|
135
|
+
|
136
|
+
_extends(LiveNodeList,NodeList);
|
137
|
+
/**
|
138
|
+
*
|
139
|
+
* Objects implementing the NamedNodeMap interface are used to represent collections of nodes that can be accessed by name. Note that NamedNodeMap does not inherit from NodeList; NamedNodeMaps are not maintained in any particular order. Objects contained in an object implementing NamedNodeMap may also be accessed by an ordinal index, but this is simply to allow convenient enumeration of the contents of a NamedNodeMap, and does not imply that the DOM specifies an order to these Nodes.
|
140
|
+
* NamedNodeMap objects in the DOM are live.
|
141
|
+
* used for attributes or DocumentType entities
|
142
|
+
*/
|
143
|
+
function NamedNodeMap() {
|
144
|
+
};
|
145
|
+
|
146
|
+
function _findNodeIndex(list,node){
|
147
|
+
var i = list.length;
|
148
|
+
while(i--){
|
149
|
+
if(list[i] === node){return i}
|
150
|
+
}
|
151
|
+
}
|
152
|
+
|
153
|
+
function _addNamedNode(el,list,newAttr,oldAttr){
|
154
|
+
if(oldAttr){
|
155
|
+
list[_findNodeIndex(list,oldAttr)] = newAttr;
|
156
|
+
}else{
|
157
|
+
list[list.length++] = newAttr;
|
158
|
+
}
|
159
|
+
if(el){
|
160
|
+
newAttr.ownerElement = el;
|
161
|
+
var doc = el.ownerDocument;
|
162
|
+
if(doc){
|
163
|
+
oldAttr && _onRemoveAttribute(doc,el,oldAttr);
|
164
|
+
_onAddAttribute(doc,el,newAttr);
|
165
|
+
}
|
166
|
+
}
|
167
|
+
}
|
168
|
+
function _removeNamedNode(el,list,attr){
|
169
|
+
var i = _findNodeIndex(list,attr);
|
170
|
+
if(i>=0){
|
171
|
+
var lastIndex = list.length-1
|
172
|
+
while(i<lastIndex){
|
173
|
+
list[i] = list[++i]
|
174
|
+
}
|
175
|
+
list.length = lastIndex;
|
176
|
+
if(el){
|
177
|
+
var doc = el.ownerDocument;
|
178
|
+
if(doc){
|
179
|
+
_onRemoveAttribute(doc,el,attr);
|
180
|
+
attr.ownerElement = null;
|
181
|
+
}
|
182
|
+
}
|
183
|
+
}else{
|
184
|
+
throw DOMException(NOT_FOUND_ERR,new Error())
|
185
|
+
}
|
186
|
+
}
|
187
|
+
NamedNodeMap.prototype = {
|
188
|
+
length:0,
|
189
|
+
item:NodeList.prototype.item,
|
190
|
+
getNamedItem: function(key) {
|
191
|
+
// if(key.indexOf(':')>0 || key == 'xmlns'){
|
192
|
+
// return null;
|
193
|
+
// }
|
194
|
+
var i = this.length;
|
195
|
+
while(i--){
|
196
|
+
var attr = this[i];
|
197
|
+
if(attr.nodeName == key){
|
198
|
+
return attr;
|
199
|
+
}
|
200
|
+
}
|
201
|
+
},
|
202
|
+
setNamedItem: function(attr) {
|
203
|
+
var el = attr.ownerElement;
|
204
|
+
if(el && el!=this._ownerElement){
|
205
|
+
throw new DOMException(INUSE_ATTRIBUTE_ERR);
|
206
|
+
}
|
207
|
+
var oldAttr = this.getNamedItem(attr.nodeName);
|
208
|
+
_addNamedNode(this._ownerElement,this,attr,oldAttr);
|
209
|
+
return oldAttr;
|
210
|
+
},
|
211
|
+
/* returns Node */
|
212
|
+
setNamedItemNS: function(attr) {// raises: WRONG_DOCUMENT_ERR,NO_MODIFICATION_ALLOWED_ERR,INUSE_ATTRIBUTE_ERR
|
213
|
+
var el = attr.ownerElement, oldAttr;
|
214
|
+
if(el && el!=this._ownerElement){
|
215
|
+
throw new DOMException(INUSE_ATTRIBUTE_ERR);
|
216
|
+
}
|
217
|
+
oldAttr = this.getNamedItemNS(attr.namespaceURI,attr.localName);
|
218
|
+
_addNamedNode(this._ownerElement,this,attr,oldAttr);
|
219
|
+
return oldAttr;
|
220
|
+
},
|
221
|
+
|
222
|
+
/* returns Node */
|
223
|
+
removeNamedItem: function(key) {
|
224
|
+
var attr = this.getNamedItem(key);
|
225
|
+
_removeNamedNode(this._ownerElement,this,attr);
|
226
|
+
return attr;
|
227
|
+
|
228
|
+
|
229
|
+
},// raises: NOT_FOUND_ERR,NO_MODIFICATION_ALLOWED_ERR
|
230
|
+
|
231
|
+
//for level2
|
232
|
+
removeNamedItemNS:function(namespaceURI,localName){
|
233
|
+
var attr = this.getNamedItemNS(namespaceURI,localName);
|
234
|
+
_removeNamedNode(this._ownerElement,this,attr);
|
235
|
+
return attr;
|
236
|
+
},
|
237
|
+
getNamedItemNS: function(namespaceURI, localName) {
|
238
|
+
var i = this.length;
|
239
|
+
while(i--){
|
240
|
+
var node = this[i];
|
241
|
+
if(node.localName == localName && node.namespaceURI == namespaceURI){
|
242
|
+
return node;
|
243
|
+
}
|
244
|
+
}
|
245
|
+
return null;
|
246
|
+
}
|
247
|
+
};
|
248
|
+
/**
|
249
|
+
* @see http://www.w3.org/TR/REC-DOM-Level-1/level-one-core.html#ID-102161490
|
250
|
+
*/
|
251
|
+
function DOMImplementation(/* Object */ features) {
|
252
|
+
this._features = {};
|
253
|
+
if (features) {
|
254
|
+
for (var feature in features) {
|
255
|
+
this._features = features[feature];
|
256
|
+
}
|
257
|
+
}
|
258
|
+
};
|
259
|
+
|
260
|
+
DOMImplementation.prototype = {
|
261
|
+
hasFeature: function(/* string */ feature, /* string */ version) {
|
262
|
+
var versions = this._features[feature.toLowerCase()];
|
263
|
+
if (versions && (!version || version in versions)) {
|
264
|
+
return true;
|
265
|
+
} else {
|
266
|
+
return false;
|
267
|
+
}
|
268
|
+
},
|
269
|
+
// Introduced in DOM Level 2:
|
270
|
+
createDocument:function(namespaceURI, qualifiedName, doctype){// raises:INVALID_CHARACTER_ERR,NAMESPACE_ERR,WRONG_DOCUMENT_ERR
|
271
|
+
var doc = new Document();
|
272
|
+
doc.implementation = this;
|
273
|
+
doc.childNodes = new NodeList();
|
274
|
+
doc.doctype = doctype;
|
275
|
+
if(doctype){
|
276
|
+
doc.appendChild(doctype);
|
277
|
+
}
|
278
|
+
if(qualifiedName){
|
279
|
+
var root = doc.createElementNS(namespaceURI,qualifiedName);
|
280
|
+
doc.appendChild(root);
|
281
|
+
}
|
282
|
+
return doc;
|
283
|
+
},
|
284
|
+
// Introduced in DOM Level 2:
|
285
|
+
createDocumentType:function(qualifiedName, publicId, systemId){// raises:INVALID_CHARACTER_ERR,NAMESPACE_ERR
|
286
|
+
var node = new DocumentType();
|
287
|
+
node.name = qualifiedName;
|
288
|
+
node.nodeName = qualifiedName;
|
289
|
+
node.publicId = publicId;
|
290
|
+
node.systemId = systemId;
|
291
|
+
// Introduced in DOM Level 2:
|
292
|
+
//readonly attribute DOMString internalSubset;
|
293
|
+
|
294
|
+
//TODO:..
|
295
|
+
// readonly attribute NamedNodeMap entities;
|
296
|
+
// readonly attribute NamedNodeMap notations;
|
297
|
+
return node;
|
298
|
+
}
|
299
|
+
};
|
300
|
+
|
301
|
+
|
302
|
+
/**
|
303
|
+
* @see http://www.w3.org/TR/2000/REC-DOM-Level-2-Core-20001113/core.html#ID-1950641247
|
304
|
+
*/
|
305
|
+
|
306
|
+
function Node() {
|
307
|
+
};
|
308
|
+
|
309
|
+
Node.prototype = {
|
310
|
+
firstChild : null,
|
311
|
+
lastChild : null,
|
312
|
+
previousSibling : null,
|
313
|
+
nextSibling : null,
|
314
|
+
attributes : null,
|
315
|
+
parentNode : null,
|
316
|
+
childNodes : null,
|
317
|
+
ownerDocument : null,
|
318
|
+
nodeValue : null,
|
319
|
+
namespaceURI : null,
|
320
|
+
prefix : null,
|
321
|
+
localName : null,
|
322
|
+
// Modified in DOM Level 2:
|
323
|
+
insertBefore:function(newChild, refChild){//raises
|
324
|
+
return _insertBefore(this,newChild,refChild);
|
325
|
+
},
|
326
|
+
replaceChild:function(newChild, oldChild){//raises
|
327
|
+
this.insertBefore(newChild,oldChild);
|
328
|
+
if(oldChild){
|
329
|
+
this.removeChild(oldChild);
|
330
|
+
}
|
331
|
+
},
|
332
|
+
removeChild:function(oldChild){
|
333
|
+
return _removeChild(this,oldChild);
|
334
|
+
},
|
335
|
+
appendChild:function(newChild){
|
336
|
+
return this.insertBefore(newChild,null);
|
337
|
+
},
|
338
|
+
hasChildNodes:function(){
|
339
|
+
return this.firstChild != null;
|
340
|
+
},
|
341
|
+
cloneNode:function(deep){
|
342
|
+
return cloneNode(this.ownerDocument||this,this,deep);
|
343
|
+
},
|
344
|
+
// Modified in DOM Level 2:
|
345
|
+
normalize:function(){
|
346
|
+
var child = this.firstChild;
|
347
|
+
while(child){
|
348
|
+
var next = child.nextSibling;
|
349
|
+
if(next && next.nodeType == TEXT_NODE && child.nodeType == TEXT_NODE){
|
350
|
+
this.removeChild(next);
|
351
|
+
child.appendData(next.data);
|
352
|
+
}else{
|
353
|
+
child.normalize();
|
354
|
+
child = next;
|
355
|
+
}
|
356
|
+
}
|
357
|
+
},
|
358
|
+
// Introduced in DOM Level 2:
|
359
|
+
isSupported:function(feature, version){
|
360
|
+
return this.ownerDocument.implementation.hasFeature(feature,version);
|
361
|
+
},
|
362
|
+
// Introduced in DOM Level 2:
|
363
|
+
hasAttributes:function(){
|
364
|
+
return this.attributes.length>0;
|
365
|
+
},
|
366
|
+
lookupPrefix:function(namespaceURI){
|
367
|
+
var el = this;
|
368
|
+
while(el){
|
369
|
+
var map = el._nsMap;
|
370
|
+
//console.dir(map)
|
371
|
+
if(map){
|
372
|
+
for(var n in map){
|
373
|
+
if(map[n] == namespaceURI){
|
374
|
+
return n;
|
375
|
+
}
|
376
|
+
}
|
377
|
+
}
|
378
|
+
el = el.nodeType == 2?el.ownerDocument : el.parentNode;
|
379
|
+
}
|
380
|
+
return null;
|
381
|
+
},
|
382
|
+
// Introduced in DOM Level 3:
|
383
|
+
lookupNamespaceURI:function(prefix){
|
384
|
+
var el = this;
|
385
|
+
while(el){
|
386
|
+
var map = el._nsMap;
|
387
|
+
//console.dir(map)
|
388
|
+
if(map){
|
389
|
+
if(prefix in map){
|
390
|
+
return map[prefix] ;
|
391
|
+
}
|
392
|
+
}
|
393
|
+
el = el.nodeType == 2?el.ownerDocument : el.parentNode;
|
394
|
+
}
|
395
|
+
return null;
|
396
|
+
},
|
397
|
+
// Introduced in DOM Level 3:
|
398
|
+
isDefaultNamespace:function(namespaceURI){
|
399
|
+
var prefix = this.lookupPrefix(namespaceURI);
|
400
|
+
return prefix == null;
|
401
|
+
}
|
402
|
+
};
|
403
|
+
|
404
|
+
|
405
|
+
function _xmlEncoder(c){
|
406
|
+
return c == '<' && '<' ||
|
407
|
+
c == '>' && '>' ||
|
408
|
+
c == '&' && '&' ||
|
409
|
+
c == '"' && '"' ||
|
410
|
+
'&#'+c.charCodeAt()+';'
|
411
|
+
}
|
412
|
+
|
413
|
+
|
414
|
+
copy(NodeType,Node);
|
415
|
+
copy(NodeType,Node.prototype);
|
416
|
+
|
417
|
+
/**
|
418
|
+
* @param callback return true for continue,false for break
|
419
|
+
* @return boolean true: break visit;
|
420
|
+
*/
|
421
|
+
function _visitNode(node,callback){
|
422
|
+
if(callback(node)){
|
423
|
+
return true;
|
424
|
+
}
|
425
|
+
if(node = node.firstChild){
|
426
|
+
do{
|
427
|
+
if(_visitNode(node,callback)){return true}
|
428
|
+
}while(node=node.nextSibling)
|
429
|
+
}
|
430
|
+
}
|
431
|
+
|
432
|
+
|
433
|
+
|
434
|
+
function Document(){
|
435
|
+
}
|
436
|
+
function _onAddAttribute(doc,el,newAttr){
|
437
|
+
doc && doc._inc++;
|
438
|
+
var ns = newAttr.namespaceURI ;
|
439
|
+
if(ns == 'http://www.w3.org/2000/xmlns/'){
|
440
|
+
//update namespace
|
441
|
+
el._nsMap[newAttr.prefix?newAttr.localName:''] = newAttr.value
|
442
|
+
}
|
443
|
+
}
|
444
|
+
function _onRemoveAttribute(doc,el,newAttr,remove){
|
445
|
+
doc && doc._inc++;
|
446
|
+
var ns = newAttr.namespaceURI ;
|
447
|
+
if(ns == 'http://www.w3.org/2000/xmlns/'){
|
448
|
+
//update namespace
|
449
|
+
delete el._nsMap[newAttr.prefix?newAttr.localName:'']
|
450
|
+
}
|
451
|
+
}
|
452
|
+
function _onUpdateChild(doc,el,newChild){
|
453
|
+
if(doc && doc._inc){
|
454
|
+
doc._inc++;
|
455
|
+
//update childNodes
|
456
|
+
var cs = el.childNodes;
|
457
|
+
if(newChild){
|
458
|
+
cs[cs.length++] = newChild;
|
459
|
+
}else{
|
460
|
+
//console.log(1)
|
461
|
+
var child = el.firstChild;
|
462
|
+
var i = 0;
|
463
|
+
while(child){
|
464
|
+
cs[i++] = child;
|
465
|
+
child =child.nextSibling;
|
466
|
+
}
|
467
|
+
cs.length = i;
|
468
|
+
}
|
469
|
+
}
|
470
|
+
}
|
471
|
+
|
472
|
+
/**
|
473
|
+
* attributes;
|
474
|
+
* children;
|
475
|
+
*
|
476
|
+
* writeable properties:
|
477
|
+
* nodeValue,Attr:value,CharacterData:data
|
478
|
+
* prefix
|
479
|
+
*/
|
480
|
+
function _removeChild(parentNode,child){
|
481
|
+
var previous = child.previousSibling;
|
482
|
+
var next = child.nextSibling;
|
483
|
+
if(previous){
|
484
|
+
previous.nextSibling = next;
|
485
|
+
}else{
|
486
|
+
parentNode.firstChild = next
|
487
|
+
}
|
488
|
+
if(next){
|
489
|
+
next.previousSibling = previous;
|
490
|
+
}else{
|
491
|
+
parentNode.lastChild = previous;
|
492
|
+
}
|
493
|
+
_onUpdateChild(parentNode.ownerDocument,parentNode);
|
494
|
+
return child;
|
495
|
+
}
|
496
|
+
/**
|
497
|
+
* preformance key(refChild == null)
|
498
|
+
*/
|
499
|
+
function _insertBefore(parentNode,newChild,nextChild){
|
500
|
+
var cp = newChild.parentNode;
|
501
|
+
if(cp){
|
502
|
+
cp.removeChild(newChild);//remove and update
|
503
|
+
}
|
504
|
+
if(newChild.nodeType === DOCUMENT_FRAGMENT_NODE){
|
505
|
+
var newFirst = newChild.firstChild;
|
506
|
+
if (newFirst == null) {
|
507
|
+
return newChild;
|
508
|
+
}
|
509
|
+
var newLast = newChild.lastChild;
|
510
|
+
}else{
|
511
|
+
newFirst = newLast = newChild;
|
512
|
+
}
|
513
|
+
var pre = nextChild ? nextChild.previousSibling : parentNode.lastChild;
|
514
|
+
|
515
|
+
newFirst.previousSibling = pre;
|
516
|
+
newLast.nextSibling = nextChild;
|
517
|
+
|
518
|
+
|
519
|
+
if(pre){
|
520
|
+
pre.nextSibling = newFirst;
|
521
|
+
}else{
|
522
|
+
parentNode.firstChild = newFirst;
|
523
|
+
}
|
524
|
+
if(nextChild == null){
|
525
|
+
parentNode.lastChild = newLast;
|
526
|
+
}else{
|
527
|
+
nextChild.previousSibling = newLast;
|
528
|
+
}
|
529
|
+
do{
|
530
|
+
newFirst.parentNode = parentNode;
|
531
|
+
}while(newFirst !== newLast && (newFirst= newFirst.nextSibling))
|
532
|
+
_onUpdateChild(parentNode.ownerDocument||parentNode,parentNode);
|
533
|
+
//console.log(parentNode.lastChild.nextSibling == null)
|
534
|
+
if (newChild.nodeType == DOCUMENT_FRAGMENT_NODE) {
|
535
|
+
newChild.firstChild = newChild.lastChild = null;
|
536
|
+
}
|
537
|
+
return newChild;
|
538
|
+
}
|
539
|
+
function _appendSingleChild(parentNode,newChild){
|
540
|
+
var cp = newChild.parentNode;
|
541
|
+
if(cp){
|
542
|
+
var pre = parentNode.lastChild;
|
543
|
+
cp.removeChild(newChild);//remove and update
|
544
|
+
var pre = parentNode.lastChild;
|
545
|
+
}
|
546
|
+
var pre = parentNode.lastChild;
|
547
|
+
newChild.parentNode = parentNode;
|
548
|
+
newChild.previousSibling = pre;
|
549
|
+
newChild.nextSibling = null;
|
550
|
+
if(pre){
|
551
|
+
pre.nextSibling = newChild;
|
552
|
+
}else{
|
553
|
+
parentNode.firstChild = newChild;
|
554
|
+
}
|
555
|
+
parentNode.lastChild = newChild;
|
556
|
+
_onUpdateChild(parentNode.ownerDocument,parentNode,newChild);
|
557
|
+
return newChild;
|
558
|
+
//console.log("__aa",parentNode.lastChild.nextSibling == null)
|
559
|
+
}
|
560
|
+
Document.prototype = {
|
561
|
+
//implementation : null,
|
562
|
+
nodeName : '#document',
|
563
|
+
nodeType : DOCUMENT_NODE,
|
564
|
+
doctype : null,
|
565
|
+
documentElement : null,
|
566
|
+
_inc : 1,
|
567
|
+
|
568
|
+
insertBefore : function(newChild, refChild){//raises
|
569
|
+
if(newChild.nodeType == DOCUMENT_FRAGMENT_NODE){
|
570
|
+
var child = newChild.firstChild;
|
571
|
+
while(child){
|
572
|
+
var next = child.nextSibling;
|
573
|
+
this.insertBefore(child,refChild);
|
574
|
+
child = next;
|
575
|
+
}
|
576
|
+
return newChild;
|
577
|
+
}
|
578
|
+
if(this.documentElement == null && newChild.nodeType == 1){
|
579
|
+
this.documentElement = newChild;
|
580
|
+
}
|
581
|
+
|
582
|
+
return _insertBefore(this,newChild,refChild),(newChild.ownerDocument = this),newChild;
|
583
|
+
},
|
584
|
+
removeChild : function(oldChild){
|
585
|
+
if(this.documentElement == oldChild){
|
586
|
+
this.documentElement = null;
|
587
|
+
}
|
588
|
+
return _removeChild(this,oldChild);
|
589
|
+
},
|
590
|
+
// Introduced in DOM Level 2:
|
591
|
+
importNode : function(importedNode,deep){
|
592
|
+
return importNode(this,importedNode,deep);
|
593
|
+
},
|
594
|
+
// Introduced in DOM Level 2:
|
595
|
+
getElementById : function(id){
|
596
|
+
var rtv = null;
|
597
|
+
_visitNode(this.documentElement,function(node){
|
598
|
+
if(node.nodeType == 1){
|
599
|
+
if(node.getAttribute('id') == id){
|
600
|
+
rtv = node;
|
601
|
+
return true;
|
602
|
+
}
|
603
|
+
}
|
604
|
+
})
|
605
|
+
return rtv;
|
606
|
+
},
|
607
|
+
|
608
|
+
//document factory method:
|
609
|
+
createElement : function(tagName){
|
610
|
+
var node = new Element();
|
611
|
+
node.ownerDocument = this;
|
612
|
+
node.nodeName = tagName;
|
613
|
+
node.tagName = tagName;
|
614
|
+
node.childNodes = new NodeList();
|
615
|
+
var attrs = node.attributes = new NamedNodeMap();
|
616
|
+
attrs._ownerElement = node;
|
617
|
+
return node;
|
618
|
+
},
|
619
|
+
createDocumentFragment : function(){
|
620
|
+
var node = new DocumentFragment();
|
621
|
+
node.ownerDocument = this;
|
622
|
+
node.childNodes = new NodeList();
|
623
|
+
return node;
|
624
|
+
},
|
625
|
+
createTextNode : function(data){
|
626
|
+
var node = new Text();
|
627
|
+
node.ownerDocument = this;
|
628
|
+
node.appendData(data)
|
629
|
+
return node;
|
630
|
+
},
|
631
|
+
createComment : function(data){
|
632
|
+
var node = new Comment();
|
633
|
+
node.ownerDocument = this;
|
634
|
+
node.appendData(data)
|
635
|
+
return node;
|
636
|
+
},
|
637
|
+
createCDATASection : function(data){
|
638
|
+
var node = new CDATASection();
|
639
|
+
node.ownerDocument = this;
|
640
|
+
node.appendData(data)
|
641
|
+
return node;
|
642
|
+
},
|
643
|
+
createProcessingInstruction : function(target,data){
|
644
|
+
var node = new ProcessingInstruction();
|
645
|
+
node.ownerDocument = this;
|
646
|
+
node.tagName = node.target = target;
|
647
|
+
node.nodeValue= node.data = data;
|
648
|
+
return node;
|
649
|
+
},
|
650
|
+
createAttribute : function(name){
|
651
|
+
var node = new Attr();
|
652
|
+
node.ownerDocument = this;
|
653
|
+
node.name = name;
|
654
|
+
node.nodeName = name;
|
655
|
+
node.localName = name;
|
656
|
+
node.specified = true;
|
657
|
+
return node;
|
658
|
+
},
|
659
|
+
createEntityReference : function(name){
|
660
|
+
var node = new EntityReference();
|
661
|
+
node.ownerDocument = this;
|
662
|
+
node.nodeName = name;
|
663
|
+
return node;
|
664
|
+
},
|
665
|
+
// Introduced in DOM Level 2:
|
666
|
+
createElementNS : function(namespaceURI,qualifiedName){
|
667
|
+
var node = new Element();
|
668
|
+
var pl = qualifiedName.split(':');
|
669
|
+
var attrs = node.attributes = new NamedNodeMap();
|
670
|
+
node.childNodes = new NodeList();
|
671
|
+
node.ownerDocument = this;
|
672
|
+
node.nodeName = qualifiedName;
|
673
|
+
node.tagName = qualifiedName;
|
674
|
+
node.namespaceURI = namespaceURI;
|
675
|
+
if(pl.length == 2){
|
676
|
+
node.prefix = pl[0];
|
677
|
+
node.localName = pl[1];
|
678
|
+
}else{
|
679
|
+
//el.prefix = null;
|
680
|
+
node.localName = qualifiedName;
|
681
|
+
}
|
682
|
+
attrs._ownerElement = node;
|
683
|
+
return node;
|
684
|
+
},
|
685
|
+
// Introduced in DOM Level 2:
|
686
|
+
createAttributeNS : function(namespaceURI,qualifiedName){
|
687
|
+
var node = new Attr();
|
688
|
+
var pl = qualifiedName.split(':');
|
689
|
+
node.ownerDocument = this;
|
690
|
+
node.nodeName = qualifiedName;
|
691
|
+
node.name = qualifiedName;
|
692
|
+
node.namespaceURI = namespaceURI;
|
693
|
+
node.specified = true;
|
694
|
+
if(pl.length == 2){
|
695
|
+
node.prefix = pl[0];
|
696
|
+
node.localName = pl[1];
|
697
|
+
}else{
|
698
|
+
//el.prefix = null;
|
699
|
+
node.localName = qualifiedName;
|
700
|
+
}
|
701
|
+
return node;
|
702
|
+
}
|
703
|
+
};
|
704
|
+
_extends(Document,Node);
|
705
|
+
|
706
|
+
|
707
|
+
function Element() {
|
708
|
+
this._nsMap = {};
|
709
|
+
};
|
710
|
+
Element.prototype = {
|
711
|
+
nodeType : ELEMENT_NODE,
|
712
|
+
hasAttribute : function(name){
|
713
|
+
return this.getAttributeNode(name)!=null;
|
714
|
+
},
|
715
|
+
getAttribute : function(name){
|
716
|
+
var attr = this.getAttributeNode(name);
|
717
|
+
return attr && attr.value || '';
|
718
|
+
},
|
719
|
+
getAttributeNode : function(name){
|
720
|
+
return this.attributes.getNamedItem(name);
|
721
|
+
},
|
722
|
+
setAttribute : function(name, value){
|
723
|
+
var attr = this.ownerDocument.createAttribute(name);
|
724
|
+
attr.value = attr.nodeValue = "" + value;
|
725
|
+
this.setAttributeNode(attr)
|
726
|
+
},
|
727
|
+
removeAttribute : function(name){
|
728
|
+
var attr = this.getAttributeNode(name)
|
729
|
+
attr && this.removeAttributeNode(attr);
|
730
|
+
},
|
731
|
+
|
732
|
+
//four real opeartion method
|
733
|
+
appendChild:function(newChild){
|
734
|
+
if(newChild.nodeType === DOCUMENT_FRAGMENT_NODE){
|
735
|
+
return this.insertBefore(newChild,null);
|
736
|
+
}else{
|
737
|
+
return _appendSingleChild(this,newChild);
|
738
|
+
}
|
739
|
+
},
|
740
|
+
setAttributeNode : function(newAttr){
|
741
|
+
return this.attributes.setNamedItem(newAttr);
|
742
|
+
},
|
743
|
+
setAttributeNodeNS : function(newAttr){
|
744
|
+
return this.attributes.setNamedItemNS(newAttr);
|
745
|
+
},
|
746
|
+
removeAttributeNode : function(oldAttr){
|
747
|
+
return this.attributes.removeNamedItem(oldAttr.nodeName);
|
748
|
+
},
|
749
|
+
//get real attribute name,and remove it by removeAttributeNode
|
750
|
+
removeAttributeNS : function(namespaceURI, localName){
|
751
|
+
var old = this.getAttributeNodeNS(namespaceURI, localName);
|
752
|
+
old && this.removeAttributeNode(old);
|
753
|
+
},
|
754
|
+
|
755
|
+
hasAttributeNS : function(namespaceURI, localName){
|
756
|
+
return this.getAttributeNodeNS(namespaceURI, localName)!=null;
|
757
|
+
},
|
758
|
+
getAttributeNS : function(namespaceURI, localName){
|
759
|
+
var attr = this.getAttributeNodeNS(namespaceURI, localName);
|
760
|
+
return attr && attr.value || '';
|
761
|
+
},
|
762
|
+
setAttributeNS : function(namespaceURI, qualifiedName, value){
|
763
|
+
var attr = this.ownerDocument.createAttributeNS(namespaceURI, qualifiedName);
|
764
|
+
attr.value = attr.nodeValue = "" + value;
|
765
|
+
this.setAttributeNode(attr)
|
766
|
+
},
|
767
|
+
getAttributeNodeNS : function(namespaceURI, localName){
|
768
|
+
return this.attributes.getNamedItemNS(namespaceURI, localName);
|
769
|
+
},
|
770
|
+
|
771
|
+
getElementsByTagName : function(tagName){
|
772
|
+
return new LiveNodeList(this,function(base){
|
773
|
+
var ls = [];
|
774
|
+
_visitNode(base,function(node){
|
775
|
+
if(node !== base && node.nodeType == ELEMENT_NODE && (tagName === '*' || node.tagName == tagName)){
|
776
|
+
ls.push(node);
|
777
|
+
}
|
778
|
+
});
|
779
|
+
return ls;
|
780
|
+
});
|
781
|
+
},
|
782
|
+
getElementsByTagNameNS : function(namespaceURI, localName){
|
783
|
+
return new LiveNodeList(this,function(base){
|
784
|
+
var ls = [];
|
785
|
+
_visitNode(base,function(node){
|
786
|
+
if(node !== base && node.nodeType === ELEMENT_NODE && (namespaceURI === '*' || node.namespaceURI === namespaceURI) && (localName === '*' || node.localName == localName)){
|
787
|
+
ls.push(node);
|
788
|
+
}
|
789
|
+
});
|
790
|
+
return ls;
|
791
|
+
});
|
792
|
+
}
|
793
|
+
};
|
794
|
+
Document.prototype.getElementsByTagName = Element.prototype.getElementsByTagName;
|
795
|
+
Document.prototype.getElementsByTagNameNS = Element.prototype.getElementsByTagNameNS;
|
796
|
+
|
797
|
+
|
798
|
+
_extends(Element,Node);
|
799
|
+
function Attr() {
|
800
|
+
};
|
801
|
+
Attr.prototype.nodeType = ATTRIBUTE_NODE;
|
802
|
+
_extends(Attr,Node);
|
803
|
+
|
804
|
+
|
805
|
+
function CharacterData() {
|
806
|
+
};
|
807
|
+
CharacterData.prototype = {
|
808
|
+
data : '',
|
809
|
+
substringData : function(offset, count) {
|
810
|
+
return this.data.substring(offset, offset+count);
|
811
|
+
},
|
812
|
+
appendData: function(text) {
|
813
|
+
text = this.data+text;
|
814
|
+
this.nodeValue = this.data = text;
|
815
|
+
this.length = text.length;
|
816
|
+
},
|
817
|
+
insertData: function(offset,text) {
|
818
|
+
this.replaceData(offset,0,text);
|
819
|
+
|
820
|
+
},
|
821
|
+
appendChild:function(newChild){
|
822
|
+
//if(!(newChild instanceof CharacterData)){
|
823
|
+
throw new Error(ExceptionMessage[3])
|
824
|
+
//}
|
825
|
+
return Node.prototype.appendChild.apply(this,arguments)
|
826
|
+
},
|
827
|
+
deleteData: function(offset, count) {
|
828
|
+
this.replaceData(offset,count,"");
|
829
|
+
},
|
830
|
+
replaceData: function(offset, count, text) {
|
831
|
+
var start = this.data.substring(0,offset);
|
832
|
+
var end = this.data.substring(offset+count);
|
833
|
+
text = start + text + end;
|
834
|
+
this.nodeValue = this.data = text;
|
835
|
+
this.length = text.length;
|
836
|
+
}
|
837
|
+
}
|
838
|
+
_extends(CharacterData,Node);
|
839
|
+
function Text() {
|
840
|
+
};
|
841
|
+
Text.prototype = {
|
842
|
+
nodeName : "#text",
|
843
|
+
nodeType : TEXT_NODE,
|
844
|
+
splitText : function(offset) {
|
845
|
+
var text = this.data;
|
846
|
+
var newText = text.substring(offset);
|
847
|
+
text = text.substring(0, offset);
|
848
|
+
this.data = this.nodeValue = text;
|
849
|
+
this.length = text.length;
|
850
|
+
var newNode = this.ownerDocument.createTextNode(newText);
|
851
|
+
if(this.parentNode){
|
852
|
+
this.parentNode.insertBefore(newNode, this.nextSibling);
|
853
|
+
}
|
854
|
+
return newNode;
|
855
|
+
}
|
856
|
+
}
|
857
|
+
_extends(Text,CharacterData);
|
858
|
+
function Comment() {
|
859
|
+
};
|
860
|
+
Comment.prototype = {
|
861
|
+
nodeName : "#comment",
|
862
|
+
nodeType : COMMENT_NODE
|
863
|
+
}
|
864
|
+
_extends(Comment,CharacterData);
|
865
|
+
|
866
|
+
function CDATASection() {
|
867
|
+
};
|
868
|
+
CDATASection.prototype = {
|
869
|
+
nodeName : "#cdata-section",
|
870
|
+
nodeType : CDATA_SECTION_NODE
|
871
|
+
}
|
872
|
+
_extends(CDATASection,CharacterData);
|
873
|
+
|
874
|
+
|
875
|
+
function DocumentType() {
|
876
|
+
};
|
877
|
+
DocumentType.prototype.nodeType = DOCUMENT_TYPE_NODE;
|
878
|
+
_extends(DocumentType,Node);
|
879
|
+
|
880
|
+
function Notation() {
|
881
|
+
};
|
882
|
+
Notation.prototype.nodeType = NOTATION_NODE;
|
883
|
+
_extends(Notation,Node);
|
884
|
+
|
885
|
+
function Entity() {
|
886
|
+
};
|
887
|
+
Entity.prototype.nodeType = ENTITY_NODE;
|
888
|
+
_extends(Entity,Node);
|
889
|
+
|
890
|
+
function EntityReference() {
|
891
|
+
};
|
892
|
+
EntityReference.prototype.nodeType = ENTITY_REFERENCE_NODE;
|
893
|
+
_extends(EntityReference,Node);
|
894
|
+
|
895
|
+
function DocumentFragment() {
|
896
|
+
};
|
897
|
+
DocumentFragment.prototype.nodeName = "#document-fragment";
|
898
|
+
DocumentFragment.prototype.nodeType = DOCUMENT_FRAGMENT_NODE;
|
899
|
+
_extends(DocumentFragment,Node);
|
900
|
+
|
901
|
+
|
902
|
+
function ProcessingInstruction() {
|
903
|
+
}
|
904
|
+
ProcessingInstruction.prototype.nodeType = PROCESSING_INSTRUCTION_NODE;
|
905
|
+
_extends(ProcessingInstruction,Node);
|
906
|
+
function XMLSerializer(){}
|
907
|
+
XMLSerializer.prototype.serializeToString = function(node){
|
908
|
+
var buf = [];
|
909
|
+
serializeToString(node,buf);
|
910
|
+
return buf.join('');
|
911
|
+
}
|
912
|
+
Node.prototype.toString =function(){
|
913
|
+
return XMLSerializer.prototype.serializeToString(this);
|
914
|
+
}
|
915
|
+
function serializeToString(node,buf){
|
916
|
+
switch(node.nodeType){
|
917
|
+
case ELEMENT_NODE:
|
918
|
+
var attrs = node.attributes;
|
919
|
+
var len = attrs.length;
|
920
|
+
var child = node.firstChild;
|
921
|
+
var nodeName = node.tagName;
|
922
|
+
var isHTML = htmlns === node.namespaceURI
|
923
|
+
buf.push('<',nodeName);
|
924
|
+
for(var i=0;i<len;i++){
|
925
|
+
serializeToString(attrs.item(i),buf,isHTML);
|
926
|
+
}
|
927
|
+
if(child || isHTML && !/^(?:meta|link|img|br|hr|input|button)$/i.test(nodeName)){
|
928
|
+
buf.push('>');
|
929
|
+
//if is cdata child node
|
930
|
+
if(isHTML && /^script$/i.test(nodeName)){
|
931
|
+
if(child){
|
932
|
+
buf.push(child.data);
|
933
|
+
}
|
934
|
+
}else{
|
935
|
+
while(child){
|
936
|
+
serializeToString(child,buf);
|
937
|
+
child = child.nextSibling;
|
938
|
+
}
|
939
|
+
}
|
940
|
+
buf.push('</',nodeName,'>');
|
941
|
+
}else{
|
942
|
+
buf.push('/>');
|
943
|
+
}
|
944
|
+
return;
|
945
|
+
case DOCUMENT_NODE:
|
946
|
+
case DOCUMENT_FRAGMENT_NODE:
|
947
|
+
var child = node.firstChild;
|
948
|
+
while(child){
|
949
|
+
serializeToString(child,buf);
|
950
|
+
child = child.nextSibling;
|
951
|
+
}
|
952
|
+
return;
|
953
|
+
case ATTRIBUTE_NODE:
|
954
|
+
return buf.push(' ',node.name,'="',node.value.replace(/[<&"]/g,_xmlEncoder),'"');
|
955
|
+
case TEXT_NODE:
|
956
|
+
return buf.push(node.data.replace(/[<&]/g,_xmlEncoder));
|
957
|
+
case CDATA_SECTION_NODE:
|
958
|
+
return buf.push( '<![CDATA[',node.data,']]>');
|
959
|
+
case COMMENT_NODE:
|
960
|
+
return buf.push( "<!--",node.data,"-->");
|
961
|
+
case DOCUMENT_TYPE_NODE:
|
962
|
+
var pubid = node.publicId;
|
963
|
+
var sysid = node.systemId;
|
964
|
+
buf.push('<!DOCTYPE ',node.name);
|
965
|
+
if(pubid){
|
966
|
+
buf.push(' PUBLIC "',pubid);
|
967
|
+
if (sysid && sysid!='.') {
|
968
|
+
buf.push( '" "',sysid);
|
969
|
+
}
|
970
|
+
buf.push('">');
|
971
|
+
}else if(sysid && sysid!='.'){
|
972
|
+
buf.push(' SYSTEM "',sysid,'">');
|
973
|
+
}else{
|
974
|
+
var sub = node.internalSubset;
|
975
|
+
if(sub){
|
976
|
+
buf.push(" [",sub,"]");
|
977
|
+
}
|
978
|
+
buf.push(">");
|
979
|
+
}
|
980
|
+
return;
|
981
|
+
case PROCESSING_INSTRUCTION_NODE:
|
982
|
+
return buf.push( "<?",node.target," ",node.data,"?>");
|
983
|
+
case ENTITY_REFERENCE_NODE:
|
984
|
+
return buf.push( '&',node.nodeName,';');
|
985
|
+
//case ENTITY_NODE:
|
986
|
+
//case NOTATION_NODE:
|
987
|
+
default:
|
988
|
+
buf.push('??',node.nodeName);
|
989
|
+
}
|
990
|
+
}
|
991
|
+
function importNode(doc,node,deep){
|
992
|
+
var node2;
|
993
|
+
switch (node.nodeType) {
|
994
|
+
case ELEMENT_NODE:
|
995
|
+
node2 = node.cloneNode(false);
|
996
|
+
node2.ownerDocument = doc;
|
997
|
+
//var attrs = node2.attributes;
|
998
|
+
//var len = attrs.length;
|
999
|
+
//for(var i=0;i<len;i++){
|
1000
|
+
//node2.setAttributeNodeNS(importNode(doc,attrs.item(i),deep));
|
1001
|
+
//}
|
1002
|
+
case DOCUMENT_FRAGMENT_NODE:
|
1003
|
+
break;
|
1004
|
+
case ATTRIBUTE_NODE:
|
1005
|
+
deep = true;
|
1006
|
+
break;
|
1007
|
+
//case ENTITY_REFERENCE_NODE:
|
1008
|
+
//case PROCESSING_INSTRUCTION_NODE:
|
1009
|
+
////case TEXT_NODE:
|
1010
|
+
//case CDATA_SECTION_NODE:
|
1011
|
+
//case COMMENT_NODE:
|
1012
|
+
// deep = false;
|
1013
|
+
// break;
|
1014
|
+
//case DOCUMENT_NODE:
|
1015
|
+
//case DOCUMENT_TYPE_NODE:
|
1016
|
+
//cannot be imported.
|
1017
|
+
//case ENTITY_NODE:
|
1018
|
+
//case NOTATION_NODE:
|
1019
|
+
//can not hit in level3
|
1020
|
+
//default:throw e;
|
1021
|
+
}
|
1022
|
+
if(!node2){
|
1023
|
+
node2 = node.cloneNode(false);//false
|
1024
|
+
}
|
1025
|
+
node2.ownerDocument = doc;
|
1026
|
+
node2.parentNode = null;
|
1027
|
+
if(deep){
|
1028
|
+
var child = node.firstChild;
|
1029
|
+
while(child){
|
1030
|
+
node2.appendChild(importNode(doc,child,deep));
|
1031
|
+
child = child.nextSibling;
|
1032
|
+
}
|
1033
|
+
}
|
1034
|
+
return node2;
|
1035
|
+
}
|
1036
|
+
//
|
1037
|
+
//var _relationMap = {firstChild:1,lastChild:1,previousSibling:1,nextSibling:1,
|
1038
|
+
// attributes:1,childNodes:1,parentNode:1,documentElement:1,doctype,};
|
1039
|
+
function cloneNode(doc,node,deep){
|
1040
|
+
var node2 = new node.constructor();
|
1041
|
+
for(var n in node){
|
1042
|
+
var v = node[n];
|
1043
|
+
if(typeof v != 'object' ){
|
1044
|
+
if(v != node2[n]){
|
1045
|
+
node2[n] = v;
|
1046
|
+
}
|
1047
|
+
}
|
1048
|
+
}
|
1049
|
+
if(node.childNodes){
|
1050
|
+
node2.childNodes = new NodeList();
|
1051
|
+
}
|
1052
|
+
node2.ownerDocument = doc;
|
1053
|
+
switch (node2.nodeType) {
|
1054
|
+
case ELEMENT_NODE:
|
1055
|
+
var attrs = node.attributes;
|
1056
|
+
var attrs2 = node2.attributes = new NamedNodeMap();
|
1057
|
+
var len = attrs.length
|
1058
|
+
attrs2._ownerElement = node2;
|
1059
|
+
for(var i=0;i<len;i++){
|
1060
|
+
node2.setAttributeNode(cloneNode(doc,attrs.item(i),true));
|
1061
|
+
}
|
1062
|
+
break;;
|
1063
|
+
case ATTRIBUTE_NODE:
|
1064
|
+
deep = true;
|
1065
|
+
}
|
1066
|
+
if(deep){
|
1067
|
+
var child = node.firstChild;
|
1068
|
+
while(child){
|
1069
|
+
node2.appendChild(cloneNode(doc,child,deep));
|
1070
|
+
child = child.nextSibling;
|
1071
|
+
}
|
1072
|
+
}
|
1073
|
+
return node2;
|
1074
|
+
}
|
1075
|
+
|
1076
|
+
function __set__(object,key,value){
|
1077
|
+
object[key] = value
|
1078
|
+
}
|
1079
|
+
//do dynamic
|
1080
|
+
try{
|
1081
|
+
if(Object.defineProperty){
|
1082
|
+
Object.defineProperty(LiveNodeList.prototype,'length',{
|
1083
|
+
get:function(){
|
1084
|
+
_updateLiveList(this);
|
1085
|
+
return this.$$length;
|
1086
|
+
}
|
1087
|
+
});
|
1088
|
+
Object.defineProperty(Node.prototype,'textContent',{
|
1089
|
+
get:function(){
|
1090
|
+
return getTextContent(this);
|
1091
|
+
},
|
1092
|
+
set:function(data){
|
1093
|
+
switch(this.nodeType){
|
1094
|
+
case 1:
|
1095
|
+
case 11:
|
1096
|
+
while(this.firstChild){
|
1097
|
+
this.removeChild(this.firstChild);
|
1098
|
+
}
|
1099
|
+
if(data || String(data)){
|
1100
|
+
this.appendChild(this.ownerDocument.createTextNode(data));
|
1101
|
+
}
|
1102
|
+
break;
|
1103
|
+
default:
|
1104
|
+
//TODO:
|
1105
|
+
this.data = data;
|
1106
|
+
this.value = value;
|
1107
|
+
this.nodeValue = data;
|
1108
|
+
}
|
1109
|
+
}
|
1110
|
+
})
|
1111
|
+
|
1112
|
+
function getTextContent(node){
|
1113
|
+
switch(node.nodeType){
|
1114
|
+
case 1:
|
1115
|
+
case 11:
|
1116
|
+
var buf = [];
|
1117
|
+
node = node.firstChild;
|
1118
|
+
while(node){
|
1119
|
+
if(node.nodeType!==7 && node.nodeType !==8){
|
1120
|
+
buf.push(getTextContent(node));
|
1121
|
+
}
|
1122
|
+
node = node.nextSibling;
|
1123
|
+
}
|
1124
|
+
return buf.join('');
|
1125
|
+
default:
|
1126
|
+
return node.nodeValue;
|
1127
|
+
}
|
1128
|
+
}
|
1129
|
+
__set__ = function(object,key,value){
|
1130
|
+
//console.log(value)
|
1131
|
+
object['$$'+key] = value
|
1132
|
+
}
|
1133
|
+
}
|
1134
|
+
}catch(e){//ie8
|
1135
|
+
}
|
1136
|
+
|
1137
|
+
return DOMImplementation;
|
1138
|
+
});
|