ace-oqc 1.4.13 → 1.4.14
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/index.js +71 -0
- package/package.json +3 -3
- package/src-noconflict/ace.js +0 -21402
- package/src-noconflict/ext-beautify.js +0 -331
- package/src-noconflict/ext-elastic_tabstops_lite.js +0 -277
- package/src-noconflict/ext-emmet.js +0 -1331
- package/src-noconflict/ext-error_marker.js +0 -9
- package/src-noconflict/ext-keybinding_menu.js +0 -193
- package/src-noconflict/ext-language_tools.js +0 -2166
- package/src-noconflict/ext-linking.js +0 -64
- package/src-noconflict/ext-modelist.js +0 -248
- package/src-noconflict/ext-options.js +0 -799
- package/src-noconflict/ext-prompt.js +0 -2806
- package/src-noconflict/ext-rtl.js +0 -122
- package/src-noconflict/ext-searchbox.js +0 -514
- package/src-noconflict/ext-settings_menu.js +0 -820
- package/src-noconflict/ext-spellcheck.js +0 -73
- package/src-noconflict/ext-split.js +0 -207
- package/src-noconflict/ext-static_highlight.js +0 -229
- package/src-noconflict/ext-statusbar.js +0 -56
- package/src-noconflict/ext-textarea.js +0 -430
- package/src-noconflict/ext-themelist.js +0 -67
- package/src-noconflict/ext-whitespace.js +0 -213
- package/src-noconflict/keybinding-emacs.js +0 -1169
- package/src-noconflict/keybinding-sublime.js +0 -422
- package/src-noconflict/keybinding-vim.js +0 -6198
- package/src-noconflict/mode-abap.js +0 -221
- package/src-noconflict/mode-abc.js +0 -271
- package/src-noconflict/mode-actionscript.js +0 -275
- package/src-noconflict/mode-ada.js +0 -137
- package/src-noconflict/mode-apache_conf.js +0 -363
- package/src-noconflict/mode-apex.js +0 -457
- package/src-noconflict/mode-applescript.js +0 -278
- package/src-noconflict/mode-aql.js +0 -102
- package/src-noconflict/mode-asciidoc.js +0 -349
- package/src-noconflict/mode-asl.js +0 -422
- package/src-noconflict/mode-assembly_x86.js +0 -193
- package/src-noconflict/mode-autohotkey.js +0 -244
- package/src-noconflict/mode-batchfile.js +0 -230
- package/src-noconflict/mode-c9search.js +0 -293
- package/src-noconflict/mode-c_cpp.js +0 -503
- package/src-noconflict/mode-cirru.js +0 -210
- package/src-noconflict/mode-clojure.js +0 -315
- package/src-noconflict/mode-cobol.js +0 -101
- package/src-noconflict/mode-coffee.js +0 -400
- package/src-noconflict/mode-coldfusion.js +0 -2596
- package/src-noconflict/mode-crystal.js +0 -642
- package/src-noconflict/mode-csharp.js +0 -502
- package/src-noconflict/mode-csound_document.js +0 -4105
- package/src-noconflict/mode-csound_orchestra.js +0 -3035
- package/src-noconflict/mode-csound_score.js +0 -462
- package/src-noconflict/mode-csp.js +0 -59
- package/src-noconflict/mode-css.js +0 -720
- package/src-noconflict/mode-curly.js +0 -2564
- package/src-noconflict/mode-d.js +0 -520
- package/src-noconflict/mode-dart.js +0 -715
- package/src-noconflict/mode-diff.js +0 -147
- package/src-noconflict/mode-django.js +0 -2595
- package/src-noconflict/mode-dockerfile.js +0 -500
- package/src-noconflict/mode-dot.js +0 -417
- package/src-noconflict/mode-drools.js +0 -498
- package/src-noconflict/mode-edifact.js +0 -166
- package/src-noconflict/mode-eiffel.js +0 -135
- package/src-noconflict/mode-ejs.js +0 -3533
- package/src-noconflict/mode-elixir.js +0 -501
- package/src-noconflict/mode-elm.js +0 -306
- package/src-noconflict/mode-erlang.js +0 -1010
- package/src-noconflict/mode-forth.js +0 -297
- package/src-noconflict/mode-fortran.js +0 -430
- package/src-noconflict/mode-fsharp.js +0 -316
- package/src-noconflict/mode-fsl.js +0 -259
- package/src-noconflict/mode-ftl.js +0 -1193
- package/src-noconflict/mode-gcode.js +0 -93
- package/src-noconflict/mode-gherkin.js +0 -168
- package/src-noconflict/mode-gitignore.js +0 -59
- package/src-noconflict/mode-glsl.js +0 -580
- package/src-noconflict/mode-gobstones.js +0 -1090
- package/src-noconflict/mode-golang.js +0 -413
- package/src-noconflict/mode-graphqlschema.js +0 -214
- package/src-noconflict/mode-groovy.js +0 -989
- package/src-noconflict/mode-haml.js +0 -1873
- package/src-noconflict/mode-handlebars.js +0 -2622
- package/src-noconflict/mode-haskell.js +0 -380
- package/src-noconflict/mode-haskell_cabal.js +0 -141
- package/src-noconflict/mode-haxe.js +0 -386
- package/src-noconflict/mode-hjson.js +0 -353
- package/src-noconflict/mode-html.js +0 -2509
- package/src-noconflict/mode-html_elixir.js +0 -3088
- package/src-noconflict/mode-html_ruby.js +0 -3550
- package/src-noconflict/mode-ini.js +0 -162
- package/src-noconflict/mode-io.js +0 -248
- package/src-noconflict/mode-jack.js +0 -346
- package/src-noconflict/mode-jade.js +0 -2025
- package/src-noconflict/mode-java.js +0 -1038
- package/src-noconflict/mode-javascript.js +0 -798
- package/src-noconflict/mode-json.js +0 -329
- package/src-noconflict/mode-jsoniq.js +0 -2632
- package/src-noconflict/mode-jsp.js +0 -1433
- package/src-noconflict/mode-jssm.js +0 -325
- package/src-noconflict/mode-jsx.js +0 -411
- package/src-noconflict/mode-julia.js +0 -303
- package/src-noconflict/mode-kotlin.js +0 -797
- package/src-noconflict/mode-latex.js +0 -296
- package/src-noconflict/mode-less.js +0 -839
- package/src-noconflict/mode-liquid.js +0 -2742
- package/src-noconflict/mode-lisp.js +0 -112
- package/src-noconflict/mode-livescript.js +0 -279
- package/src-noconflict/mode-logiql.js +0 -317
- package/src-noconflict/mode-logtalk.js +0 -352
- package/src-noconflict/mode-lsl.js +0 -343
- package/src-noconflict/mode-lua.js +0 -452
- package/src-noconflict/mode-luapage.js +0 -3028
- package/src-noconflict/mode-lucene.js +0 -154
- package/src-noconflict/mode-makefile.js +0 -412
- package/src-noconflict/mode-markdown.js +0 -3194
- package/src-noconflict/mode-mask.js +0 -1803
- package/src-noconflict/mode-matlab.js +0 -263
- package/src-noconflict/mode-maze.js +0 -292
- package/src-noconflict/mode-mel.js +0 -263
- package/src-noconflict/mode-mixal.js +0 -122
- package/src-noconflict/mode-mushcode.js +0 -681
- package/src-noconflict/mode-mysql.js +0 -167
- package/src-noconflict/mode-nginx.js +0 -298
- package/src-noconflict/mode-nim.js +0 -363
- package/src-noconflict/mode-nix.js +0 -647
- package/src-noconflict/mode-nsis.js +0 -312
- package/src-noconflict/mode-objectivec.js +0 -740
- package/src-noconflict/mode-ocaml.js +0 -421
- package/src-noconflict/mode-pascal.js +0 -223
- package/src-noconflict/mode-perl.js +0 -381
- package/src-noconflict/mode-pgsql.js +0 -1743
- package/src-noconflict/mode-php.js +0 -13110
- package/src-noconflict/mode-php_laravel_blade.js +0 -13311
- package/src-noconflict/mode-pig.js +0 -310
- package/src-noconflict/mode-plain_text.js +0 -32
- package/src-noconflict/mode-powershell.js +0 -418
- package/src-noconflict/mode-praat.js +0 -478
- package/src-noconflict/mode-prolog.js +0 -371
- package/src-noconflict/mode-properties.js +0 -80
- package/src-noconflict/mode-protobuf.js +0 -593
- package/src-noconflict/mode-puppet.js +0 -368
- package/src-noconflict/mode-python.js +0 -508
- package/src-noconflict/mode-r.js +0 -312
- package/src-noconflict/mode-razor.js +0 -2875
- package/src-noconflict/mode-rdoc.js +0 -243
- package/src-noconflict/mode-red.js +0 -450
- package/src-noconflict/mode-redshift.js +0 -360
- package/src-noconflict/mode-rhtml.js +0 -2808
- package/src-noconflict/mode-rst.js +0 -257
- package/src-noconflict/mode-ruby.js +0 -1003
- package/src-noconflict/mode-rust.js +0 -282
- package/src-noconflict/mode-sass.js +0 -529
- package/src-noconflict/mode-scad.js +0 -414
- package/src-noconflict/mode-scala.js +0 -984
- package/src-noconflict/mode-scheme.js +0 -232
- package/src-noconflict/mode-scss.js +0 -873
- package/src-noconflict/mode-sh.js +0 -449
- package/src-noconflict/mode-sjs.js +0 -1015
- package/src-noconflict/mode-slim.js +0 -5240
- package/src-noconflict/mode-smarty.js +0 -2635
- package/src-noconflict/mode-snippets.js +0 -207
- package/src-noconflict/mode-soy_template.js +0 -2848
- package/src-noconflict/mode-space.js +0 -167
- package/src-noconflict/mode-sparql.js +0 -320
- package/src-noconflict/mode-sql.js +0 -271
- package/src-noconflict/mode-sqlserver.js +0 -445
- package/src-noconflict/mode-stylus.js +0 -472
- package/src-noconflict/mode-svg.js +0 -1582
- package/src-noconflict/mode-swift.js +0 -395
- package/src-noconflict/mode-tcl.js +0 -387
- package/src-noconflict/mode-terraform.js +0 -400
- package/src-noconflict/mode-tex.js +0 -160
- package/src-noconflict/mode-text.js +0 -9
- package/src-noconflict/mode-textile.js +0 -150
- package/src-noconflict/mode-toml.js +0 -153
- package/src-noconflict/mode-tsx.js +0 -888
- package/src-noconflict/mode-turtle.js +0 -296
- package/src-noconflict/mode-twig.js +0 -2693
- package/src-noconflict/mode-typescript.js +0 -869
- package/src-noconflict/mode-vala.js +0 -677
- package/src-noconflict/mode-vbscript.js +0 -635
- package/src-noconflict/mode-velocity.js +0 -2792
- package/src-noconflict/mode-verilog.js +0 -118
- package/src-noconflict/mode-vhdl.js +0 -116
- package/src-noconflict/mode-visualforce.js +0 -2640
- package/src-noconflict/mode-wollok.js +0 -914
- package/src-noconflict/mode-xml.js +0 -676
- package/src-noconflict/mode-xquery.js +0 -2644
- package/src-noconflict/mode-yaml.js +0 -330
- package/src-noconflict/mode-zeek.js +0 -539
- package/src-noconflict/qurator-mode.js +0 -120
- package/src-noconflict/qurator-worker.js +0 -91
- package/src-noconflict/snippets/abap.js +0 -9
- package/src-noconflict/snippets/abc.js +0 -45
- package/src-noconflict/snippets/actionscript.js +0 -171
- package/src-noconflict/snippets/ada.js +0 -9
- package/src-noconflict/snippets/apache_conf.js +0 -9
- package/src-noconflict/snippets/apex.js +0 -9
- package/src-noconflict/snippets/applescript.js +0 -9
- package/src-noconflict/snippets/aql.js +0 -9
- package/src-noconflict/snippets/asciidoc.js +0 -9
- package/src-noconflict/snippets/asl.js +0 -9
- package/src-noconflict/snippets/assembly_x86.js +0 -9
- package/src-noconflict/snippets/autohotkey.js +0 -9
- package/src-noconflict/snippets/batchfile.js +0 -9
- package/src-noconflict/snippets/c9search.js +0 -9
- package/src-noconflict/snippets/c_cpp.js +0 -145
- package/src-noconflict/snippets/cirru.js +0 -9
- package/src-noconflict/snippets/clojure.js +0 -104
- package/src-noconflict/snippets/cobol.js +0 -9
- package/src-noconflict/snippets/coffee.js +0 -109
- package/src-noconflict/snippets/coldfusion.js +0 -9
- package/src-noconflict/snippets/crystal.js +0 -9
- package/src-noconflict/snippets/csharp.js +0 -9
- package/src-noconflict/snippets/csound_document.js +0 -24
- package/src-noconflict/snippets/csound_orchestra.js +0 -61
- package/src-noconflict/snippets/csound_score.js +0 -9
- package/src-noconflict/snippets/csp.js +0 -9
- package/src-noconflict/snippets/css.js +0 -981
- package/src-noconflict/snippets/curly.js +0 -9
- package/src-noconflict/snippets/d.js +0 -9
- package/src-noconflict/snippets/dart.js +0 -97
- package/src-noconflict/snippets/diff.js +0 -25
- package/src-noconflict/snippets/django.js +0 -122
- package/src-noconflict/snippets/dockerfile.js +0 -9
- package/src-noconflict/snippets/dot.js +0 -9
- package/src-noconflict/snippets/drools.js +0 -33
- package/src-noconflict/snippets/edifact.js +0 -254
- package/src-noconflict/snippets/eiffel.js +0 -9
- package/src-noconflict/snippets/ejs.js +0 -9
- package/src-noconflict/snippets/elixir.js +0 -9
- package/src-noconflict/snippets/elm.js +0 -9
- package/src-noconflict/snippets/erlang.js +0 -174
- package/src-noconflict/snippets/forth.js +0 -9
- package/src-noconflict/snippets/fortran.js +0 -9
- package/src-noconflict/snippets/fsharp.js +0 -9
- package/src-noconflict/snippets/fsl.js +0 -14
- package/src-noconflict/snippets/ftl.js +0 -9
- package/src-noconflict/snippets/gcode.js +0 -9
- package/src-noconflict/snippets/gherkin.js +0 -9
- package/src-noconflict/snippets/gitignore.js +0 -9
- package/src-noconflict/snippets/glsl.js +0 -9
- package/src-noconflict/snippets/gobstones.js +0 -1718
- package/src-noconflict/snippets/golang.js +0 -9
- package/src-noconflict/snippets/graphqlschema.js +0 -46
- package/src-noconflict/snippets/groovy.js +0 -9
- package/src-noconflict/snippets/haml.js +0 -34
- package/src-noconflict/snippets/handlebars.js +0 -9
- package/src-noconflict/snippets/haskell.js +0 -96
- package/src-noconflict/snippets/haskell_cabal.js +0 -9
- package/src-noconflict/snippets/haxe.js +0 -9
- package/src-noconflict/snippets/hjson.js +0 -9
- package/src-noconflict/snippets/html.js +0 -867
- package/src-noconflict/snippets/html_elixir.js +0 -9
- package/src-noconflict/snippets/html_ruby.js +0 -9
- package/src-noconflict/snippets/ini.js +0 -9
- package/src-noconflict/snippets/io.js +0 -76
- package/src-noconflict/snippets/jack.js +0 -9
- package/src-noconflict/snippets/jade.js +0 -9
- package/src-noconflict/snippets/java.js +0 -254
- package/src-noconflict/snippets/javascript.js +0 -209
- package/src-noconflict/snippets/json.js +0 -9
- package/src-noconflict/snippets/jsoniq.js +0 -75
- package/src-noconflict/snippets/jsp.js +0 -113
- package/src-noconflict/snippets/jssm.js +0 -9
- package/src-noconflict/snippets/jsx.js +0 -9
- package/src-noconflict/snippets/julia.js +0 -9
- package/src-noconflict/snippets/kotlin.js +0 -9
- package/src-noconflict/snippets/latex.js +0 -9
- package/src-noconflict/snippets/less.js +0 -9
- package/src-noconflict/snippets/liquid.js +0 -895
- package/src-noconflict/snippets/lisp.js +0 -9
- package/src-noconflict/snippets/livescript.js +0 -9
- package/src-noconflict/snippets/logiql.js +0 -9
- package/src-noconflict/snippets/logtalk.js +0 -9
- package/src-noconflict/snippets/lsl.js +0 -1246
- package/src-noconflict/snippets/lua.js +0 -35
- package/src-noconflict/snippets/luapage.js +0 -9
- package/src-noconflict/snippets/lucene.js +0 -9
- package/src-noconflict/snippets/makefile.js +0 -18
- package/src-noconflict/snippets/markdown.js +0 -102
- package/src-noconflict/snippets/mask.js +0 -9
- package/src-noconflict/snippets/matlab.js +0 -9
- package/src-noconflict/snippets/maze.js +0 -23
- package/src-noconflict/snippets/mel.js +0 -9
- package/src-noconflict/snippets/mixal.js +0 -9
- package/src-noconflict/snippets/mushcode.js +0 -9
- package/src-noconflict/snippets/mysql.js +0 -9
- package/src-noconflict/snippets/nginx.js +0 -9
- package/src-noconflict/snippets/nim.js +0 -9
- package/src-noconflict/snippets/nix.js +0 -9
- package/src-noconflict/snippets/nsis.js +0 -9
- package/src-noconflict/snippets/objectivec.js +0 -9
- package/src-noconflict/snippets/ocaml.js +0 -9
- package/src-noconflict/snippets/pascal.js +0 -9
- package/src-noconflict/snippets/perl.js +0 -361
- package/src-noconflict/snippets/pgsql.js +0 -9
- package/src-noconflict/snippets/php.js +0 -397
- package/src-noconflict/snippets/php_laravel_blade.js +0 -9
- package/src-noconflict/snippets/pig.js +0 -9
- package/src-noconflict/snippets/plain_text.js +0 -9
- package/src-noconflict/snippets/powershell.js +0 -9
- package/src-noconflict/snippets/praat.js +0 -9
- package/src-noconflict/snippets/prolog.js +0 -9
- package/src-noconflict/snippets/properties.js +0 -9
- package/src-noconflict/snippets/protobuf.js +0 -9
- package/src-noconflict/snippets/puppet.js +0 -9
- package/src-noconflict/snippets/python.js +0 -172
- package/src-noconflict/snippets/r.js +0 -135
- package/src-noconflict/snippets/razor.js +0 -17
- package/src-noconflict/snippets/rdoc.js +0 -9
- package/src-noconflict/snippets/red.js +0 -9
- package/src-noconflict/snippets/redshift.js +0 -9
- package/src-noconflict/snippets/rhtml.js +0 -9
- package/src-noconflict/snippets/rst.js +0 -36
- package/src-noconflict/snippets/ruby.js +0 -942
- package/src-noconflict/snippets/rust.js +0 -9
- package/src-noconflict/snippets/sass.js +0 -9
- package/src-noconflict/snippets/scad.js +0 -9
- package/src-noconflict/snippets/scala.js +0 -9
- package/src-noconflict/snippets/scheme.js +0 -9
- package/src-noconflict/snippets/scss.js +0 -9
- package/src-noconflict/snippets/sh.js +0 -97
- package/src-noconflict/snippets/sjs.js +0 -9
- package/src-noconflict/snippets/slim.js +0 -9
- package/src-noconflict/snippets/smarty.js +0 -9
- package/src-noconflict/snippets/snippets.js +0 -23
- package/src-noconflict/snippets/soy_template.js +0 -9
- package/src-noconflict/snippets/space.js +0 -9
- package/src-noconflict/snippets/sparql.js +0 -9
- package/src-noconflict/snippets/sql.js +0 -40
- package/src-noconflict/snippets/sqlserver.js +0 -83
- package/src-noconflict/snippets/stylus.js +0 -9
- package/src-noconflict/snippets/svg.js +0 -9
- package/src-noconflict/snippets/swift.js +0 -9
- package/src-noconflict/snippets/tcl.js +0 -106
- package/src-noconflict/snippets/terraform.js +0 -9
- package/src-noconflict/snippets/tex.js +0 -204
- package/src-noconflict/snippets/text.js +0 -9
- package/src-noconflict/snippets/textile.js +0 -44
- package/src-noconflict/snippets/toml.js +0 -9
- package/src-noconflict/snippets/tsx.js +0 -9
- package/src-noconflict/snippets/turtle.js +0 -9
- package/src-noconflict/snippets/twig.js +0 -9
- package/src-noconflict/snippets/typescript.js +0 -9
- package/src-noconflict/snippets/vala.js +0 -200
- package/src-noconflict/snippets/vbscript.js +0 -9
- package/src-noconflict/snippets/velocity.js +0 -43
- package/src-noconflict/snippets/verilog.js +0 -9
- package/src-noconflict/snippets/vhdl.js +0 -9
- package/src-noconflict/snippets/visualforce.js +0 -9
- package/src-noconflict/snippets/wollok.js +0 -98
- package/src-noconflict/snippets/xml.js +0 -9
- package/src-noconflict/snippets/xquery.js +0 -75
- package/src-noconflict/snippets/yaml.js +0 -9
- package/src-noconflict/snippets/zeek.js +0 -9
- package/src-noconflict/theme-ambiance.js +0 -185
- package/src-noconflict/theme-chaos.js +0 -163
- package/src-noconflict/theme-chrome.js +0 -135
- package/src-noconflict/theme-clouds.js +0 -102
- package/src-noconflict/theme-clouds_midnight.js +0 -103
- package/src-noconflict/theme-cobalt.js +0 -120
- package/src-noconflict/theme-crimson_editor.js +0 -125
- package/src-noconflict/theme-dawn.js +0 -115
- package/src-noconflict/theme-dracula.js +0 -135
- package/src-noconflict/theme-dreamweaver.js +0 -148
- package/src-noconflict/theme-eclipse.js +0 -105
- package/src-noconflict/theme-github.js +0 -110
- package/src-noconflict/theme-gob.js +0 -119
- package/src-noconflict/theme-gruvbox.js +0 -89
- package/src-noconflict/theme-idle_fingers.js +0 -103
- package/src-noconflict/theme-iplastic.js +0 -128
- package/src-noconflict/theme-katzenmilch.js +0 -128
- package/src-noconflict/theme-kr_theme.js +0 -111
- package/src-noconflict/theme-kuroir.js +0 -68
- package/src-noconflict/theme-merbivore.js +0 -102
- package/src-noconflict/theme-merbivore_soft.js +0 -103
- package/src-noconflict/theme-mono_industrial.js +0 -114
- package/src-noconflict/theme-monokai.js +0 -112
- package/src-noconflict/theme-pastel_on_dark.js +0 -115
- package/src-noconflict/theme-solarized_dark.js +0 -95
- package/src-noconflict/theme-solarized_light.js +0 -98
- package/src-noconflict/theme-sqlserver.js +0 -145
- package/src-noconflict/theme-terminal.js +0 -121
- package/src-noconflict/theme-textmate.js +0 -137
- package/src-noconflict/theme-tomorrow.js +0 -115
- package/src-noconflict/theme-tomorrow_night.js +0 -115
- package/src-noconflict/theme-tomorrow_night_blue.js +0 -113
- package/src-noconflict/theme-tomorrow_night_bright.js +0 -128
- package/src-noconflict/theme-tomorrow_night_eighties.js +0 -115
- package/src-noconflict/theme-twilight.js +0 -116
- package/src-noconflict/theme-vibrant_ink.js +0 -101
- package/src-noconflict/theme-xcode.js +0 -95
- package/src-noconflict/worker-coffee.js +0 -1470
- package/src-noconflict/worker-css.js +0 -9000
- package/src-noconflict/worker-html.js +0 -10922
- package/src-noconflict/worker-javascript.js +0 -15001
- package/src-noconflict/worker-json.js +0 -1715
- package/src-noconflict/worker-lua.js +0 -3608
- package/src-noconflict/worker-php.js +0 -3687
- package/src-noconflict/worker-xml.js +0 -3208
- package/src-noconflict/worker-xquery.js +0 -57668
|
@@ -1,676 +0,0 @@
|
|
|
1
|
-
ace.define("ace/mode/xml_highlight_rules",["require","exports","module","ace/lib/oop","ace/mode/text_highlight_rules"], function(require, exports, module) {
|
|
2
|
-
"use strict";
|
|
3
|
-
|
|
4
|
-
var oop = require("../lib/oop");
|
|
5
|
-
var TextHighlightRules = require("./text_highlight_rules").TextHighlightRules;
|
|
6
|
-
|
|
7
|
-
var XmlHighlightRules = function(normalize) {
|
|
8
|
-
var tagRegex = "[_:a-zA-Z\xc0-\uffff][-_:.a-zA-Z0-9\xc0-\uffff]*";
|
|
9
|
-
|
|
10
|
-
this.$rules = {
|
|
11
|
-
start : [
|
|
12
|
-
{token : "string.cdata.xml", regex : "<\\!\\[CDATA\\[", next : "cdata"},
|
|
13
|
-
{
|
|
14
|
-
token : ["punctuation.instruction.xml", "keyword.instruction.xml"],
|
|
15
|
-
regex : "(<\\?)(" + tagRegex + ")", next : "processing_instruction"
|
|
16
|
-
},
|
|
17
|
-
{token : "comment.start.xml", regex : "<\\!--", next : "comment"},
|
|
18
|
-
{
|
|
19
|
-
token : ["xml-pe.doctype.xml", "xml-pe.doctype.xml"],
|
|
20
|
-
regex : "(<\\!)(DOCTYPE)(?=[\\s])", next : "doctype", caseInsensitive: true
|
|
21
|
-
},
|
|
22
|
-
{include : "tag"},
|
|
23
|
-
{token : "text.end-tag-open.xml", regex: "</"},
|
|
24
|
-
{token : "text.tag-open.xml", regex: "<"},
|
|
25
|
-
{include : "reference"},
|
|
26
|
-
{defaultToken : "text.xml"}
|
|
27
|
-
],
|
|
28
|
-
|
|
29
|
-
processing_instruction : [{
|
|
30
|
-
token : "entity.other.attribute-name.decl-attribute-name.xml",
|
|
31
|
-
regex : tagRegex
|
|
32
|
-
}, {
|
|
33
|
-
token : "keyword.operator.decl-attribute-equals.xml",
|
|
34
|
-
regex : "="
|
|
35
|
-
}, {
|
|
36
|
-
include: "whitespace"
|
|
37
|
-
}, {
|
|
38
|
-
include: "string"
|
|
39
|
-
}, {
|
|
40
|
-
token : "punctuation.xml-decl.xml",
|
|
41
|
-
regex : "\\?>",
|
|
42
|
-
next : "start"
|
|
43
|
-
}],
|
|
44
|
-
|
|
45
|
-
doctype : [
|
|
46
|
-
{include : "whitespace"},
|
|
47
|
-
{include : "string"},
|
|
48
|
-
{token : "xml-pe.doctype.xml", regex : ">", next : "start"},
|
|
49
|
-
{token : "xml-pe.xml", regex : "[-_a-zA-Z0-9:]+"},
|
|
50
|
-
{token : "punctuation.int-subset", regex : "\\[", push : "int_subset"}
|
|
51
|
-
],
|
|
52
|
-
|
|
53
|
-
int_subset : [{
|
|
54
|
-
token : "text.xml",
|
|
55
|
-
regex : "\\s+"
|
|
56
|
-
}, {
|
|
57
|
-
token: "punctuation.int-subset.xml",
|
|
58
|
-
regex: "]",
|
|
59
|
-
next: "pop"
|
|
60
|
-
}, {
|
|
61
|
-
token : ["punctuation.markup-decl.xml", "keyword.markup-decl.xml"],
|
|
62
|
-
regex : "(<\\!)(" + tagRegex + ")",
|
|
63
|
-
push : [{
|
|
64
|
-
token : "text",
|
|
65
|
-
regex : "\\s+"
|
|
66
|
-
},
|
|
67
|
-
{
|
|
68
|
-
token : "punctuation.markup-decl.xml",
|
|
69
|
-
regex : ">",
|
|
70
|
-
next : "pop"
|
|
71
|
-
},
|
|
72
|
-
{include : "string"}]
|
|
73
|
-
}],
|
|
74
|
-
|
|
75
|
-
cdata : [
|
|
76
|
-
{token : "string.cdata.xml", regex : "\\]\\]>", next : "start"},
|
|
77
|
-
{token : "text.xml", regex : "\\s+"},
|
|
78
|
-
{token : "text.xml", regex : "(?:[^\\]]|\\](?!\\]>))+"}
|
|
79
|
-
],
|
|
80
|
-
|
|
81
|
-
comment : [
|
|
82
|
-
{token : "comment.end.xml", regex : "-->", next : "start"},
|
|
83
|
-
{defaultToken : "comment.xml"}
|
|
84
|
-
],
|
|
85
|
-
|
|
86
|
-
reference : [{
|
|
87
|
-
token : "constant.language.escape.reference.xml",
|
|
88
|
-
regex : "(?:&#[0-9]+;)|(?:&#x[0-9a-fA-F]+;)|(?:&[a-zA-Z0-9_:\\.-]+;)"
|
|
89
|
-
}],
|
|
90
|
-
|
|
91
|
-
attr_reference : [{
|
|
92
|
-
token : "constant.language.escape.reference.attribute-value.xml",
|
|
93
|
-
regex : "(?:&#[0-9]+;)|(?:&#x[0-9a-fA-F]+;)|(?:&[a-zA-Z0-9_:\\.-]+;)"
|
|
94
|
-
}],
|
|
95
|
-
|
|
96
|
-
tag : [{
|
|
97
|
-
token : ["meta.tag.punctuation.tag-open.xml", "meta.tag.punctuation.end-tag-open.xml", "meta.tag.tag-name.xml"],
|
|
98
|
-
regex : "(?:(<)|(</))((?:" + tagRegex + ":)?" + tagRegex + ")",
|
|
99
|
-
next: [
|
|
100
|
-
{include : "attributes"},
|
|
101
|
-
{token : "meta.tag.punctuation.tag-close.xml", regex : "/?>", next : "start"}
|
|
102
|
-
]
|
|
103
|
-
}],
|
|
104
|
-
|
|
105
|
-
tag_whitespace : [
|
|
106
|
-
{token : "text.tag-whitespace.xml", regex : "\\s+"}
|
|
107
|
-
],
|
|
108
|
-
whitespace : [
|
|
109
|
-
{token : "text.whitespace.xml", regex : "\\s+"}
|
|
110
|
-
],
|
|
111
|
-
string: [{
|
|
112
|
-
token : "string.xml",
|
|
113
|
-
regex : "'",
|
|
114
|
-
push : [
|
|
115
|
-
{token : "string.xml", regex: "'", next: "pop"},
|
|
116
|
-
{defaultToken : "string.xml"}
|
|
117
|
-
]
|
|
118
|
-
}, {
|
|
119
|
-
token : "string.xml",
|
|
120
|
-
regex : '"',
|
|
121
|
-
push : [
|
|
122
|
-
{token : "string.xml", regex: '"', next: "pop"},
|
|
123
|
-
{defaultToken : "string.xml"}
|
|
124
|
-
]
|
|
125
|
-
}],
|
|
126
|
-
|
|
127
|
-
attributes: [{
|
|
128
|
-
token : "entity.other.attribute-name.xml",
|
|
129
|
-
regex : tagRegex
|
|
130
|
-
}, {
|
|
131
|
-
token : "keyword.operator.attribute-equals.xml",
|
|
132
|
-
regex : "="
|
|
133
|
-
}, {
|
|
134
|
-
include: "tag_whitespace"
|
|
135
|
-
}, {
|
|
136
|
-
include: "attribute_value"
|
|
137
|
-
}],
|
|
138
|
-
|
|
139
|
-
attribute_value: [{
|
|
140
|
-
token : "string.attribute-value.xml",
|
|
141
|
-
regex : "'",
|
|
142
|
-
push : [
|
|
143
|
-
{token : "string.attribute-value.xml", regex: "'", next: "pop"},
|
|
144
|
-
{include : "attr_reference"},
|
|
145
|
-
{defaultToken : "string.attribute-value.xml"}
|
|
146
|
-
]
|
|
147
|
-
}, {
|
|
148
|
-
token : "string.attribute-value.xml",
|
|
149
|
-
regex : '"',
|
|
150
|
-
push : [
|
|
151
|
-
{token : "string.attribute-value.xml", regex: '"', next: "pop"},
|
|
152
|
-
{include : "attr_reference"},
|
|
153
|
-
{defaultToken : "string.attribute-value.xml"}
|
|
154
|
-
]
|
|
155
|
-
}]
|
|
156
|
-
};
|
|
157
|
-
|
|
158
|
-
if (this.constructor === XmlHighlightRules)
|
|
159
|
-
this.normalizeRules();
|
|
160
|
-
};
|
|
161
|
-
|
|
162
|
-
|
|
163
|
-
(function() {
|
|
164
|
-
|
|
165
|
-
this.embedTagRules = function(HighlightRules, prefix, tag){
|
|
166
|
-
this.$rules.tag.unshift({
|
|
167
|
-
token : ["meta.tag.punctuation.tag-open.xml", "meta.tag." + tag + ".tag-name.xml"],
|
|
168
|
-
regex : "(<)(" + tag + "(?=\\s|>|$))",
|
|
169
|
-
next: [
|
|
170
|
-
{include : "attributes"},
|
|
171
|
-
{token : "meta.tag.punctuation.tag-close.xml", regex : "/?>", next : prefix + "start"}
|
|
172
|
-
]
|
|
173
|
-
});
|
|
174
|
-
|
|
175
|
-
this.$rules[tag + "-end"] = [
|
|
176
|
-
{include : "attributes"},
|
|
177
|
-
{token : "meta.tag.punctuation.tag-close.xml", regex : "/?>", next: "start",
|
|
178
|
-
onMatch : function(value, currentState, stack) {
|
|
179
|
-
stack.splice(0);
|
|
180
|
-
return this.token;
|
|
181
|
-
}}
|
|
182
|
-
];
|
|
183
|
-
|
|
184
|
-
this.embedRules(HighlightRules, prefix, [{
|
|
185
|
-
token: ["meta.tag.punctuation.end-tag-open.xml", "meta.tag." + tag + ".tag-name.xml"],
|
|
186
|
-
regex : "(</)(" + tag + "(?=\\s|>|$))",
|
|
187
|
-
next: tag + "-end"
|
|
188
|
-
}, {
|
|
189
|
-
token: "string.cdata.xml",
|
|
190
|
-
regex : "<\\!\\[CDATA\\["
|
|
191
|
-
}, {
|
|
192
|
-
token: "string.cdata.xml",
|
|
193
|
-
regex : "\\]\\]>"
|
|
194
|
-
}]);
|
|
195
|
-
};
|
|
196
|
-
|
|
197
|
-
}).call(TextHighlightRules.prototype);
|
|
198
|
-
|
|
199
|
-
oop.inherits(XmlHighlightRules, TextHighlightRules);
|
|
200
|
-
|
|
201
|
-
exports.XmlHighlightRules = XmlHighlightRules;
|
|
202
|
-
});
|
|
203
|
-
|
|
204
|
-
ace.define("ace/mode/behaviour/xml",["require","exports","module","ace/lib/oop","ace/mode/behaviour","ace/token_iterator","ace/lib/lang"], function(require, exports, module) {
|
|
205
|
-
"use strict";
|
|
206
|
-
|
|
207
|
-
var oop = require("../../lib/oop");
|
|
208
|
-
var Behaviour = require("../behaviour").Behaviour;
|
|
209
|
-
var TokenIterator = require("../../token_iterator").TokenIterator;
|
|
210
|
-
var lang = require("../../lib/lang");
|
|
211
|
-
|
|
212
|
-
function is(token, type) {
|
|
213
|
-
return token && token.type.lastIndexOf(type + ".xml") > -1;
|
|
214
|
-
}
|
|
215
|
-
|
|
216
|
-
var XmlBehaviour = function () {
|
|
217
|
-
|
|
218
|
-
this.add("string_dquotes", "insertion", function (state, action, editor, session, text) {
|
|
219
|
-
if (text == '"' || text == "'") {
|
|
220
|
-
var quote = text;
|
|
221
|
-
var selected = session.doc.getTextRange(editor.getSelectionRange());
|
|
222
|
-
if (selected !== "" && selected !== "'" && selected != '"' && editor.getWrapBehavioursEnabled()) {
|
|
223
|
-
return {
|
|
224
|
-
text: quote + selected + quote,
|
|
225
|
-
selection: false
|
|
226
|
-
};
|
|
227
|
-
}
|
|
228
|
-
|
|
229
|
-
var cursor = editor.getCursorPosition();
|
|
230
|
-
var line = session.doc.getLine(cursor.row);
|
|
231
|
-
var rightChar = line.substring(cursor.column, cursor.column + 1);
|
|
232
|
-
var iterator = new TokenIterator(session, cursor.row, cursor.column);
|
|
233
|
-
var token = iterator.getCurrentToken();
|
|
234
|
-
|
|
235
|
-
if (rightChar == quote && (is(token, "attribute-value") || is(token, "string"))) {
|
|
236
|
-
return {
|
|
237
|
-
text: "",
|
|
238
|
-
selection: [1, 1]
|
|
239
|
-
};
|
|
240
|
-
}
|
|
241
|
-
|
|
242
|
-
if (!token)
|
|
243
|
-
token = iterator.stepBackward();
|
|
244
|
-
|
|
245
|
-
if (!token)
|
|
246
|
-
return;
|
|
247
|
-
|
|
248
|
-
while (is(token, "tag-whitespace") || is(token, "whitespace")) {
|
|
249
|
-
token = iterator.stepBackward();
|
|
250
|
-
}
|
|
251
|
-
var rightSpace = !rightChar || rightChar.match(/\s/);
|
|
252
|
-
if (is(token, "attribute-equals") && (rightSpace || rightChar == '>') || (is(token, "decl-attribute-equals") && (rightSpace || rightChar == '?'))) {
|
|
253
|
-
return {
|
|
254
|
-
text: quote + quote,
|
|
255
|
-
selection: [1, 1]
|
|
256
|
-
};
|
|
257
|
-
}
|
|
258
|
-
}
|
|
259
|
-
});
|
|
260
|
-
|
|
261
|
-
this.add("string_dquotes", "deletion", function(state, action, editor, session, range) {
|
|
262
|
-
var selected = session.doc.getTextRange(range);
|
|
263
|
-
if (!range.isMultiLine() && (selected == '"' || selected == "'")) {
|
|
264
|
-
var line = session.doc.getLine(range.start.row);
|
|
265
|
-
var rightChar = line.substring(range.start.column + 1, range.start.column + 2);
|
|
266
|
-
if (rightChar == selected) {
|
|
267
|
-
range.end.column++;
|
|
268
|
-
return range;
|
|
269
|
-
}
|
|
270
|
-
}
|
|
271
|
-
});
|
|
272
|
-
|
|
273
|
-
this.add("autoclosing", "insertion", function (state, action, editor, session, text) {
|
|
274
|
-
if (text == '>') {
|
|
275
|
-
var position = editor.getSelectionRange().start;
|
|
276
|
-
var iterator = new TokenIterator(session, position.row, position.column);
|
|
277
|
-
var token = iterator.getCurrentToken() || iterator.stepBackward();
|
|
278
|
-
if (!token || !(is(token, "tag-name") || is(token, "tag-whitespace") || is(token, "attribute-name") || is(token, "attribute-equals") || is(token, "attribute-value")))
|
|
279
|
-
return;
|
|
280
|
-
if (is(token, "reference.attribute-value"))
|
|
281
|
-
return;
|
|
282
|
-
if (is(token, "attribute-value")) {
|
|
283
|
-
var tokenEndColumn = iterator.getCurrentTokenColumn() + token.value.length;
|
|
284
|
-
if (position.column < tokenEndColumn)
|
|
285
|
-
return;
|
|
286
|
-
if (position.column == tokenEndColumn) {
|
|
287
|
-
var nextToken = iterator.stepForward();
|
|
288
|
-
if (nextToken && is(nextToken, "attribute-value"))
|
|
289
|
-
return;
|
|
290
|
-
iterator.stepBackward();
|
|
291
|
-
}
|
|
292
|
-
}
|
|
293
|
-
|
|
294
|
-
if (/^\s*>/.test(session.getLine(position.row).slice(position.column)))
|
|
295
|
-
return;
|
|
296
|
-
while (!is(token, "tag-name")) {
|
|
297
|
-
token = iterator.stepBackward();
|
|
298
|
-
if (token.value == "<") {
|
|
299
|
-
token = iterator.stepForward();
|
|
300
|
-
break;
|
|
301
|
-
}
|
|
302
|
-
}
|
|
303
|
-
|
|
304
|
-
var tokenRow = iterator.getCurrentTokenRow();
|
|
305
|
-
var tokenColumn = iterator.getCurrentTokenColumn();
|
|
306
|
-
if (is(iterator.stepBackward(), "end-tag-open"))
|
|
307
|
-
return;
|
|
308
|
-
|
|
309
|
-
var element = token.value;
|
|
310
|
-
if (tokenRow == position.row)
|
|
311
|
-
element = element.substring(0, position.column - tokenColumn);
|
|
312
|
-
|
|
313
|
-
if (this.voidElements.hasOwnProperty(element.toLowerCase()))
|
|
314
|
-
return;
|
|
315
|
-
|
|
316
|
-
return {
|
|
317
|
-
text: ">" + "</" + element + ">",
|
|
318
|
-
selection: [1, 1]
|
|
319
|
-
};
|
|
320
|
-
}
|
|
321
|
-
});
|
|
322
|
-
|
|
323
|
-
this.add("autoindent", "insertion", function (state, action, editor, session, text) {
|
|
324
|
-
if (text == "\n") {
|
|
325
|
-
var cursor = editor.getCursorPosition();
|
|
326
|
-
var line = session.getLine(cursor.row);
|
|
327
|
-
var iterator = new TokenIterator(session, cursor.row, cursor.column);
|
|
328
|
-
var token = iterator.getCurrentToken();
|
|
329
|
-
|
|
330
|
-
if (token && token.type.indexOf("tag-close") !== -1) {
|
|
331
|
-
if (token.value == "/>")
|
|
332
|
-
return;
|
|
333
|
-
while (token && token.type.indexOf("tag-name") === -1) {
|
|
334
|
-
token = iterator.stepBackward();
|
|
335
|
-
}
|
|
336
|
-
|
|
337
|
-
if (!token) {
|
|
338
|
-
return;
|
|
339
|
-
}
|
|
340
|
-
|
|
341
|
-
var tag = token.value;
|
|
342
|
-
var row = iterator.getCurrentTokenRow();
|
|
343
|
-
token = iterator.stepBackward();
|
|
344
|
-
if (!token || token.type.indexOf("end-tag") !== -1) {
|
|
345
|
-
return;
|
|
346
|
-
}
|
|
347
|
-
|
|
348
|
-
if (this.voidElements && !this.voidElements[tag]) {
|
|
349
|
-
var nextToken = session.getTokenAt(cursor.row, cursor.column+1);
|
|
350
|
-
var line = session.getLine(row);
|
|
351
|
-
var nextIndent = this.$getIndent(line);
|
|
352
|
-
var indent = nextIndent + session.getTabString();
|
|
353
|
-
|
|
354
|
-
if (nextToken && nextToken.value === "</") {
|
|
355
|
-
return {
|
|
356
|
-
text: "\n" + indent + "\n" + nextIndent,
|
|
357
|
-
selection: [1, indent.length, 1, indent.length]
|
|
358
|
-
};
|
|
359
|
-
} else {
|
|
360
|
-
return {
|
|
361
|
-
text: "\n" + indent
|
|
362
|
-
};
|
|
363
|
-
}
|
|
364
|
-
}
|
|
365
|
-
}
|
|
366
|
-
}
|
|
367
|
-
});
|
|
368
|
-
|
|
369
|
-
};
|
|
370
|
-
|
|
371
|
-
oop.inherits(XmlBehaviour, Behaviour);
|
|
372
|
-
|
|
373
|
-
exports.XmlBehaviour = XmlBehaviour;
|
|
374
|
-
});
|
|
375
|
-
|
|
376
|
-
ace.define("ace/mode/folding/xml",["require","exports","module","ace/lib/oop","ace/lib/lang","ace/range","ace/mode/folding/fold_mode","ace/token_iterator"], function(require, exports, module) {
|
|
377
|
-
"use strict";
|
|
378
|
-
|
|
379
|
-
var oop = require("../../lib/oop");
|
|
380
|
-
var lang = require("../../lib/lang");
|
|
381
|
-
var Range = require("../../range").Range;
|
|
382
|
-
var BaseFoldMode = require("./fold_mode").FoldMode;
|
|
383
|
-
var TokenIterator = require("../../token_iterator").TokenIterator;
|
|
384
|
-
|
|
385
|
-
var FoldMode = exports.FoldMode = function(voidElements, optionalEndTags) {
|
|
386
|
-
BaseFoldMode.call(this);
|
|
387
|
-
this.voidElements = voidElements || {};
|
|
388
|
-
this.optionalEndTags = oop.mixin({}, this.voidElements);
|
|
389
|
-
if (optionalEndTags)
|
|
390
|
-
oop.mixin(this.optionalEndTags, optionalEndTags);
|
|
391
|
-
|
|
392
|
-
};
|
|
393
|
-
oop.inherits(FoldMode, BaseFoldMode);
|
|
394
|
-
|
|
395
|
-
var Tag = function() {
|
|
396
|
-
this.tagName = "";
|
|
397
|
-
this.closing = false;
|
|
398
|
-
this.selfClosing = false;
|
|
399
|
-
this.start = {row: 0, column: 0};
|
|
400
|
-
this.end = {row: 0, column: 0};
|
|
401
|
-
};
|
|
402
|
-
|
|
403
|
-
function is(token, type) {
|
|
404
|
-
return token.type.lastIndexOf(type + ".xml") > -1;
|
|
405
|
-
}
|
|
406
|
-
|
|
407
|
-
(function() {
|
|
408
|
-
|
|
409
|
-
this.getFoldWidget = function(session, foldStyle, row) {
|
|
410
|
-
var tag = this._getFirstTagInLine(session, row);
|
|
411
|
-
|
|
412
|
-
if (!tag)
|
|
413
|
-
return this.getCommentFoldWidget(session, row);
|
|
414
|
-
|
|
415
|
-
if (tag.closing || (!tag.tagName && tag.selfClosing))
|
|
416
|
-
return foldStyle == "markbeginend" ? "end" : "";
|
|
417
|
-
|
|
418
|
-
if (!tag.tagName || tag.selfClosing || this.voidElements.hasOwnProperty(tag.tagName.toLowerCase()))
|
|
419
|
-
return "";
|
|
420
|
-
|
|
421
|
-
if (this._findEndTagInLine(session, row, tag.tagName, tag.end.column))
|
|
422
|
-
return "";
|
|
423
|
-
|
|
424
|
-
return "start";
|
|
425
|
-
};
|
|
426
|
-
|
|
427
|
-
this.getCommentFoldWidget = function(session, row) {
|
|
428
|
-
if (/comment/.test(session.getState(row)) && /<!-/.test(session.getLine(row)))
|
|
429
|
-
return "start";
|
|
430
|
-
return "";
|
|
431
|
-
};
|
|
432
|
-
this._getFirstTagInLine = function(session, row) {
|
|
433
|
-
var tokens = session.getTokens(row);
|
|
434
|
-
var tag = new Tag();
|
|
435
|
-
|
|
436
|
-
for (var i = 0; i < tokens.length; i++) {
|
|
437
|
-
var token = tokens[i];
|
|
438
|
-
if (is(token, "tag-open")) {
|
|
439
|
-
tag.end.column = tag.start.column + token.value.length;
|
|
440
|
-
tag.closing = is(token, "end-tag-open");
|
|
441
|
-
token = tokens[++i];
|
|
442
|
-
if (!token)
|
|
443
|
-
return null;
|
|
444
|
-
tag.tagName = token.value;
|
|
445
|
-
tag.end.column += token.value.length;
|
|
446
|
-
for (i++; i < tokens.length; i++) {
|
|
447
|
-
token = tokens[i];
|
|
448
|
-
tag.end.column += token.value.length;
|
|
449
|
-
if (is(token, "tag-close")) {
|
|
450
|
-
tag.selfClosing = token.value == '/>';
|
|
451
|
-
break;
|
|
452
|
-
}
|
|
453
|
-
}
|
|
454
|
-
return tag;
|
|
455
|
-
} else if (is(token, "tag-close")) {
|
|
456
|
-
tag.selfClosing = token.value == '/>';
|
|
457
|
-
return tag;
|
|
458
|
-
}
|
|
459
|
-
tag.start.column += token.value.length;
|
|
460
|
-
}
|
|
461
|
-
|
|
462
|
-
return null;
|
|
463
|
-
};
|
|
464
|
-
|
|
465
|
-
this._findEndTagInLine = function(session, row, tagName, startColumn) {
|
|
466
|
-
var tokens = session.getTokens(row);
|
|
467
|
-
var column = 0;
|
|
468
|
-
for (var i = 0; i < tokens.length; i++) {
|
|
469
|
-
var token = tokens[i];
|
|
470
|
-
column += token.value.length;
|
|
471
|
-
if (column < startColumn)
|
|
472
|
-
continue;
|
|
473
|
-
if (is(token, "end-tag-open")) {
|
|
474
|
-
token = tokens[i + 1];
|
|
475
|
-
if (token && token.value == tagName)
|
|
476
|
-
return true;
|
|
477
|
-
}
|
|
478
|
-
}
|
|
479
|
-
return false;
|
|
480
|
-
};
|
|
481
|
-
this._readTagForward = function(iterator) {
|
|
482
|
-
var token = iterator.getCurrentToken();
|
|
483
|
-
if (!token)
|
|
484
|
-
return null;
|
|
485
|
-
|
|
486
|
-
var tag = new Tag();
|
|
487
|
-
do {
|
|
488
|
-
if (is(token, "tag-open")) {
|
|
489
|
-
tag.closing = is(token, "end-tag-open");
|
|
490
|
-
tag.start.row = iterator.getCurrentTokenRow();
|
|
491
|
-
tag.start.column = iterator.getCurrentTokenColumn();
|
|
492
|
-
} else if (is(token, "tag-name")) {
|
|
493
|
-
tag.tagName = token.value;
|
|
494
|
-
} else if (is(token, "tag-close")) {
|
|
495
|
-
tag.selfClosing = token.value == "/>";
|
|
496
|
-
tag.end.row = iterator.getCurrentTokenRow();
|
|
497
|
-
tag.end.column = iterator.getCurrentTokenColumn() + token.value.length;
|
|
498
|
-
iterator.stepForward();
|
|
499
|
-
return tag;
|
|
500
|
-
}
|
|
501
|
-
} while(token = iterator.stepForward());
|
|
502
|
-
|
|
503
|
-
return null;
|
|
504
|
-
};
|
|
505
|
-
|
|
506
|
-
this._readTagBackward = function(iterator) {
|
|
507
|
-
var token = iterator.getCurrentToken();
|
|
508
|
-
if (!token)
|
|
509
|
-
return null;
|
|
510
|
-
|
|
511
|
-
var tag = new Tag();
|
|
512
|
-
do {
|
|
513
|
-
if (is(token, "tag-open")) {
|
|
514
|
-
tag.closing = is(token, "end-tag-open");
|
|
515
|
-
tag.start.row = iterator.getCurrentTokenRow();
|
|
516
|
-
tag.start.column = iterator.getCurrentTokenColumn();
|
|
517
|
-
iterator.stepBackward();
|
|
518
|
-
return tag;
|
|
519
|
-
} else if (is(token, "tag-name")) {
|
|
520
|
-
tag.tagName = token.value;
|
|
521
|
-
} else if (is(token, "tag-close")) {
|
|
522
|
-
tag.selfClosing = token.value == "/>";
|
|
523
|
-
tag.end.row = iterator.getCurrentTokenRow();
|
|
524
|
-
tag.end.column = iterator.getCurrentTokenColumn() + token.value.length;
|
|
525
|
-
}
|
|
526
|
-
} while(token = iterator.stepBackward());
|
|
527
|
-
|
|
528
|
-
return null;
|
|
529
|
-
};
|
|
530
|
-
|
|
531
|
-
this._pop = function(stack, tag) {
|
|
532
|
-
while (stack.length) {
|
|
533
|
-
|
|
534
|
-
var top = stack[stack.length-1];
|
|
535
|
-
if (!tag || top.tagName == tag.tagName) {
|
|
536
|
-
return stack.pop();
|
|
537
|
-
}
|
|
538
|
-
else if (this.optionalEndTags.hasOwnProperty(top.tagName)) {
|
|
539
|
-
stack.pop();
|
|
540
|
-
continue;
|
|
541
|
-
} else {
|
|
542
|
-
return null;
|
|
543
|
-
}
|
|
544
|
-
}
|
|
545
|
-
};
|
|
546
|
-
|
|
547
|
-
this.getFoldWidgetRange = function(session, foldStyle, row) {
|
|
548
|
-
var firstTag = this._getFirstTagInLine(session, row);
|
|
549
|
-
|
|
550
|
-
if (!firstTag) {
|
|
551
|
-
return this.getCommentFoldWidget(session, row)
|
|
552
|
-
&& session.getCommentFoldRange(row, session.getLine(row).length);
|
|
553
|
-
}
|
|
554
|
-
|
|
555
|
-
var isBackward = firstTag.closing || firstTag.selfClosing;
|
|
556
|
-
var stack = [];
|
|
557
|
-
var tag;
|
|
558
|
-
|
|
559
|
-
if (!isBackward) {
|
|
560
|
-
var iterator = new TokenIterator(session, row, firstTag.start.column);
|
|
561
|
-
var start = {
|
|
562
|
-
row: row,
|
|
563
|
-
column: firstTag.start.column + firstTag.tagName.length + 2
|
|
564
|
-
};
|
|
565
|
-
if (firstTag.start.row == firstTag.end.row)
|
|
566
|
-
start.column = firstTag.end.column;
|
|
567
|
-
while (tag = this._readTagForward(iterator)) {
|
|
568
|
-
if (tag.selfClosing) {
|
|
569
|
-
if (!stack.length) {
|
|
570
|
-
tag.start.column += tag.tagName.length + 2;
|
|
571
|
-
tag.end.column -= 2;
|
|
572
|
-
return Range.fromPoints(tag.start, tag.end);
|
|
573
|
-
} else
|
|
574
|
-
continue;
|
|
575
|
-
}
|
|
576
|
-
|
|
577
|
-
if (tag.closing) {
|
|
578
|
-
this._pop(stack, tag);
|
|
579
|
-
if (stack.length == 0)
|
|
580
|
-
return Range.fromPoints(start, tag.start);
|
|
581
|
-
}
|
|
582
|
-
else {
|
|
583
|
-
stack.push(tag);
|
|
584
|
-
}
|
|
585
|
-
}
|
|
586
|
-
}
|
|
587
|
-
else {
|
|
588
|
-
var iterator = new TokenIterator(session, row, firstTag.end.column);
|
|
589
|
-
var end = {
|
|
590
|
-
row: row,
|
|
591
|
-
column: firstTag.start.column
|
|
592
|
-
};
|
|
593
|
-
|
|
594
|
-
while (tag = this._readTagBackward(iterator)) {
|
|
595
|
-
if (tag.selfClosing) {
|
|
596
|
-
if (!stack.length) {
|
|
597
|
-
tag.start.column += tag.tagName.length + 2;
|
|
598
|
-
tag.end.column -= 2;
|
|
599
|
-
return Range.fromPoints(tag.start, tag.end);
|
|
600
|
-
} else
|
|
601
|
-
continue;
|
|
602
|
-
}
|
|
603
|
-
|
|
604
|
-
if (!tag.closing) {
|
|
605
|
-
this._pop(stack, tag);
|
|
606
|
-
if (stack.length == 0) {
|
|
607
|
-
tag.start.column += tag.tagName.length + 2;
|
|
608
|
-
if (tag.start.row == tag.end.row && tag.start.column < tag.end.column)
|
|
609
|
-
tag.start.column = tag.end.column;
|
|
610
|
-
return Range.fromPoints(tag.start, end);
|
|
611
|
-
}
|
|
612
|
-
}
|
|
613
|
-
else {
|
|
614
|
-
stack.push(tag);
|
|
615
|
-
}
|
|
616
|
-
}
|
|
617
|
-
}
|
|
618
|
-
|
|
619
|
-
};
|
|
620
|
-
|
|
621
|
-
}).call(FoldMode.prototype);
|
|
622
|
-
|
|
623
|
-
});
|
|
624
|
-
|
|
625
|
-
ace.define("ace/mode/xml",["require","exports","module","ace/lib/oop","ace/lib/lang","ace/mode/text","ace/mode/xml_highlight_rules","ace/mode/behaviour/xml","ace/mode/folding/xml","ace/worker/worker_client"], function(require, exports, module) {
|
|
626
|
-
"use strict";
|
|
627
|
-
|
|
628
|
-
var oop = require("../lib/oop");
|
|
629
|
-
var lang = require("../lib/lang");
|
|
630
|
-
var TextMode = require("./text").Mode;
|
|
631
|
-
var XmlHighlightRules = require("./xml_highlight_rules").XmlHighlightRules;
|
|
632
|
-
var XmlBehaviour = require("./behaviour/xml").XmlBehaviour;
|
|
633
|
-
var XmlFoldMode = require("./folding/xml").FoldMode;
|
|
634
|
-
var WorkerClient = require("../worker/worker_client").WorkerClient;
|
|
635
|
-
|
|
636
|
-
var Mode = function() {
|
|
637
|
-
this.HighlightRules = XmlHighlightRules;
|
|
638
|
-
this.$behaviour = new XmlBehaviour();
|
|
639
|
-
this.foldingRules = new XmlFoldMode();
|
|
640
|
-
};
|
|
641
|
-
|
|
642
|
-
oop.inherits(Mode, TextMode);
|
|
643
|
-
|
|
644
|
-
(function() {
|
|
645
|
-
|
|
646
|
-
this.voidElements = lang.arrayToMap([]);
|
|
647
|
-
|
|
648
|
-
this.blockComment = {start: "<!--", end: "-->"};
|
|
649
|
-
|
|
650
|
-
this.createWorker = function(session) {
|
|
651
|
-
var worker = new WorkerClient(["ace"], "ace/mode/xml_worker", "Worker");
|
|
652
|
-
worker.attachToDocument(session.getDocument());
|
|
653
|
-
|
|
654
|
-
worker.on("error", function(e) {
|
|
655
|
-
session.setAnnotations(e.data);
|
|
656
|
-
});
|
|
657
|
-
|
|
658
|
-
worker.on("terminate", function() {
|
|
659
|
-
session.clearAnnotations();
|
|
660
|
-
});
|
|
661
|
-
|
|
662
|
-
return worker;
|
|
663
|
-
};
|
|
664
|
-
|
|
665
|
-
this.$id = "ace/mode/xml";
|
|
666
|
-
}).call(Mode.prototype);
|
|
667
|
-
|
|
668
|
-
exports.Mode = Mode;
|
|
669
|
-
}); (function() {
|
|
670
|
-
ace.require(["ace/mode/xml"], function(m) {
|
|
671
|
-
if (typeof module == "object" && typeof exports == "object" && module) {
|
|
672
|
-
module.exports = m;
|
|
673
|
-
}
|
|
674
|
-
});
|
|
675
|
-
})();
|
|
676
|
-
|