forked from Wavyzz/dolibarr
NEW Upgrade ACE editor to 1.43.12
This commit is contained in:
@@ -53,7 +53,7 @@ TCPDI 1.1.0 LGPL-3+ / Apache 2.0 Yes
|
||||
bacon, dasprid, swiss-qr-bill, kmukku, symfony/validator
|
||||
|
||||
JS libraries:
|
||||
Ace 1.4.14 BSD Yes JS library to get code syntaxique coloration in a textarea.
|
||||
Ace 1.43.12 BSD Yes JS library to get code syntaxique coloration in a textarea (Must take src dir into https://github.com/ajaxorg/ace-builds/).
|
||||
ChartJS 3.7.1 MIT License Yes JS library for graph
|
||||
CKEditor 4.22.1 LGPL-2.1+ Yes Editor WYSIWYG
|
||||
jQuery 3.6.4 MIT License Yes JS library
|
||||
|
||||
@@ -410,7 +410,7 @@ class DolEditor
|
||||
//enableSnippets: true, // ???
|
||||
showPrintMargin: false, // hides the vertical limiting strip
|
||||
minLines: 10,
|
||||
maxLines: '.(empty($this->height) ? '34' : (round($this->height / 10))).',
|
||||
maxLines: '.(empty($this->height) ? '34' : (round(($this->height - 60) / 19))).', // we remove 60 for the ace toolbar + bottom status line. 19 seems the height in px required for 1 line.
|
||||
fontSize: "110%" // ensures that the editor fits in the environment
|
||||
});
|
||||
|
||||
|
||||
29
htdocs/includes/ace/.gitignore
vendored
Normal file
29
htdocs/includes/ace/.gitignore
vendored
Normal file
@@ -0,0 +1,29 @@
|
||||
# Junk that could exist anywhere:
|
||||
.DS_Store
|
||||
*.swp
|
||||
*.tmp
|
||||
*~
|
||||
|
||||
# Project files that should not be in the repo
|
||||
.*
|
||||
\#*
|
||||
!/.github
|
||||
!/.gitignore
|
||||
.*.gz
|
||||
*.tmTheme.js
|
||||
package-lock.json
|
||||
|
||||
# A handy place to put stuff that git should ignore:
|
||||
/coverage
|
||||
/ignore/
|
||||
node_modules/
|
||||
jam/
|
||||
* *
|
||||
|
||||
.git-ref
|
||||
npm-debug.log
|
||||
deps/
|
||||
dist
|
||||
|
||||
lib/ace
|
||||
styles
|
||||
1491
htdocs/includes/ace/CHANGELOG.md
Normal file
1491
htdocs/includes/ace/CHANGELOG.md
Normal file
File diff suppressed because it is too large
Load Diff
@@ -5,19 +5,21 @@ Ace (Ajax.org Cloud9 Editor)
|
||||
|
||||
Ace is a code editor written in JavaScript.
|
||||
|
||||
This repository has only generated files.
|
||||
If you want to work on ace please go to https://github.com/ajaxorg/ace instead.
|
||||
---
|
||||
|
||||
### ❗<span style="color:red">ISSUES ARE DISABLED IN THIS REPOSITORY</span>❗
|
||||
|
||||
This repository has only generated files. To report your issues, suggest features, ask questions, or work on Ace editor itself please go to Ace repository https://github.com/ajaxorg/ace.
|
||||
|
||||
---
|
||||
|
||||
|
||||
here you can find pre-built files for convenience of embedding.
|
||||
it contains 4 versions
|
||||
Here you can find pre-built files for convenience of embedding. It contains 4 versions:
|
||||
* [src](https://github.com/ajaxorg/ace-builds/tree/master/src) concatenated but not minified
|
||||
* [src-min](https://github.com/ajaxorg/ace-builds/tree/master/src-min) concatenated and minified with uglify.js
|
||||
* [src-noconflict](https://github.com/ajaxorg/ace-builds/tree/master/src-noconflict) uses ace.require instead of require
|
||||
* [src-min-noconflict](https://github.com/ajaxorg/ace-builds/tree/master/src-min-noconflict) concatenated, minified with uglify.js, and uses ace.require instead of require
|
||||
|
||||
|
||||
For a simple way of embedding ace into webpage see [editor.html](https://github.com/ajaxorg/ace-builds/blob/master/editor.html) or list of other [simple examples](https://github.com/ajaxorg/ace-builds/tree/master/demo)
|
||||
To see ace in action go to [kitchen-sink-demo](http://ajaxorg.github.com/ace-builds/kitchen-sink.html), [scrollable-page-demo](http://ajaxorg.github.com/ace-builds/demo/scrollable-page.html) or [minimal demo](http://ajaxorg.github.com/ace-builds/editor.html),
|
||||
|
||||
|
||||
For a simple way of embedding ace into webpage see [editor.html](https://github.com/ajaxorg/ace-builds/blob/master/editor.html) or list of other [simple examples](https://github.com/ajaxorg/ace-builds/tree/master/demo).
|
||||
To see ace in action go to [kitchen-sink-demo](http://ajaxorg.github.io/ace-builds/kitchen-sink.html), [scrollable-page-demo](http://ajaxorg.github.io/ace-builds/demo/scrollable-page.html) or [minimal demo](http://ajaxorg.github.io/ace-builds/editor.html).
|
||||
|
||||
1736
htdocs/includes/ace/ace-modes.d.ts
vendored
Normal file
1736
htdocs/includes/ace/ace-modes.d.ts
vendored
Normal file
File diff suppressed because it is too large
Load Diff
53
htdocs/includes/ace/ace-modules.d.ts
vendored
53
htdocs/includes/ace/ace-modules.d.ts
vendored
@@ -1,11 +1,14 @@
|
||||
declare module 'ace-builds/webpack-resolver';
|
||||
declare module 'ace-builds/esm-resolver';
|
||||
declare module 'ace-builds/src-noconflict/ace';
|
||||
declare module 'ace-builds/src-noconflict/ext-beautify';
|
||||
declare module 'ace-builds/src-noconflict/ext-code_lens';
|
||||
declare module 'ace-builds/src-noconflict/ext-command_bar';
|
||||
declare module 'ace-builds/src-noconflict/ext-elastic_tabstops_lite';
|
||||
declare module 'ace-builds/src-noconflict/ext-emmet';
|
||||
declare module 'ace-builds/src-noconflict/ext-error_marker';
|
||||
declare module 'ace-builds/src-noconflict/ext-hardwrap';
|
||||
declare module 'ace-builds/src-noconflict/ext-inline_autocomplete';
|
||||
declare module 'ace-builds/src-noconflict/ext-keybinding_menu';
|
||||
declare module 'ace-builds/src-noconflict/ext-language_tools';
|
||||
declare module 'ace-builds/src-noconflict/ext-linking';
|
||||
@@ -15,6 +18,7 @@ declare module 'ace-builds/src-noconflict/ext-prompt';
|
||||
declare module 'ace-builds/src-noconflict/ext-rtl';
|
||||
declare module 'ace-builds/src-noconflict/ext-searchbox';
|
||||
declare module 'ace-builds/src-noconflict/ext-settings_menu';
|
||||
declare module 'ace-builds/src-noconflict/ext-simple_tokenizer';
|
||||
declare module 'ace-builds/src-noconflict/ext-spellcheck';
|
||||
declare module 'ace-builds/src-noconflict/ext-split';
|
||||
declare module 'ace-builds/src-noconflict/ext-static_highlight';
|
||||
@@ -37,10 +41,15 @@ declare module 'ace-builds/src-noconflict/mode-applescript';
|
||||
declare module 'ace-builds/src-noconflict/mode-aql';
|
||||
declare module 'ace-builds/src-noconflict/mode-asciidoc';
|
||||
declare module 'ace-builds/src-noconflict/mode-asl';
|
||||
declare module 'ace-builds/src-noconflict/mode-assembly_arm32';
|
||||
declare module 'ace-builds/src-noconflict/mode-assembly_x86';
|
||||
declare module 'ace-builds/src-noconflict/mode-astro';
|
||||
declare module 'ace-builds/src-noconflict/mode-autohotkey';
|
||||
declare module 'ace-builds/src-noconflict/mode-basic';
|
||||
declare module 'ace-builds/src-noconflict/mode-batchfile';
|
||||
declare module 'ace-builds/src-noconflict/mode-bibtex';
|
||||
declare module 'ace-builds/src-noconflict/mode-c9search';
|
||||
declare module 'ace-builds/src-noconflict/mode-c_cpp';
|
||||
declare module 'ace-builds/src-noconflict/mode-cirru';
|
||||
declare module 'ace-builds/src-noconflict/mode-clojure';
|
||||
declare module 'ace-builds/src-noconflict/mode-cobol';
|
||||
@@ -54,7 +63,7 @@ declare module 'ace-builds/src-noconflict/mode-csound_score';
|
||||
declare module 'ace-builds/src-noconflict/mode-csp';
|
||||
declare module 'ace-builds/src-noconflict/mode-css';
|
||||
declare module 'ace-builds/src-noconflict/mode-curly';
|
||||
declare module 'ace-builds/src-noconflict/mode-c_cpp';
|
||||
declare module 'ace-builds/src-noconflict/mode-cuttlefish';
|
||||
declare module 'ace-builds/src-noconflict/mode-d';
|
||||
declare module 'ace-builds/src-noconflict/mode-dart';
|
||||
declare module 'ace-builds/src-noconflict/mode-diff';
|
||||
@@ -68,6 +77,7 @@ declare module 'ace-builds/src-noconflict/mode-ejs';
|
||||
declare module 'ace-builds/src-noconflict/mode-elixir';
|
||||
declare module 'ace-builds/src-noconflict/mode-elm';
|
||||
declare module 'ace-builds/src-noconflict/mode-erlang';
|
||||
declare module 'ace-builds/src-noconflict/mode-flix';
|
||||
declare module 'ace-builds/src-noconflict/mode-forth';
|
||||
declare module 'ace-builds/src-noconflict/mode-fortran';
|
||||
declare module 'ace-builds/src-noconflict/mode-fsharp';
|
||||
@@ -92,10 +102,12 @@ declare module 'ace-builds/src-noconflict/mode-html_elixir';
|
||||
declare module 'ace-builds/src-noconflict/mode-html_ruby';
|
||||
declare module 'ace-builds/src-noconflict/mode-ini';
|
||||
declare module 'ace-builds/src-noconflict/mode-io';
|
||||
declare module 'ace-builds/src-noconflict/mode-ion';
|
||||
declare module 'ace-builds/src-noconflict/mode-jack';
|
||||
declare module 'ace-builds/src-noconflict/mode-jade';
|
||||
declare module 'ace-builds/src-noconflict/mode-java';
|
||||
declare module 'ace-builds/src-noconflict/mode-javascript';
|
||||
declare module 'ace-builds/src-noconflict/mode-jexl';
|
||||
declare module 'ace-builds/src-noconflict/mode-json';
|
||||
declare module 'ace-builds/src-noconflict/mode-json5';
|
||||
declare module 'ace-builds/src-noconflict/mode-jsoniq';
|
||||
@@ -127,6 +139,7 @@ declare module 'ace-builds/src-noconflict/mode-mips';
|
||||
declare module 'ace-builds/src-noconflict/mode-mixal';
|
||||
declare module 'ace-builds/src-noconflict/mode-mushcode';
|
||||
declare module 'ace-builds/src-noconflict/mode-mysql';
|
||||
declare module 'ace-builds/src-noconflict/mode-nasal';
|
||||
declare module 'ace-builds/src-noconflict/mode-nginx';
|
||||
declare module 'ace-builds/src-noconflict/mode-nim';
|
||||
declare module 'ace-builds/src-noconflict/mode-nix';
|
||||
@@ -134,6 +147,8 @@ declare module 'ace-builds/src-noconflict/mode-nsis';
|
||||
declare module 'ace-builds/src-noconflict/mode-nunjucks';
|
||||
declare module 'ace-builds/src-noconflict/mode-objectivec';
|
||||
declare module 'ace-builds/src-noconflict/mode-ocaml';
|
||||
declare module 'ace-builds/src-noconflict/mode-odin';
|
||||
declare module 'ace-builds/src-noconflict/mode-partiql';
|
||||
declare module 'ace-builds/src-noconflict/mode-pascal';
|
||||
declare module 'ace-builds/src-noconflict/mode-perl';
|
||||
declare module 'ace-builds/src-noconflict/mode-pgsql';
|
||||
@@ -141,12 +156,14 @@ declare module 'ace-builds/src-noconflict/mode-php';
|
||||
declare module 'ace-builds/src-noconflict/mode-php_laravel_blade';
|
||||
declare module 'ace-builds/src-noconflict/mode-pig';
|
||||
declare module 'ace-builds/src-noconflict/mode-plain_text';
|
||||
declare module 'ace-builds/src-noconflict/mode-plsql';
|
||||
declare module 'ace-builds/src-noconflict/mode-powershell';
|
||||
declare module 'ace-builds/src-noconflict/mode-praat';
|
||||
declare module 'ace-builds/src-noconflict/mode-prisma';
|
||||
declare module 'ace-builds/src-noconflict/mode-prolog';
|
||||
declare module 'ace-builds/src-noconflict/mode-properties';
|
||||
declare module 'ace-builds/src-noconflict/mode-protobuf';
|
||||
declare module 'ace-builds/src-noconflict/mode-prql';
|
||||
declare module 'ace-builds/src-noconflict/mode-puppet';
|
||||
declare module 'ace-builds/src-noconflict/mode-python';
|
||||
declare module 'ace-builds/src-noconflict/mode-qml';
|
||||
@@ -157,9 +174,11 @@ declare module 'ace-builds/src-noconflict/mode-rdoc';
|
||||
declare module 'ace-builds/src-noconflict/mode-red';
|
||||
declare module 'ace-builds/src-noconflict/mode-redshift';
|
||||
declare module 'ace-builds/src-noconflict/mode-rhtml';
|
||||
declare module 'ace-builds/src-noconflict/mode-robot';
|
||||
declare module 'ace-builds/src-noconflict/mode-rst';
|
||||
declare module 'ace-builds/src-noconflict/mode-ruby';
|
||||
declare module 'ace-builds/src-noconflict/mode-rust';
|
||||
declare module 'ace-builds/src-noconflict/mode-sac';
|
||||
declare module 'ace-builds/src-noconflict/mode-sass';
|
||||
declare module 'ace-builds/src-noconflict/mode-scad';
|
||||
declare module 'ace-builds/src-noconflict/mode-scala';
|
||||
@@ -196,14 +215,21 @@ declare module 'ace-builds/src-noconflict/mode-velocity';
|
||||
declare module 'ace-builds/src-noconflict/mode-verilog';
|
||||
declare module 'ace-builds/src-noconflict/mode-vhdl';
|
||||
declare module 'ace-builds/src-noconflict/mode-visualforce';
|
||||
declare module 'ace-builds/src-noconflict/mode-vue';
|
||||
declare module 'ace-builds/src-noconflict/mode-wollok';
|
||||
declare module 'ace-builds/src-noconflict/mode-xml';
|
||||
declare module 'ace-builds/src-noconflict/mode-xquery';
|
||||
declare module 'ace-builds/src-noconflict/mode-yaml';
|
||||
declare module 'ace-builds/src-noconflict/mode-zeek';
|
||||
declare module 'ace-builds/src-noconflict/mode-zig';
|
||||
declare module 'ace-builds/src-noconflict/theme-ambiance';
|
||||
declare module 'ace-builds/src-noconflict/theme-chaos';
|
||||
declare module 'ace-builds/src-noconflict/theme-chrome';
|
||||
declare module 'ace-builds/src-noconflict/theme-cloud9_day';
|
||||
declare module 'ace-builds/src-noconflict/theme-cloud9_night';
|
||||
declare module 'ace-builds/src-noconflict/theme-cloud9_night_low_color';
|
||||
declare module 'ace-builds/src-noconflict/theme-cloud_editor';
|
||||
declare module 'ace-builds/src-noconflict/theme-cloud_editor_dark';
|
||||
declare module 'ace-builds/src-noconflict/theme-clouds';
|
||||
declare module 'ace-builds/src-noconflict/theme-clouds_midnight';
|
||||
declare module 'ace-builds/src-noconflict/theme-cobalt';
|
||||
@@ -213,8 +239,12 @@ declare module 'ace-builds/src-noconflict/theme-dracula';
|
||||
declare module 'ace-builds/src-noconflict/theme-dreamweaver';
|
||||
declare module 'ace-builds/src-noconflict/theme-eclipse';
|
||||
declare module 'ace-builds/src-noconflict/theme-github';
|
||||
declare module 'ace-builds/src-noconflict/theme-github_dark';
|
||||
declare module 'ace-builds/src-noconflict/theme-github_light_default';
|
||||
declare module 'ace-builds/src-noconflict/theme-gob';
|
||||
declare module 'ace-builds/src-noconflict/theme-gruvbox';
|
||||
declare module 'ace-builds/src-noconflict/theme-gruvbox_dark_hard';
|
||||
declare module 'ace-builds/src-noconflict/theme-gruvbox_light_hard';
|
||||
declare module 'ace-builds/src-noconflict/theme-idle_fingers';
|
||||
declare module 'ace-builds/src-noconflict/theme-iplastic';
|
||||
declare module 'ace-builds/src-noconflict/theme-katzenmilch';
|
||||
@@ -222,8 +252,8 @@ declare module 'ace-builds/src-noconflict/theme-kr_theme';
|
||||
declare module 'ace-builds/src-noconflict/theme-kuroir';
|
||||
declare module 'ace-builds/src-noconflict/theme-merbivore';
|
||||
declare module 'ace-builds/src-noconflict/theme-merbivore_soft';
|
||||
declare module 'ace-builds/src-noconflict/theme-monokai';
|
||||
declare module 'ace-builds/src-noconflict/theme-mono_industrial';
|
||||
declare module 'ace-builds/src-noconflict/theme-monokai';
|
||||
declare module 'ace-builds/src-noconflict/theme-nord_dark';
|
||||
declare module 'ace-builds/src-noconflict/theme-one_dark';
|
||||
declare module 'ace-builds/src-noconflict/theme-pastel_on_dark';
|
||||
@@ -251,10 +281,15 @@ declare module 'ace-builds/src-noconflict/snippets/applescript';
|
||||
declare module 'ace-builds/src-noconflict/snippets/aql';
|
||||
declare module 'ace-builds/src-noconflict/snippets/asciidoc';
|
||||
declare module 'ace-builds/src-noconflict/snippets/asl';
|
||||
declare module 'ace-builds/src-noconflict/snippets/assembly_arm32';
|
||||
declare module 'ace-builds/src-noconflict/snippets/assembly_x86';
|
||||
declare module 'ace-builds/src-noconflict/snippets/astro';
|
||||
declare module 'ace-builds/src-noconflict/snippets/autohotkey';
|
||||
declare module 'ace-builds/src-noconflict/snippets/basic';
|
||||
declare module 'ace-builds/src-noconflict/snippets/batchfile';
|
||||
declare module 'ace-builds/src-noconflict/snippets/bibtex';
|
||||
declare module 'ace-builds/src-noconflict/snippets/c9search';
|
||||
declare module 'ace-builds/src-noconflict/snippets/c_cpp';
|
||||
declare module 'ace-builds/src-noconflict/snippets/cirru';
|
||||
declare module 'ace-builds/src-noconflict/snippets/clojure';
|
||||
declare module 'ace-builds/src-noconflict/snippets/cobol';
|
||||
@@ -268,7 +303,7 @@ declare module 'ace-builds/src-noconflict/snippets/csound_score';
|
||||
declare module 'ace-builds/src-noconflict/snippets/csp';
|
||||
declare module 'ace-builds/src-noconflict/snippets/css';
|
||||
declare module 'ace-builds/src-noconflict/snippets/curly';
|
||||
declare module 'ace-builds/src-noconflict/snippets/c_cpp';
|
||||
declare module 'ace-builds/src-noconflict/snippets/cuttlefish';
|
||||
declare module 'ace-builds/src-noconflict/snippets/d';
|
||||
declare module 'ace-builds/src-noconflict/snippets/dart';
|
||||
declare module 'ace-builds/src-noconflict/snippets/diff';
|
||||
@@ -282,6 +317,7 @@ declare module 'ace-builds/src-noconflict/snippets/ejs';
|
||||
declare module 'ace-builds/src-noconflict/snippets/elixir';
|
||||
declare module 'ace-builds/src-noconflict/snippets/elm';
|
||||
declare module 'ace-builds/src-noconflict/snippets/erlang';
|
||||
declare module 'ace-builds/src-noconflict/snippets/flix';
|
||||
declare module 'ace-builds/src-noconflict/snippets/forth';
|
||||
declare module 'ace-builds/src-noconflict/snippets/fortran';
|
||||
declare module 'ace-builds/src-noconflict/snippets/fsharp';
|
||||
@@ -306,10 +342,12 @@ declare module 'ace-builds/src-noconflict/snippets/html_elixir';
|
||||
declare module 'ace-builds/src-noconflict/snippets/html_ruby';
|
||||
declare module 'ace-builds/src-noconflict/snippets/ini';
|
||||
declare module 'ace-builds/src-noconflict/snippets/io';
|
||||
declare module 'ace-builds/src-noconflict/snippets/ion';
|
||||
declare module 'ace-builds/src-noconflict/snippets/jack';
|
||||
declare module 'ace-builds/src-noconflict/snippets/jade';
|
||||
declare module 'ace-builds/src-noconflict/snippets/java';
|
||||
declare module 'ace-builds/src-noconflict/snippets/javascript';
|
||||
declare module 'ace-builds/src-noconflict/snippets/jexl';
|
||||
declare module 'ace-builds/src-noconflict/snippets/json';
|
||||
declare module 'ace-builds/src-noconflict/snippets/json5';
|
||||
declare module 'ace-builds/src-noconflict/snippets/jsoniq';
|
||||
@@ -341,6 +379,7 @@ declare module 'ace-builds/src-noconflict/snippets/mips';
|
||||
declare module 'ace-builds/src-noconflict/snippets/mixal';
|
||||
declare module 'ace-builds/src-noconflict/snippets/mushcode';
|
||||
declare module 'ace-builds/src-noconflict/snippets/mysql';
|
||||
declare module 'ace-builds/src-noconflict/snippets/nasal';
|
||||
declare module 'ace-builds/src-noconflict/snippets/nginx';
|
||||
declare module 'ace-builds/src-noconflict/snippets/nim';
|
||||
declare module 'ace-builds/src-noconflict/snippets/nix';
|
||||
@@ -348,6 +387,8 @@ declare module 'ace-builds/src-noconflict/snippets/nsis';
|
||||
declare module 'ace-builds/src-noconflict/snippets/nunjucks';
|
||||
declare module 'ace-builds/src-noconflict/snippets/objectivec';
|
||||
declare module 'ace-builds/src-noconflict/snippets/ocaml';
|
||||
declare module 'ace-builds/src-noconflict/snippets/odin';
|
||||
declare module 'ace-builds/src-noconflict/snippets/partiql';
|
||||
declare module 'ace-builds/src-noconflict/snippets/pascal';
|
||||
declare module 'ace-builds/src-noconflict/snippets/perl';
|
||||
declare module 'ace-builds/src-noconflict/snippets/pgsql';
|
||||
@@ -355,12 +396,14 @@ declare module 'ace-builds/src-noconflict/snippets/php';
|
||||
declare module 'ace-builds/src-noconflict/snippets/php_laravel_blade';
|
||||
declare module 'ace-builds/src-noconflict/snippets/pig';
|
||||
declare module 'ace-builds/src-noconflict/snippets/plain_text';
|
||||
declare module 'ace-builds/src-noconflict/snippets/plsql';
|
||||
declare module 'ace-builds/src-noconflict/snippets/powershell';
|
||||
declare module 'ace-builds/src-noconflict/snippets/praat';
|
||||
declare module 'ace-builds/src-noconflict/snippets/prisma';
|
||||
declare module 'ace-builds/src-noconflict/snippets/prolog';
|
||||
declare module 'ace-builds/src-noconflict/snippets/properties';
|
||||
declare module 'ace-builds/src-noconflict/snippets/protobuf';
|
||||
declare module 'ace-builds/src-noconflict/snippets/prql';
|
||||
declare module 'ace-builds/src-noconflict/snippets/puppet';
|
||||
declare module 'ace-builds/src-noconflict/snippets/python';
|
||||
declare module 'ace-builds/src-noconflict/snippets/qml';
|
||||
@@ -371,9 +414,11 @@ declare module 'ace-builds/src-noconflict/snippets/rdoc';
|
||||
declare module 'ace-builds/src-noconflict/snippets/red';
|
||||
declare module 'ace-builds/src-noconflict/snippets/redshift';
|
||||
declare module 'ace-builds/src-noconflict/snippets/rhtml';
|
||||
declare module 'ace-builds/src-noconflict/snippets/robot';
|
||||
declare module 'ace-builds/src-noconflict/snippets/rst';
|
||||
declare module 'ace-builds/src-noconflict/snippets/ruby';
|
||||
declare module 'ace-builds/src-noconflict/snippets/rust';
|
||||
declare module 'ace-builds/src-noconflict/snippets/sac';
|
||||
declare module 'ace-builds/src-noconflict/snippets/sass';
|
||||
declare module 'ace-builds/src-noconflict/snippets/scad';
|
||||
declare module 'ace-builds/src-noconflict/snippets/scala';
|
||||
@@ -410,8 +455,10 @@ declare module 'ace-builds/src-noconflict/snippets/velocity';
|
||||
declare module 'ace-builds/src-noconflict/snippets/verilog';
|
||||
declare module 'ace-builds/src-noconflict/snippets/vhdl';
|
||||
declare module 'ace-builds/src-noconflict/snippets/visualforce';
|
||||
declare module 'ace-builds/src-noconflict/snippets/vue';
|
||||
declare module 'ace-builds/src-noconflict/snippets/wollok';
|
||||
declare module 'ace-builds/src-noconflict/snippets/xml';
|
||||
declare module 'ace-builds/src-noconflict/snippets/xquery';
|
||||
declare module 'ace-builds/src-noconflict/snippets/yaml';
|
||||
declare module 'ace-builds/src-noconflict/snippets/zeek';
|
||||
declare module 'ace-builds/src-noconflict/snippets/zig';
|
||||
|
||||
1973
htdocs/includes/ace/ace.d.ts
vendored
1973
htdocs/includes/ace/ace.d.ts
vendored
File diff suppressed because it is too large
Load Diff
39
htdocs/includes/ace/editor.html
Normal file
39
htdocs/includes/ace/editor.html
Normal file
@@ -0,0 +1,39 @@
|
||||
<!DOCTYPE html>
|
||||
<html lang="en">
|
||||
<head>
|
||||
<meta charset="UTF-8">
|
||||
<meta http-equiv="X-UA-Compatible" content="IE=edge,chrome=1">
|
||||
<title>Editor</title>
|
||||
<style type="text/css" media="screen">
|
||||
body {
|
||||
overflow: hidden;
|
||||
}
|
||||
|
||||
#editor {
|
||||
margin: 0;
|
||||
position: absolute;
|
||||
top: 0;
|
||||
bottom: 0;
|
||||
left: 0;
|
||||
right: 0;
|
||||
}
|
||||
</style>
|
||||
</head>
|
||||
<body>
|
||||
|
||||
<pre id="editor">function foo(items) {
|
||||
var i;
|
||||
for (i = 0; i < items.length; i++) {
|
||||
alert("Ace Rocks " + items[i]);
|
||||
}
|
||||
}</pre>
|
||||
|
||||
<script src="src-noconflict/ace.js" type="text/javascript" charset="utf-8"></script>
|
||||
<script>
|
||||
var editor = ace.edit("editor");
|
||||
editor.setTheme("ace/theme/twilight");
|
||||
editor.session.setMode("ace/mode/javascript");
|
||||
</script>
|
||||
|
||||
</body>
|
||||
</html>
|
||||
479
htdocs/includes/ace/esm-resolver.js
Normal file
479
htdocs/includes/ace/esm-resolver.js
Normal file
@@ -0,0 +1,479 @@
|
||||
ace.config.setModuleLoader('ace/ext/beautify', () => import('./src-noconflict/ext-beautify.js'));
|
||||
ace.config.setModuleLoader('ace/ext/code_lens', () => import('./src-noconflict/ext-code_lens.js'));
|
||||
ace.config.setModuleLoader('ace/ext/command_bar', () => import('./src-noconflict/ext-command_bar.js'));
|
||||
ace.config.setModuleLoader('ace/ext/diff', () => import('./src-noconflict/ext-diff.js'));
|
||||
ace.config.setModuleLoader('ace/ext/elastic_tabstops_lite', () => import('./src-noconflict/ext-elastic_tabstops_lite.js'));
|
||||
ace.config.setModuleLoader('ace/ext/emmet', () => import('./src-noconflict/ext-emmet.js'));
|
||||
ace.config.setModuleLoader('ace/ext/error_marker', () => import('./src-noconflict/ext-error_marker.js'));
|
||||
ace.config.setModuleLoader('ace/ext/hardwrap', () => import('./src-noconflict/ext-hardwrap.js'));
|
||||
ace.config.setModuleLoader('ace/ext/inline_autocomplete', () => import('./src-noconflict/ext-inline_autocomplete.js'));
|
||||
ace.config.setModuleLoader('ace/ext/keyboard_menu', () => import('./src-noconflict/ext-keybinding_menu.js'));
|
||||
ace.config.setModuleLoader('ace/ext/language_tools', () => import('./src-noconflict/ext-language_tools.js'));
|
||||
ace.config.setModuleLoader('ace/ext/linking', () => import('./src-noconflict/ext-linking.js'));
|
||||
ace.config.setModuleLoader('ace/ext/modelist', () => import('./src-noconflict/ext-modelist.js'));
|
||||
ace.config.setModuleLoader('ace/ext/options', () => import('./src-noconflict/ext-options.js'));
|
||||
ace.config.setModuleLoader('ace/ext/prompt', () => import('./src-noconflict/ext-prompt.js'));
|
||||
ace.config.setModuleLoader('ace/ext/rtl', () => import('./src-noconflict/ext-rtl.js'));
|
||||
ace.config.setModuleLoader('ace/ext/searchbox', () => import('./src-noconflict/ext-searchbox.js'));
|
||||
ace.config.setModuleLoader('ace/ext/settings_menu', () => import('./src-noconflict/ext-settings_menu.js'));
|
||||
ace.config.setModuleLoader('ace/ext/simple_tokenizer', () => import('./src-noconflict/ext-simple_tokenizer.js'));
|
||||
ace.config.setModuleLoader('ace/ext/spellcheck', () => import('./src-noconflict/ext-spellcheck.js'));
|
||||
ace.config.setModuleLoader('ace/ext/split', () => import('./src-noconflict/ext-split.js'));
|
||||
ace.config.setModuleLoader('ace/ext/static_highlight', () => import('./src-noconflict/ext-static_highlight.js'));
|
||||
ace.config.setModuleLoader('ace/ext/statusbar', () => import('./src-noconflict/ext-statusbar.js'));
|
||||
ace.config.setModuleLoader('ace/ext/textarea', () => import('./src-noconflict/ext-textarea.js'));
|
||||
ace.config.setModuleLoader('ace/ext/themelist', () => import('./src-noconflict/ext-themelist.js'));
|
||||
ace.config.setModuleLoader('ace/ext/whitespace', () => import('./src-noconflict/ext-whitespace.js'));
|
||||
ace.config.setModuleLoader('ace/keyboard/emacs', () => import('./src-noconflict/keybinding-emacs.js'));
|
||||
ace.config.setModuleLoader('ace/keyboard/sublime', () => import('./src-noconflict/keybinding-sublime.js'));
|
||||
ace.config.setModuleLoader('ace/keyboard/vim', () => import('./src-noconflict/keybinding-vim.js'));
|
||||
ace.config.setModuleLoader('ace/keyboard/vscode', () => import('./src-noconflict/keybinding-vscode.js'));
|
||||
ace.config.setModuleLoader('ace/mode/abap', () => import('./src-noconflict/mode-abap.js'));
|
||||
ace.config.setModuleLoader('ace/mode/abc', () => import('./src-noconflict/mode-abc.js'));
|
||||
ace.config.setModuleLoader('ace/mode/actionscript', () => import('./src-noconflict/mode-actionscript.js'));
|
||||
ace.config.setModuleLoader('ace/mode/ada', () => import('./src-noconflict/mode-ada.js'));
|
||||
ace.config.setModuleLoader('ace/mode/alda', () => import('./src-noconflict/mode-alda.js'));
|
||||
ace.config.setModuleLoader('ace/mode/apache_conf', () => import('./src-noconflict/mode-apache_conf.js'));
|
||||
ace.config.setModuleLoader('ace/mode/apex', () => import('./src-noconflict/mode-apex.js'));
|
||||
ace.config.setModuleLoader('ace/mode/applescript', () => import('./src-noconflict/mode-applescript.js'));
|
||||
ace.config.setModuleLoader('ace/mode/aql', () => import('./src-noconflict/mode-aql.js'));
|
||||
ace.config.setModuleLoader('ace/mode/asciidoc', () => import('./src-noconflict/mode-asciidoc.js'));
|
||||
ace.config.setModuleLoader('ace/mode/asl', () => import('./src-noconflict/mode-asl.js'));
|
||||
ace.config.setModuleLoader('ace/mode/assembly_arm32', () => import('./src-noconflict/mode-assembly_arm32.js'));
|
||||
ace.config.setModuleLoader('ace/mode/assembly_x86', () => import('./src-noconflict/mode-assembly_x86.js'));
|
||||
ace.config.setModuleLoader('ace/mode/astro', () => import('./src-noconflict/mode-astro.js'));
|
||||
ace.config.setModuleLoader('ace/mode/autohotkey', () => import('./src-noconflict/mode-autohotkey.js'));
|
||||
ace.config.setModuleLoader('ace/mode/basic', () => import('./src-noconflict/mode-basic.js'));
|
||||
ace.config.setModuleLoader('ace/mode/batchfile', () => import('./src-noconflict/mode-batchfile.js'));
|
||||
ace.config.setModuleLoader('ace/mode/bibtex', () => import('./src-noconflict/mode-bibtex.js'));
|
||||
ace.config.setModuleLoader('ace/mode/c9search', () => import('./src-noconflict/mode-c9search.js'));
|
||||
ace.config.setModuleLoader('ace/mode/c_cpp', () => import('./src-noconflict/mode-c_cpp.js'));
|
||||
ace.config.setModuleLoader('ace/mode/cirru', () => import('./src-noconflict/mode-cirru.js'));
|
||||
ace.config.setModuleLoader('ace/mode/clojure', () => import('./src-noconflict/mode-clojure.js'));
|
||||
ace.config.setModuleLoader('ace/mode/clue', () => import('./src-noconflict/mode-clue.js'));
|
||||
ace.config.setModuleLoader('ace/mode/cobol', () => import('./src-noconflict/mode-cobol.js'));
|
||||
ace.config.setModuleLoader('ace/mode/coffee', () => import('./src-noconflict/mode-coffee.js'));
|
||||
ace.config.setModuleLoader('ace/mode/coldfusion', () => import('./src-noconflict/mode-coldfusion.js'));
|
||||
ace.config.setModuleLoader('ace/mode/crystal', () => import('./src-noconflict/mode-crystal.js'));
|
||||
ace.config.setModuleLoader('ace/mode/csharp', () => import('./src-noconflict/mode-csharp.js'));
|
||||
ace.config.setModuleLoader('ace/mode/csound_document', () => import('./src-noconflict/mode-csound_document.js'));
|
||||
ace.config.setModuleLoader('ace/mode/csound_orchestra', () => import('./src-noconflict/mode-csound_orchestra.js'));
|
||||
ace.config.setModuleLoader('ace/mode/csound_score', () => import('./src-noconflict/mode-csound_score.js'));
|
||||
ace.config.setModuleLoader('ace/mode/csp', () => import('./src-noconflict/mode-csp.js'));
|
||||
ace.config.setModuleLoader('ace/mode/css', () => import('./src-noconflict/mode-css.js'));
|
||||
ace.config.setModuleLoader('ace/mode/csv', () => import('./src-noconflict/mode-csv.js'));
|
||||
ace.config.setModuleLoader('ace/mode/curly', () => import('./src-noconflict/mode-curly.js'));
|
||||
ace.config.setModuleLoader('ace/mode/cuttlefish', () => import('./src-noconflict/mode-cuttlefish.js'));
|
||||
ace.config.setModuleLoader('ace/mode/d', () => import('./src-noconflict/mode-d.js'));
|
||||
ace.config.setModuleLoader('ace/mode/dart', () => import('./src-noconflict/mode-dart.js'));
|
||||
ace.config.setModuleLoader('ace/mode/diff', () => import('./src-noconflict/mode-diff.js'));
|
||||
ace.config.setModuleLoader('ace/mode/django', () => import('./src-noconflict/mode-django.js'));
|
||||
ace.config.setModuleLoader('ace/mode/dockerfile', () => import('./src-noconflict/mode-dockerfile.js'));
|
||||
ace.config.setModuleLoader('ace/mode/dot', () => import('./src-noconflict/mode-dot.js'));
|
||||
ace.config.setModuleLoader('ace/mode/drools', () => import('./src-noconflict/mode-drools.js'));
|
||||
ace.config.setModuleLoader('ace/mode/edifact', () => import('./src-noconflict/mode-edifact.js'));
|
||||
ace.config.setModuleLoader('ace/mode/eiffel', () => import('./src-noconflict/mode-eiffel.js'));
|
||||
ace.config.setModuleLoader('ace/mode/ejs', () => import('./src-noconflict/mode-ejs.js'));
|
||||
ace.config.setModuleLoader('ace/mode/elixir', () => import('./src-noconflict/mode-elixir.js'));
|
||||
ace.config.setModuleLoader('ace/mode/elm', () => import('./src-noconflict/mode-elm.js'));
|
||||
ace.config.setModuleLoader('ace/mode/erlang', () => import('./src-noconflict/mode-erlang.js'));
|
||||
ace.config.setModuleLoader('ace/mode/flix', () => import('./src-noconflict/mode-flix.js'));
|
||||
ace.config.setModuleLoader('ace/mode/forth', () => import('./src-noconflict/mode-forth.js'));
|
||||
ace.config.setModuleLoader('ace/mode/fortran', () => import('./src-noconflict/mode-fortran.js'));
|
||||
ace.config.setModuleLoader('ace/mode/fsharp', () => import('./src-noconflict/mode-fsharp.js'));
|
||||
ace.config.setModuleLoader('ace/mode/fsl', () => import('./src-noconflict/mode-fsl.js'));
|
||||
ace.config.setModuleLoader('ace/mode/ftl', () => import('./src-noconflict/mode-ftl.js'));
|
||||
ace.config.setModuleLoader('ace/mode/gcode', () => import('./src-noconflict/mode-gcode.js'));
|
||||
ace.config.setModuleLoader('ace/mode/gherkin', () => import('./src-noconflict/mode-gherkin.js'));
|
||||
ace.config.setModuleLoader('ace/mode/gitignore', () => import('./src-noconflict/mode-gitignore.js'));
|
||||
ace.config.setModuleLoader('ace/mode/glsl', () => import('./src-noconflict/mode-glsl.js'));
|
||||
ace.config.setModuleLoader('ace/mode/gobstones', () => import('./src-noconflict/mode-gobstones.js'));
|
||||
ace.config.setModuleLoader('ace/mode/golang', () => import('./src-noconflict/mode-golang.js'));
|
||||
ace.config.setModuleLoader('ace/mode/graphqlschema', () => import('./src-noconflict/mode-graphqlschema.js'));
|
||||
ace.config.setModuleLoader('ace/mode/groovy', () => import('./src-noconflict/mode-groovy.js'));
|
||||
ace.config.setModuleLoader('ace/mode/haml', () => import('./src-noconflict/mode-haml.js'));
|
||||
ace.config.setModuleLoader('ace/mode/handlebars', () => import('./src-noconflict/mode-handlebars.js'));
|
||||
ace.config.setModuleLoader('ace/mode/haskell', () => import('./src-noconflict/mode-haskell.js'));
|
||||
ace.config.setModuleLoader('ace/mode/haskell_cabal', () => import('./src-noconflict/mode-haskell_cabal.js'));
|
||||
ace.config.setModuleLoader('ace/mode/haxe', () => import('./src-noconflict/mode-haxe.js'));
|
||||
ace.config.setModuleLoader('ace/mode/hjson', () => import('./src-noconflict/mode-hjson.js'));
|
||||
ace.config.setModuleLoader('ace/mode/html', () => import('./src-noconflict/mode-html.js'));
|
||||
ace.config.setModuleLoader('ace/mode/html_elixir', () => import('./src-noconflict/mode-html_elixir.js'));
|
||||
ace.config.setModuleLoader('ace/mode/html_ruby', () => import('./src-noconflict/mode-html_ruby.js'));
|
||||
ace.config.setModuleLoader('ace/mode/ini', () => import('./src-noconflict/mode-ini.js'));
|
||||
ace.config.setModuleLoader('ace/mode/io', () => import('./src-noconflict/mode-io.js'));
|
||||
ace.config.setModuleLoader('ace/mode/ion', () => import('./src-noconflict/mode-ion.js'));
|
||||
ace.config.setModuleLoader('ace/mode/jack', () => import('./src-noconflict/mode-jack.js'));
|
||||
ace.config.setModuleLoader('ace/mode/jade', () => import('./src-noconflict/mode-jade.js'));
|
||||
ace.config.setModuleLoader('ace/mode/java', () => import('./src-noconflict/mode-java.js'));
|
||||
ace.config.setModuleLoader('ace/mode/javascript', () => import('./src-noconflict/mode-javascript.js'));
|
||||
ace.config.setModuleLoader('ace/mode/jexl', () => import('./src-noconflict/mode-jexl.js'));
|
||||
ace.config.setModuleLoader('ace/mode/json', () => import('./src-noconflict/mode-json.js'));
|
||||
ace.config.setModuleLoader('ace/mode/json5', () => import('./src-noconflict/mode-json5.js'));
|
||||
ace.config.setModuleLoader('ace/mode/jsoniq', () => import('./src-noconflict/mode-jsoniq.js'));
|
||||
ace.config.setModuleLoader('ace/mode/jsp', () => import('./src-noconflict/mode-jsp.js'));
|
||||
ace.config.setModuleLoader('ace/mode/jssm', () => import('./src-noconflict/mode-jssm.js'));
|
||||
ace.config.setModuleLoader('ace/mode/jsx', () => import('./src-noconflict/mode-jsx.js'));
|
||||
ace.config.setModuleLoader('ace/mode/julia', () => import('./src-noconflict/mode-julia.js'));
|
||||
ace.config.setModuleLoader('ace/mode/kotlin', () => import('./src-noconflict/mode-kotlin.js'));
|
||||
ace.config.setModuleLoader('ace/mode/latex', () => import('./src-noconflict/mode-latex.js'));
|
||||
ace.config.setModuleLoader('ace/mode/latte', () => import('./src-noconflict/mode-latte.js'));
|
||||
ace.config.setModuleLoader('ace/mode/less', () => import('./src-noconflict/mode-less.js'));
|
||||
ace.config.setModuleLoader('ace/mode/liquid', () => import('./src-noconflict/mode-liquid.js'));
|
||||
ace.config.setModuleLoader('ace/mode/lisp', () => import('./src-noconflict/mode-lisp.js'));
|
||||
ace.config.setModuleLoader('ace/mode/livescript', () => import('./src-noconflict/mode-livescript.js'));
|
||||
ace.config.setModuleLoader('ace/mode/logiql', () => import('./src-noconflict/mode-logiql.js'));
|
||||
ace.config.setModuleLoader('ace/mode/logtalk', () => import('./src-noconflict/mode-logtalk.js'));
|
||||
ace.config.setModuleLoader('ace/mode/lsl', () => import('./src-noconflict/mode-lsl.js'));
|
||||
ace.config.setModuleLoader('ace/mode/lua', () => import('./src-noconflict/mode-lua.js'));
|
||||
ace.config.setModuleLoader('ace/mode/luapage', () => import('./src-noconflict/mode-luapage.js'));
|
||||
ace.config.setModuleLoader('ace/mode/lucene', () => import('./src-noconflict/mode-lucene.js'));
|
||||
ace.config.setModuleLoader('ace/mode/makefile', () => import('./src-noconflict/mode-makefile.js'));
|
||||
ace.config.setModuleLoader('ace/mode/markdown', () => import('./src-noconflict/mode-markdown.js'));
|
||||
ace.config.setModuleLoader('ace/mode/mask', () => import('./src-noconflict/mode-mask.js'));
|
||||
ace.config.setModuleLoader('ace/mode/matlab', () => import('./src-noconflict/mode-matlab.js'));
|
||||
ace.config.setModuleLoader('ace/mode/maze', () => import('./src-noconflict/mode-maze.js'));
|
||||
ace.config.setModuleLoader('ace/mode/mediawiki', () => import('./src-noconflict/mode-mediawiki.js'));
|
||||
ace.config.setModuleLoader('ace/mode/mel', () => import('./src-noconflict/mode-mel.js'));
|
||||
ace.config.setModuleLoader('ace/mode/mips', () => import('./src-noconflict/mode-mips.js'));
|
||||
ace.config.setModuleLoader('ace/mode/mixal', () => import('./src-noconflict/mode-mixal.js'));
|
||||
ace.config.setModuleLoader('ace/mode/mushcode', () => import('./src-noconflict/mode-mushcode.js'));
|
||||
ace.config.setModuleLoader('ace/mode/mysql', () => import('./src-noconflict/mode-mysql.js'));
|
||||
ace.config.setModuleLoader('ace/mode/nasal', () => import('./src-noconflict/mode-nasal.js'));
|
||||
ace.config.setModuleLoader('ace/mode/nginx', () => import('./src-noconflict/mode-nginx.js'));
|
||||
ace.config.setModuleLoader('ace/mode/nim', () => import('./src-noconflict/mode-nim.js'));
|
||||
ace.config.setModuleLoader('ace/mode/nix', () => import('./src-noconflict/mode-nix.js'));
|
||||
ace.config.setModuleLoader('ace/mode/nsis', () => import('./src-noconflict/mode-nsis.js'));
|
||||
ace.config.setModuleLoader('ace/mode/nunjucks', () => import('./src-noconflict/mode-nunjucks.js'));
|
||||
ace.config.setModuleLoader('ace/mode/objectivec', () => import('./src-noconflict/mode-objectivec.js'));
|
||||
ace.config.setModuleLoader('ace/mode/ocaml', () => import('./src-noconflict/mode-ocaml.js'));
|
||||
ace.config.setModuleLoader('ace/mode/odin', () => import('./src-noconflict/mode-odin.js'));
|
||||
ace.config.setModuleLoader('ace/mode/partiql', () => import('./src-noconflict/mode-partiql.js'));
|
||||
ace.config.setModuleLoader('ace/mode/pascal', () => import('./src-noconflict/mode-pascal.js'));
|
||||
ace.config.setModuleLoader('ace/mode/perl', () => import('./src-noconflict/mode-perl.js'));
|
||||
ace.config.setModuleLoader('ace/mode/pgsql', () => import('./src-noconflict/mode-pgsql.js'));
|
||||
ace.config.setModuleLoader('ace/mode/php', () => import('./src-noconflict/mode-php.js'));
|
||||
ace.config.setModuleLoader('ace/mode/php_laravel_blade', () => import('./src-noconflict/mode-php_laravel_blade.js'));
|
||||
ace.config.setModuleLoader('ace/mode/pig', () => import('./src-noconflict/mode-pig.js'));
|
||||
ace.config.setModuleLoader('ace/mode/plain_text', () => import('./src-noconflict/mode-plain_text.js'));
|
||||
ace.config.setModuleLoader('ace/mode/plsql', () => import('./src-noconflict/mode-plsql.js'));
|
||||
ace.config.setModuleLoader('ace/mode/powershell', () => import('./src-noconflict/mode-powershell.js'));
|
||||
ace.config.setModuleLoader('ace/mode/praat', () => import('./src-noconflict/mode-praat.js'));
|
||||
ace.config.setModuleLoader('ace/mode/prisma', () => import('./src-noconflict/mode-prisma.js'));
|
||||
ace.config.setModuleLoader('ace/mode/prolog', () => import('./src-noconflict/mode-prolog.js'));
|
||||
ace.config.setModuleLoader('ace/mode/properties', () => import('./src-noconflict/mode-properties.js'));
|
||||
ace.config.setModuleLoader('ace/mode/protobuf', () => import('./src-noconflict/mode-protobuf.js'));
|
||||
ace.config.setModuleLoader('ace/mode/prql', () => import('./src-noconflict/mode-prql.js'));
|
||||
ace.config.setModuleLoader('ace/mode/puppet', () => import('./src-noconflict/mode-puppet.js'));
|
||||
ace.config.setModuleLoader('ace/mode/python', () => import('./src-noconflict/mode-python.js'));
|
||||
ace.config.setModuleLoader('ace/mode/qml', () => import('./src-noconflict/mode-qml.js'));
|
||||
ace.config.setModuleLoader('ace/mode/r', () => import('./src-noconflict/mode-r.js'));
|
||||
ace.config.setModuleLoader('ace/mode/raku', () => import('./src-noconflict/mode-raku.js'));
|
||||
ace.config.setModuleLoader('ace/mode/razor', () => import('./src-noconflict/mode-razor.js'));
|
||||
ace.config.setModuleLoader('ace/mode/rdoc', () => import('./src-noconflict/mode-rdoc.js'));
|
||||
ace.config.setModuleLoader('ace/mode/red', () => import('./src-noconflict/mode-red.js'));
|
||||
ace.config.setModuleLoader('ace/mode/redshift', () => import('./src-noconflict/mode-redshift.js'));
|
||||
ace.config.setModuleLoader('ace/mode/rhtml', () => import('./src-noconflict/mode-rhtml.js'));
|
||||
ace.config.setModuleLoader('ace/mode/robot', () => import('./src-noconflict/mode-robot.js'));
|
||||
ace.config.setModuleLoader('ace/mode/rst', () => import('./src-noconflict/mode-rst.js'));
|
||||
ace.config.setModuleLoader('ace/mode/ruby', () => import('./src-noconflict/mode-ruby.js'));
|
||||
ace.config.setModuleLoader('ace/mode/rust', () => import('./src-noconflict/mode-rust.js'));
|
||||
ace.config.setModuleLoader('ace/mode/sac', () => import('./src-noconflict/mode-sac.js'));
|
||||
ace.config.setModuleLoader('ace/mode/sass', () => import('./src-noconflict/mode-sass.js'));
|
||||
ace.config.setModuleLoader('ace/mode/scad', () => import('./src-noconflict/mode-scad.js'));
|
||||
ace.config.setModuleLoader('ace/mode/scala', () => import('./src-noconflict/mode-scala.js'));
|
||||
ace.config.setModuleLoader('ace/mode/scheme', () => import('./src-noconflict/mode-scheme.js'));
|
||||
ace.config.setModuleLoader('ace/mode/scrypt', () => import('./src-noconflict/mode-scrypt.js'));
|
||||
ace.config.setModuleLoader('ace/mode/scss', () => import('./src-noconflict/mode-scss.js'));
|
||||
ace.config.setModuleLoader('ace/mode/sh', () => import('./src-noconflict/mode-sh.js'));
|
||||
ace.config.setModuleLoader('ace/mode/sjs', () => import('./src-noconflict/mode-sjs.js'));
|
||||
ace.config.setModuleLoader('ace/mode/slim', () => import('./src-noconflict/mode-slim.js'));
|
||||
ace.config.setModuleLoader('ace/mode/smarty', () => import('./src-noconflict/mode-smarty.js'));
|
||||
ace.config.setModuleLoader('ace/mode/smithy', () => import('./src-noconflict/mode-smithy.js'));
|
||||
ace.config.setModuleLoader('ace/mode/snippets', () => import('./src-noconflict/mode-snippets.js'));
|
||||
ace.config.setModuleLoader('ace/mode/soy_template', () => import('./src-noconflict/mode-soy_template.js'));
|
||||
ace.config.setModuleLoader('ace/mode/space', () => import('./src-noconflict/mode-space.js'));
|
||||
ace.config.setModuleLoader('ace/mode/sparql', () => import('./src-noconflict/mode-sparql.js'));
|
||||
ace.config.setModuleLoader('ace/mode/sql', () => import('./src-noconflict/mode-sql.js'));
|
||||
ace.config.setModuleLoader('ace/mode/sqlserver', () => import('./src-noconflict/mode-sqlserver.js'));
|
||||
ace.config.setModuleLoader('ace/mode/stylus', () => import('./src-noconflict/mode-stylus.js'));
|
||||
ace.config.setModuleLoader('ace/mode/svg', () => import('./src-noconflict/mode-svg.js'));
|
||||
ace.config.setModuleLoader('ace/mode/swift', () => import('./src-noconflict/mode-swift.js'));
|
||||
ace.config.setModuleLoader('ace/mode/tcl', () => import('./src-noconflict/mode-tcl.js'));
|
||||
ace.config.setModuleLoader('ace/mode/terraform', () => import('./src-noconflict/mode-terraform.js'));
|
||||
ace.config.setModuleLoader('ace/mode/tex', () => import('./src-noconflict/mode-tex.js'));
|
||||
ace.config.setModuleLoader('ace/mode/text', () => import('./src-noconflict/mode-text.js'));
|
||||
ace.config.setModuleLoader('ace/mode/textile', () => import('./src-noconflict/mode-textile.js'));
|
||||
ace.config.setModuleLoader('ace/mode/toml', () => import('./src-noconflict/mode-toml.js'));
|
||||
ace.config.setModuleLoader('ace/mode/tsv', () => import('./src-noconflict/mode-tsv.js'));
|
||||
ace.config.setModuleLoader('ace/mode/tsx', () => import('./src-noconflict/mode-tsx.js'));
|
||||
ace.config.setModuleLoader('ace/mode/turtle', () => import('./src-noconflict/mode-turtle.js'));
|
||||
ace.config.setModuleLoader('ace/mode/twig', () => import('./src-noconflict/mode-twig.js'));
|
||||
ace.config.setModuleLoader('ace/mode/typescript', () => import('./src-noconflict/mode-typescript.js'));
|
||||
ace.config.setModuleLoader('ace/mode/vala', () => import('./src-noconflict/mode-vala.js'));
|
||||
ace.config.setModuleLoader('ace/mode/vbscript', () => import('./src-noconflict/mode-vbscript.js'));
|
||||
ace.config.setModuleLoader('ace/mode/velocity', () => import('./src-noconflict/mode-velocity.js'));
|
||||
ace.config.setModuleLoader('ace/mode/verilog', () => import('./src-noconflict/mode-verilog.js'));
|
||||
ace.config.setModuleLoader('ace/mode/vhdl', () => import('./src-noconflict/mode-vhdl.js'));
|
||||
ace.config.setModuleLoader('ace/mode/visualforce', () => import('./src-noconflict/mode-visualforce.js'));
|
||||
ace.config.setModuleLoader('ace/mode/vue', () => import('./src-noconflict/mode-vue.js'));
|
||||
ace.config.setModuleLoader('ace/mode/wollok', () => import('./src-noconflict/mode-wollok.js'));
|
||||
ace.config.setModuleLoader('ace/mode/xml', () => import('./src-noconflict/mode-xml.js'));
|
||||
ace.config.setModuleLoader('ace/mode/xquery', () => import('./src-noconflict/mode-xquery.js'));
|
||||
ace.config.setModuleLoader('ace/mode/yaml', () => import('./src-noconflict/mode-yaml.js'));
|
||||
ace.config.setModuleLoader('ace/mode/zeek', () => import('./src-noconflict/mode-zeek.js'));
|
||||
ace.config.setModuleLoader('ace/mode/zig', () => import('./src-noconflict/mode-zig.js'));
|
||||
ace.config.setModuleLoader('ace/theme/ambiance', () => import('./src-noconflict/theme-ambiance.js'));
|
||||
ace.config.setModuleLoader('ace/theme/chaos', () => import('./src-noconflict/theme-chaos.js'));
|
||||
ace.config.setModuleLoader('ace/theme/chrome', () => import('./src-noconflict/theme-chrome.js'));
|
||||
ace.config.setModuleLoader('ace/theme/cloud9_day', () => import('./src-noconflict/theme-cloud9_day.js'));
|
||||
ace.config.setModuleLoader('ace/theme/cloud9_night', () => import('./src-noconflict/theme-cloud9_night.js'));
|
||||
ace.config.setModuleLoader('ace/theme/cloud9_night_low_color', () => import('./src-noconflict/theme-cloud9_night_low_color.js'));
|
||||
ace.config.setModuleLoader('ace/theme/cloud_editor', () => import('./src-noconflict/theme-cloud_editor.js'));
|
||||
ace.config.setModuleLoader('ace/theme/cloud_editor_dark', () => import('./src-noconflict/theme-cloud_editor_dark.js'));
|
||||
ace.config.setModuleLoader('ace/theme/clouds', () => import('./src-noconflict/theme-clouds.js'));
|
||||
ace.config.setModuleLoader('ace/theme/clouds_midnight', () => import('./src-noconflict/theme-clouds_midnight.js'));
|
||||
ace.config.setModuleLoader('ace/theme/cobalt', () => import('./src-noconflict/theme-cobalt.js'));
|
||||
ace.config.setModuleLoader('ace/theme/crimson_editor', () => import('./src-noconflict/theme-crimson_editor.js'));
|
||||
ace.config.setModuleLoader('ace/theme/dawn', () => import('./src-noconflict/theme-dawn.js'));
|
||||
ace.config.setModuleLoader('ace/theme/dracula', () => import('./src-noconflict/theme-dracula.js'));
|
||||
ace.config.setModuleLoader('ace/theme/dreamweaver', () => import('./src-noconflict/theme-dreamweaver.js'));
|
||||
ace.config.setModuleLoader('ace/theme/eclipse', () => import('./src-noconflict/theme-eclipse.js'));
|
||||
ace.config.setModuleLoader('ace/theme/github', () => import('./src-noconflict/theme-github.js'));
|
||||
ace.config.setModuleLoader('ace/theme/github_dark', () => import('./src-noconflict/theme-github_dark.js'));
|
||||
ace.config.setModuleLoader('ace/theme/github_light_default', () => import('./src-noconflict/theme-github_light_default.js'));
|
||||
ace.config.setModuleLoader('ace/theme/gob', () => import('./src-noconflict/theme-gob.js'));
|
||||
ace.config.setModuleLoader('ace/theme/gruvbox', () => import('./src-noconflict/theme-gruvbox.js'));
|
||||
ace.config.setModuleLoader('ace/theme/gruvbox_dark_hard', () => import('./src-noconflict/theme-gruvbox_dark_hard.js'));
|
||||
ace.config.setModuleLoader('ace/theme/gruvbox_light_hard', () => import('./src-noconflict/theme-gruvbox_light_hard.js'));
|
||||
ace.config.setModuleLoader('ace/theme/idle_fingers', () => import('./src-noconflict/theme-idle_fingers.js'));
|
||||
ace.config.setModuleLoader('ace/theme/iplastic', () => import('./src-noconflict/theme-iplastic.js'));
|
||||
ace.config.setModuleLoader('ace/theme/katzenmilch', () => import('./src-noconflict/theme-katzenmilch.js'));
|
||||
ace.config.setModuleLoader('ace/theme/kr_theme', () => import('./src-noconflict/theme-kr_theme.js'));
|
||||
ace.config.setModuleLoader('ace/theme/kuroir', () => import('./src-noconflict/theme-kuroir.js'));
|
||||
ace.config.setModuleLoader('ace/theme/merbivore', () => import('./src-noconflict/theme-merbivore.js'));
|
||||
ace.config.setModuleLoader('ace/theme/merbivore_soft', () => import('./src-noconflict/theme-merbivore_soft.js'));
|
||||
ace.config.setModuleLoader('ace/theme/mono_industrial', () => import('./src-noconflict/theme-mono_industrial.js'));
|
||||
ace.config.setModuleLoader('ace/theme/monokai', () => import('./src-noconflict/theme-monokai.js'));
|
||||
ace.config.setModuleLoader('ace/theme/nord_dark', () => import('./src-noconflict/theme-nord_dark.js'));
|
||||
ace.config.setModuleLoader('ace/theme/one_dark', () => import('./src-noconflict/theme-one_dark.js'));
|
||||
ace.config.setModuleLoader('ace/theme/pastel_on_dark', () => import('./src-noconflict/theme-pastel_on_dark.js'));
|
||||
ace.config.setModuleLoader('ace/theme/solarized_dark', () => import('./src-noconflict/theme-solarized_dark.js'));
|
||||
ace.config.setModuleLoader('ace/theme/solarized_light', () => import('./src-noconflict/theme-solarized_light.js'));
|
||||
ace.config.setModuleLoader('ace/theme/sqlserver', () => import('./src-noconflict/theme-sqlserver.js'));
|
||||
ace.config.setModuleLoader('ace/theme/terminal', () => import('./src-noconflict/theme-terminal.js'));
|
||||
ace.config.setModuleLoader('ace/theme/textmate', () => import('./src-noconflict/theme-textmate.js'));
|
||||
ace.config.setModuleLoader('ace/theme/tomorrow', () => import('./src-noconflict/theme-tomorrow.js'));
|
||||
ace.config.setModuleLoader('ace/theme/tomorrow_night', () => import('./src-noconflict/theme-tomorrow_night.js'));
|
||||
ace.config.setModuleLoader('ace/theme/tomorrow_night_blue', () => import('./src-noconflict/theme-tomorrow_night_blue.js'));
|
||||
ace.config.setModuleLoader('ace/theme/tomorrow_night_bright', () => import('./src-noconflict/theme-tomorrow_night_bright.js'));
|
||||
ace.config.setModuleLoader('ace/theme/tomorrow_night_eighties', () => import('./src-noconflict/theme-tomorrow_night_eighties.js'));
|
||||
ace.config.setModuleLoader('ace/theme/twilight', () => import('./src-noconflict/theme-twilight.js'));
|
||||
ace.config.setModuleLoader('ace/theme/vibrant_ink', () => import('./src-noconflict/theme-vibrant_ink.js'));
|
||||
ace.config.setModuleLoader('ace/theme/xcode', () => import('./src-noconflict/theme-xcode.js'));
|
||||
ace.config.setModuleLoader('ace/mode/base_worker', () => import('./src-noconflict/worker-base.js'));
|
||||
ace.config.setModuleLoader('ace/mode/coffee_worker', () => import('./src-noconflict/worker-coffee.js'));
|
||||
ace.config.setModuleLoader('ace/mode/css_worker', () => import('./src-noconflict/worker-css.js'));
|
||||
ace.config.setModuleLoader('ace/mode/html_worker', () => import('./src-noconflict/worker-html.js'));
|
||||
ace.config.setModuleLoader('ace/mode/javascript_worker', () => import('./src-noconflict/worker-javascript.js'));
|
||||
ace.config.setModuleLoader('ace/mode/json_worker', () => import('./src-noconflict/worker-json.js'));
|
||||
ace.config.setModuleLoader('ace/mode/lua_worker', () => import('./src-noconflict/worker-lua.js'));
|
||||
ace.config.setModuleLoader('ace/mode/php_worker', () => import('./src-noconflict/worker-php.js'));
|
||||
ace.config.setModuleLoader('ace/mode/xml_worker', () => import('./src-noconflict/worker-xml.js'));
|
||||
ace.config.setModuleLoader('ace/mode/xquery_worker', () => import('./src-noconflict/worker-xquery.js'));
|
||||
ace.config.setModuleLoader('ace/mode/yaml_worker', () => import('./src-noconflict/worker-yaml.js'));
|
||||
ace.config.setModuleLoader('ace/snippets/abap', () => import('./src-noconflict/snippets/abap.js'));
|
||||
ace.config.setModuleLoader('ace/snippets/abc', () => import('./src-noconflict/snippets/abc.js'));
|
||||
ace.config.setModuleLoader('ace/snippets/actionscript', () => import('./src-noconflict/snippets/actionscript.js'));
|
||||
ace.config.setModuleLoader('ace/snippets/ada', () => import('./src-noconflict/snippets/ada.js'));
|
||||
ace.config.setModuleLoader('ace/snippets/alda', () => import('./src-noconflict/snippets/alda.js'));
|
||||
ace.config.setModuleLoader('ace/snippets/apache_conf', () => import('./src-noconflict/snippets/apache_conf.js'));
|
||||
ace.config.setModuleLoader('ace/snippets/apex', () => import('./src-noconflict/snippets/apex.js'));
|
||||
ace.config.setModuleLoader('ace/snippets/applescript', () => import('./src-noconflict/snippets/applescript.js'));
|
||||
ace.config.setModuleLoader('ace/snippets/aql', () => import('./src-noconflict/snippets/aql.js'));
|
||||
ace.config.setModuleLoader('ace/snippets/asciidoc', () => import('./src-noconflict/snippets/asciidoc.js'));
|
||||
ace.config.setModuleLoader('ace/snippets/asl', () => import('./src-noconflict/snippets/asl.js'));
|
||||
ace.config.setModuleLoader('ace/snippets/assembly_arm32', () => import('./src-noconflict/snippets/assembly_arm32.js'));
|
||||
ace.config.setModuleLoader('ace/snippets/assembly_x86', () => import('./src-noconflict/snippets/assembly_x86.js'));
|
||||
ace.config.setModuleLoader('ace/snippets/astro', () => import('./src-noconflict/snippets/astro.js'));
|
||||
ace.config.setModuleLoader('ace/snippets/autohotkey', () => import('./src-noconflict/snippets/autohotkey.js'));
|
||||
ace.config.setModuleLoader('ace/snippets/basic', () => import('./src-noconflict/snippets/basic.js'));
|
||||
ace.config.setModuleLoader('ace/snippets/batchfile', () => import('./src-noconflict/snippets/batchfile.js'));
|
||||
ace.config.setModuleLoader('ace/snippets/bibtex', () => import('./src-noconflict/snippets/bibtex.js'));
|
||||
ace.config.setModuleLoader('ace/snippets/c9search', () => import('./src-noconflict/snippets/c9search.js'));
|
||||
ace.config.setModuleLoader('ace/snippets/c_cpp', () => import('./src-noconflict/snippets/c_cpp.js'));
|
||||
ace.config.setModuleLoader('ace/snippets/cirru', () => import('./src-noconflict/snippets/cirru.js'));
|
||||
ace.config.setModuleLoader('ace/snippets/clojure', () => import('./src-noconflict/snippets/clojure.js'));
|
||||
ace.config.setModuleLoader('ace/snippets/clue', () => import('./src-noconflict/snippets/clue.js'));
|
||||
ace.config.setModuleLoader('ace/snippets/cobol', () => import('./src-noconflict/snippets/cobol.js'));
|
||||
ace.config.setModuleLoader('ace/snippets/coffee', () => import('./src-noconflict/snippets/coffee.js'));
|
||||
ace.config.setModuleLoader('ace/snippets/coldfusion', () => import('./src-noconflict/snippets/coldfusion.js'));
|
||||
ace.config.setModuleLoader('ace/snippets/crystal', () => import('./src-noconflict/snippets/crystal.js'));
|
||||
ace.config.setModuleLoader('ace/snippets/csharp', () => import('./src-noconflict/snippets/csharp.js'));
|
||||
ace.config.setModuleLoader('ace/snippets/csound_document', () => import('./src-noconflict/snippets/csound_document.js'));
|
||||
ace.config.setModuleLoader('ace/snippets/csound_orchestra', () => import('./src-noconflict/snippets/csound_orchestra.js'));
|
||||
ace.config.setModuleLoader('ace/snippets/csound_score', () => import('./src-noconflict/snippets/csound_score.js'));
|
||||
ace.config.setModuleLoader('ace/snippets/csp', () => import('./src-noconflict/snippets/csp.js'));
|
||||
ace.config.setModuleLoader('ace/snippets/css', () => import('./src-noconflict/snippets/css.js'));
|
||||
ace.config.setModuleLoader('ace/snippets/csv', () => import('./src-noconflict/snippets/csv.js'));
|
||||
ace.config.setModuleLoader('ace/snippets/curly', () => import('./src-noconflict/snippets/curly.js'));
|
||||
ace.config.setModuleLoader('ace/snippets/cuttlefish', () => import('./src-noconflict/snippets/cuttlefish.js'));
|
||||
ace.config.setModuleLoader('ace/snippets/d', () => import('./src-noconflict/snippets/d.js'));
|
||||
ace.config.setModuleLoader('ace/snippets/dart', () => import('./src-noconflict/snippets/dart.js'));
|
||||
ace.config.setModuleLoader('ace/snippets/diff', () => import('./src-noconflict/snippets/diff.js'));
|
||||
ace.config.setModuleLoader('ace/snippets/django', () => import('./src-noconflict/snippets/django.js'));
|
||||
ace.config.setModuleLoader('ace/snippets/dockerfile', () => import('./src-noconflict/snippets/dockerfile.js'));
|
||||
ace.config.setModuleLoader('ace/snippets/dot', () => import('./src-noconflict/snippets/dot.js'));
|
||||
ace.config.setModuleLoader('ace/snippets/drools', () => import('./src-noconflict/snippets/drools.js'));
|
||||
ace.config.setModuleLoader('ace/snippets/edifact', () => import('./src-noconflict/snippets/edifact.js'));
|
||||
ace.config.setModuleLoader('ace/snippets/eiffel', () => import('./src-noconflict/snippets/eiffel.js'));
|
||||
ace.config.setModuleLoader('ace/snippets/ejs', () => import('./src-noconflict/snippets/ejs.js'));
|
||||
ace.config.setModuleLoader('ace/snippets/elixir', () => import('./src-noconflict/snippets/elixir.js'));
|
||||
ace.config.setModuleLoader('ace/snippets/elm', () => import('./src-noconflict/snippets/elm.js'));
|
||||
ace.config.setModuleLoader('ace/snippets/erlang', () => import('./src-noconflict/snippets/erlang.js'));
|
||||
ace.config.setModuleLoader('ace/snippets/flix', () => import('./src-noconflict/snippets/flix.js'));
|
||||
ace.config.setModuleLoader('ace/snippets/forth', () => import('./src-noconflict/snippets/forth.js'));
|
||||
ace.config.setModuleLoader('ace/snippets/fortran', () => import('./src-noconflict/snippets/fortran.js'));
|
||||
ace.config.setModuleLoader('ace/snippets/fsharp', () => import('./src-noconflict/snippets/fsharp.js'));
|
||||
ace.config.setModuleLoader('ace/snippets/fsl', () => import('./src-noconflict/snippets/fsl.js'));
|
||||
ace.config.setModuleLoader('ace/snippets/ftl', () => import('./src-noconflict/snippets/ftl.js'));
|
||||
ace.config.setModuleLoader('ace/snippets/gcode', () => import('./src-noconflict/snippets/gcode.js'));
|
||||
ace.config.setModuleLoader('ace/snippets/gherkin', () => import('./src-noconflict/snippets/gherkin.js'));
|
||||
ace.config.setModuleLoader('ace/snippets/gitignore', () => import('./src-noconflict/snippets/gitignore.js'));
|
||||
ace.config.setModuleLoader('ace/snippets/glsl', () => import('./src-noconflict/snippets/glsl.js'));
|
||||
ace.config.setModuleLoader('ace/snippets/gobstones', () => import('./src-noconflict/snippets/gobstones.js'));
|
||||
ace.config.setModuleLoader('ace/snippets/golang', () => import('./src-noconflict/snippets/golang.js'));
|
||||
ace.config.setModuleLoader('ace/snippets/graphqlschema', () => import('./src-noconflict/snippets/graphqlschema.js'));
|
||||
ace.config.setModuleLoader('ace/snippets/groovy', () => import('./src-noconflict/snippets/groovy.js'));
|
||||
ace.config.setModuleLoader('ace/snippets/haml', () => import('./src-noconflict/snippets/haml.js'));
|
||||
ace.config.setModuleLoader('ace/snippets/handlebars', () => import('./src-noconflict/snippets/handlebars.js'));
|
||||
ace.config.setModuleLoader('ace/snippets/haskell', () => import('./src-noconflict/snippets/haskell.js'));
|
||||
ace.config.setModuleLoader('ace/snippets/haskell_cabal', () => import('./src-noconflict/snippets/haskell_cabal.js'));
|
||||
ace.config.setModuleLoader('ace/snippets/haxe', () => import('./src-noconflict/snippets/haxe.js'));
|
||||
ace.config.setModuleLoader('ace/snippets/hjson', () => import('./src-noconflict/snippets/hjson.js'));
|
||||
ace.config.setModuleLoader('ace/snippets/html', () => import('./src-noconflict/snippets/html.js'));
|
||||
ace.config.setModuleLoader('ace/snippets/html_elixir', () => import('./src-noconflict/snippets/html_elixir.js'));
|
||||
ace.config.setModuleLoader('ace/snippets/html_ruby', () => import('./src-noconflict/snippets/html_ruby.js'));
|
||||
ace.config.setModuleLoader('ace/snippets/ini', () => import('./src-noconflict/snippets/ini.js'));
|
||||
ace.config.setModuleLoader('ace/snippets/io', () => import('./src-noconflict/snippets/io.js'));
|
||||
ace.config.setModuleLoader('ace/snippets/ion', () => import('./src-noconflict/snippets/ion.js'));
|
||||
ace.config.setModuleLoader('ace/snippets/jack', () => import('./src-noconflict/snippets/jack.js'));
|
||||
ace.config.setModuleLoader('ace/snippets/jade', () => import('./src-noconflict/snippets/jade.js'));
|
||||
ace.config.setModuleLoader('ace/snippets/java', () => import('./src-noconflict/snippets/java.js'));
|
||||
ace.config.setModuleLoader('ace/snippets/javascript', () => import('./src-noconflict/snippets/javascript.js'));
|
||||
ace.config.setModuleLoader('ace/snippets/jexl', () => import('./src-noconflict/snippets/jexl.js'));
|
||||
ace.config.setModuleLoader('ace/snippets/json', () => import('./src-noconflict/snippets/json.js'));
|
||||
ace.config.setModuleLoader('ace/snippets/json5', () => import('./src-noconflict/snippets/json5.js'));
|
||||
ace.config.setModuleLoader('ace/snippets/jsoniq', () => import('./src-noconflict/snippets/jsoniq.js'));
|
||||
ace.config.setModuleLoader('ace/snippets/jsp', () => import('./src-noconflict/snippets/jsp.js'));
|
||||
ace.config.setModuleLoader('ace/snippets/jssm', () => import('./src-noconflict/snippets/jssm.js'));
|
||||
ace.config.setModuleLoader('ace/snippets/jsx', () => import('./src-noconflict/snippets/jsx.js'));
|
||||
ace.config.setModuleLoader('ace/snippets/julia', () => import('./src-noconflict/snippets/julia.js'));
|
||||
ace.config.setModuleLoader('ace/snippets/kotlin', () => import('./src-noconflict/snippets/kotlin.js'));
|
||||
ace.config.setModuleLoader('ace/snippets/latex', () => import('./src-noconflict/snippets/latex.js'));
|
||||
ace.config.setModuleLoader('ace/snippets/latte', () => import('./src-noconflict/snippets/latte.js'));
|
||||
ace.config.setModuleLoader('ace/snippets/less', () => import('./src-noconflict/snippets/less.js'));
|
||||
ace.config.setModuleLoader('ace/snippets/liquid', () => import('./src-noconflict/snippets/liquid.js'));
|
||||
ace.config.setModuleLoader('ace/snippets/lisp', () => import('./src-noconflict/snippets/lisp.js'));
|
||||
ace.config.setModuleLoader('ace/snippets/livescript', () => import('./src-noconflict/snippets/livescript.js'));
|
||||
ace.config.setModuleLoader('ace/snippets/logiql', () => import('./src-noconflict/snippets/logiql.js'));
|
||||
ace.config.setModuleLoader('ace/snippets/logtalk', () => import('./src-noconflict/snippets/logtalk.js'));
|
||||
ace.config.setModuleLoader('ace/snippets/lsl', () => import('./src-noconflict/snippets/lsl.js'));
|
||||
ace.config.setModuleLoader('ace/snippets/lua', () => import('./src-noconflict/snippets/lua.js'));
|
||||
ace.config.setModuleLoader('ace/snippets/luapage', () => import('./src-noconflict/snippets/luapage.js'));
|
||||
ace.config.setModuleLoader('ace/snippets/lucene', () => import('./src-noconflict/snippets/lucene.js'));
|
||||
ace.config.setModuleLoader('ace/snippets/makefile', () => import('./src-noconflict/snippets/makefile.js'));
|
||||
ace.config.setModuleLoader('ace/snippets/markdown', () => import('./src-noconflict/snippets/markdown.js'));
|
||||
ace.config.setModuleLoader('ace/snippets/mask', () => import('./src-noconflict/snippets/mask.js'));
|
||||
ace.config.setModuleLoader('ace/snippets/matlab', () => import('./src-noconflict/snippets/matlab.js'));
|
||||
ace.config.setModuleLoader('ace/snippets/maze', () => import('./src-noconflict/snippets/maze.js'));
|
||||
ace.config.setModuleLoader('ace/snippets/mediawiki', () => import('./src-noconflict/snippets/mediawiki.js'));
|
||||
ace.config.setModuleLoader('ace/snippets/mel', () => import('./src-noconflict/snippets/mel.js'));
|
||||
ace.config.setModuleLoader('ace/snippets/mips', () => import('./src-noconflict/snippets/mips.js'));
|
||||
ace.config.setModuleLoader('ace/snippets/mixal', () => import('./src-noconflict/snippets/mixal.js'));
|
||||
ace.config.setModuleLoader('ace/snippets/mushcode', () => import('./src-noconflict/snippets/mushcode.js'));
|
||||
ace.config.setModuleLoader('ace/snippets/mysql', () => import('./src-noconflict/snippets/mysql.js'));
|
||||
ace.config.setModuleLoader('ace/snippets/nasal', () => import('./src-noconflict/snippets/nasal.js'));
|
||||
ace.config.setModuleLoader('ace/snippets/nginx', () => import('./src-noconflict/snippets/nginx.js'));
|
||||
ace.config.setModuleLoader('ace/snippets/nim', () => import('./src-noconflict/snippets/nim.js'));
|
||||
ace.config.setModuleLoader('ace/snippets/nix', () => import('./src-noconflict/snippets/nix.js'));
|
||||
ace.config.setModuleLoader('ace/snippets/nsis', () => import('./src-noconflict/snippets/nsis.js'));
|
||||
ace.config.setModuleLoader('ace/snippets/nunjucks', () => import('./src-noconflict/snippets/nunjucks.js'));
|
||||
ace.config.setModuleLoader('ace/snippets/objectivec', () => import('./src-noconflict/snippets/objectivec.js'));
|
||||
ace.config.setModuleLoader('ace/snippets/ocaml', () => import('./src-noconflict/snippets/ocaml.js'));
|
||||
ace.config.setModuleLoader('ace/snippets/odin', () => import('./src-noconflict/snippets/odin.js'));
|
||||
ace.config.setModuleLoader('ace/snippets/partiql', () => import('./src-noconflict/snippets/partiql.js'));
|
||||
ace.config.setModuleLoader('ace/snippets/pascal', () => import('./src-noconflict/snippets/pascal.js'));
|
||||
ace.config.setModuleLoader('ace/snippets/perl', () => import('./src-noconflict/snippets/perl.js'));
|
||||
ace.config.setModuleLoader('ace/snippets/pgsql', () => import('./src-noconflict/snippets/pgsql.js'));
|
||||
ace.config.setModuleLoader('ace/snippets/php', () => import('./src-noconflict/snippets/php.js'));
|
||||
ace.config.setModuleLoader('ace/snippets/php_laravel_blade', () => import('./src-noconflict/snippets/php_laravel_blade.js'));
|
||||
ace.config.setModuleLoader('ace/snippets/pig', () => import('./src-noconflict/snippets/pig.js'));
|
||||
ace.config.setModuleLoader('ace/snippets/plain_text', () => import('./src-noconflict/snippets/plain_text.js'));
|
||||
ace.config.setModuleLoader('ace/snippets/plsql', () => import('./src-noconflict/snippets/plsql.js'));
|
||||
ace.config.setModuleLoader('ace/snippets/powershell', () => import('./src-noconflict/snippets/powershell.js'));
|
||||
ace.config.setModuleLoader('ace/snippets/praat', () => import('./src-noconflict/snippets/praat.js'));
|
||||
ace.config.setModuleLoader('ace/snippets/prisma', () => import('./src-noconflict/snippets/prisma.js'));
|
||||
ace.config.setModuleLoader('ace/snippets/prolog', () => import('./src-noconflict/snippets/prolog.js'));
|
||||
ace.config.setModuleLoader('ace/snippets/properties', () => import('./src-noconflict/snippets/properties.js'));
|
||||
ace.config.setModuleLoader('ace/snippets/protobuf', () => import('./src-noconflict/snippets/protobuf.js'));
|
||||
ace.config.setModuleLoader('ace/snippets/prql', () => import('./src-noconflict/snippets/prql.js'));
|
||||
ace.config.setModuleLoader('ace/snippets/puppet', () => import('./src-noconflict/snippets/puppet.js'));
|
||||
ace.config.setModuleLoader('ace/snippets/python', () => import('./src-noconflict/snippets/python.js'));
|
||||
ace.config.setModuleLoader('ace/snippets/qml', () => import('./src-noconflict/snippets/qml.js'));
|
||||
ace.config.setModuleLoader('ace/snippets/r', () => import('./src-noconflict/snippets/r.js'));
|
||||
ace.config.setModuleLoader('ace/snippets/raku', () => import('./src-noconflict/snippets/raku.js'));
|
||||
ace.config.setModuleLoader('ace/snippets/razor', () => import('./src-noconflict/snippets/razor.js'));
|
||||
ace.config.setModuleLoader('ace/snippets/rdoc', () => import('./src-noconflict/snippets/rdoc.js'));
|
||||
ace.config.setModuleLoader('ace/snippets/red', () => import('./src-noconflict/snippets/red.js'));
|
||||
ace.config.setModuleLoader('ace/snippets/redshift', () => import('./src-noconflict/snippets/redshift.js'));
|
||||
ace.config.setModuleLoader('ace/snippets/rhtml', () => import('./src-noconflict/snippets/rhtml.js'));
|
||||
ace.config.setModuleLoader('ace/snippets/robot', () => import('./src-noconflict/snippets/robot.js'));
|
||||
ace.config.setModuleLoader('ace/snippets/rst', () => import('./src-noconflict/snippets/rst.js'));
|
||||
ace.config.setModuleLoader('ace/snippets/ruby', () => import('./src-noconflict/snippets/ruby.js'));
|
||||
ace.config.setModuleLoader('ace/snippets/rust', () => import('./src-noconflict/snippets/rust.js'));
|
||||
ace.config.setModuleLoader('ace/snippets/sac', () => import('./src-noconflict/snippets/sac.js'));
|
||||
ace.config.setModuleLoader('ace/snippets/sass', () => import('./src-noconflict/snippets/sass.js'));
|
||||
ace.config.setModuleLoader('ace/snippets/scad', () => import('./src-noconflict/snippets/scad.js'));
|
||||
ace.config.setModuleLoader('ace/snippets/scala', () => import('./src-noconflict/snippets/scala.js'));
|
||||
ace.config.setModuleLoader('ace/snippets/scheme', () => import('./src-noconflict/snippets/scheme.js'));
|
||||
ace.config.setModuleLoader('ace/snippets/scrypt', () => import('./src-noconflict/snippets/scrypt.js'));
|
||||
ace.config.setModuleLoader('ace/snippets/scss', () => import('./src-noconflict/snippets/scss.js'));
|
||||
ace.config.setModuleLoader('ace/snippets/sh', () => import('./src-noconflict/snippets/sh.js'));
|
||||
ace.config.setModuleLoader('ace/snippets/sjs', () => import('./src-noconflict/snippets/sjs.js'));
|
||||
ace.config.setModuleLoader('ace/snippets/slim', () => import('./src-noconflict/snippets/slim.js'));
|
||||
ace.config.setModuleLoader('ace/snippets/smarty', () => import('./src-noconflict/snippets/smarty.js'));
|
||||
ace.config.setModuleLoader('ace/snippets/smithy', () => import('./src-noconflict/snippets/smithy.js'));
|
||||
ace.config.setModuleLoader('ace/snippets/snippets', () => import('./src-noconflict/snippets/snippets.js'));
|
||||
ace.config.setModuleLoader('ace/snippets/soy_template', () => import('./src-noconflict/snippets/soy_template.js'));
|
||||
ace.config.setModuleLoader('ace/snippets/space', () => import('./src-noconflict/snippets/space.js'));
|
||||
ace.config.setModuleLoader('ace/snippets/sparql', () => import('./src-noconflict/snippets/sparql.js'));
|
||||
ace.config.setModuleLoader('ace/snippets/sql', () => import('./src-noconflict/snippets/sql.js'));
|
||||
ace.config.setModuleLoader('ace/snippets/sqlserver', () => import('./src-noconflict/snippets/sqlserver.js'));
|
||||
ace.config.setModuleLoader('ace/snippets/stylus', () => import('./src-noconflict/snippets/stylus.js'));
|
||||
ace.config.setModuleLoader('ace/snippets/svg', () => import('./src-noconflict/snippets/svg.js'));
|
||||
ace.config.setModuleLoader('ace/snippets/swift', () => import('./src-noconflict/snippets/swift.js'));
|
||||
ace.config.setModuleLoader('ace/snippets/tcl', () => import('./src-noconflict/snippets/tcl.js'));
|
||||
ace.config.setModuleLoader('ace/snippets/terraform', () => import('./src-noconflict/snippets/terraform.js'));
|
||||
ace.config.setModuleLoader('ace/snippets/tex', () => import('./src-noconflict/snippets/tex.js'));
|
||||
ace.config.setModuleLoader('ace/snippets/text', () => import('./src-noconflict/snippets/text.js'));
|
||||
ace.config.setModuleLoader('ace/snippets/textile', () => import('./src-noconflict/snippets/textile.js'));
|
||||
ace.config.setModuleLoader('ace/snippets/toml', () => import('./src-noconflict/snippets/toml.js'));
|
||||
ace.config.setModuleLoader('ace/snippets/tsv', () => import('./src-noconflict/snippets/tsv.js'));
|
||||
ace.config.setModuleLoader('ace/snippets/tsx', () => import('./src-noconflict/snippets/tsx.js'));
|
||||
ace.config.setModuleLoader('ace/snippets/turtle', () => import('./src-noconflict/snippets/turtle.js'));
|
||||
ace.config.setModuleLoader('ace/snippets/twig', () => import('./src-noconflict/snippets/twig.js'));
|
||||
ace.config.setModuleLoader('ace/snippets/typescript', () => import('./src-noconflict/snippets/typescript.js'));
|
||||
ace.config.setModuleLoader('ace/snippets/vala', () => import('./src-noconflict/snippets/vala.js'));
|
||||
ace.config.setModuleLoader('ace/snippets/vbscript', () => import('./src-noconflict/snippets/vbscript.js'));
|
||||
ace.config.setModuleLoader('ace/snippets/velocity', () => import('./src-noconflict/snippets/velocity.js'));
|
||||
ace.config.setModuleLoader('ace/snippets/verilog', () => import('./src-noconflict/snippets/verilog.js'));
|
||||
ace.config.setModuleLoader('ace/snippets/vhdl', () => import('./src-noconflict/snippets/vhdl.js'));
|
||||
ace.config.setModuleLoader('ace/snippets/visualforce', () => import('./src-noconflict/snippets/visualforce.js'));
|
||||
ace.config.setModuleLoader('ace/snippets/vue', () => import('./src-noconflict/snippets/vue.js'));
|
||||
ace.config.setModuleLoader('ace/snippets/wollok', () => import('./src-noconflict/snippets/wollok.js'));
|
||||
ace.config.setModuleLoader('ace/snippets/xml', () => import('./src-noconflict/snippets/xml.js'));
|
||||
ace.config.setModuleLoader('ace/snippets/xquery', () => import('./src-noconflict/snippets/xquery.js'));
|
||||
ace.config.setModuleLoader('ace/snippets/yaml', () => import('./src-noconflict/snippets/yaml.js'));
|
||||
ace.config.setModuleLoader('ace/snippets/zeek', () => import('./src-noconflict/snippets/zeek.js'));
|
||||
ace.config.setModuleLoader('ace/snippets/zig', () => import('./src-noconflict/snippets/zig.js'));
|
||||
46
htdocs/includes/ace/kitchen-sink.html
Normal file
46
htdocs/includes/ace/kitchen-sink.html
Normal file
@@ -0,0 +1,46 @@
|
||||
<!DOCTYPE html>
|
||||
|
||||
<html lang="en">
|
||||
<head>
|
||||
<meta http-equiv="Content-Type" content="text/html; charset=utf-8">
|
||||
<meta name="viewport" content="width=device-width,height=device-height" />
|
||||
<title>Ace Kitchen Sink</title>
|
||||
<meta name="author" content="Fabian Jakobs">
|
||||
|
||||
<link rel="stylesheet" href="demo/kitchen-sink/styles.css" type="text/css" media="screen" charset="utf-8">
|
||||
|
||||
<link href="./doc/site/images/favicon.ico" rel="icon" type="image/x-icon">
|
||||
</head>
|
||||
<body>
|
||||
<div id="sidePanel" style="position:absolute;height:100%;width:280px;">
|
||||
<div class="toggleButton" id="optionToggle" role="button" aria-label="Hide Options" tabindex="0">
|
||||
<div></div><div></div><div></div>
|
||||
</div>
|
||||
<a href="https://c9.io">
|
||||
<img id="c9-logo" alt="Cloud9 IDE | Your code anywhere, anytime" src="demo/kitchen-sink/logo.png" style="width: 172px;margin: -9px 30px -12px 51px;">
|
||||
</a>
|
||||
<div style="position: absolute; overflow: hidden; top:100px; bottom:0;width:100%;">
|
||||
<div id="optionsPanel" style="height:100%; width:100%; overflow-y: auto">
|
||||
|
||||
|
||||
<a href="https://ace.c9.io">
|
||||
<img id="ace-logo" alt="Ace Website" src="demo/kitchen-sink/ace-logo.png" style="width: 134px;margin: 46px 0px 4px 66px;">
|
||||
</a>
|
||||
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<div id="editor-container"></div>
|
||||
|
||||
|
||||
|
||||
|
||||
<script src="src/ace.js" data-ace-base="src" type="text/javascript" charset="utf-8"></script>
|
||||
<script src="demo/kitchen-sink/demo.js"></script>
|
||||
<script type="text/javascript" charset="utf-8">
|
||||
require("kitchen-sink/demo");
|
||||
</script>
|
||||
|
||||
|
||||
</body>
|
||||
</html>
|
||||
@@ -2,7 +2,7 @@
|
||||
"name": "ace-builds",
|
||||
"main": "./src-noconflict/ace.js",
|
||||
"typings": "ace.d.ts",
|
||||
"version": "1.4.14",
|
||||
"version": "1.43.2",
|
||||
"description": "Ace (Ajax.org Cloud9 Editor)",
|
||||
"scripts": {
|
||||
"test": "echo \"Error: no test specified\" && exit 1"
|
||||
|
||||
File diff suppressed because one or more lines are too long
@@ -1,342 +1,7 @@
|
||||
define("ace/ext/beautify",["require","exports","module","ace/token_iterator"], function(require, exports, module) {
|
||||
"use strict";
|
||||
var TokenIterator = require("../token_iterator").TokenIterator;
|
||||
|
||||
function is(token, type) {
|
||||
return token.type.lastIndexOf(type + ".xml") > -1;
|
||||
}
|
||||
exports.singletonTags = ["area", "base", "br", "col", "command", "embed", "hr", "html", "img", "input", "keygen", "link", "meta", "param", "source", "track", "wbr"];
|
||||
exports.blockTags = ["article", "aside", "blockquote", "body", "div", "dl", "fieldset", "footer", "form", "head", "header", "html", "nav", "ol", "p", "script", "section", "style", "table", "tbody", "tfoot", "thead", "ul"];
|
||||
|
||||
exports.beautify = function(session) {
|
||||
var iterator = new TokenIterator(session, 0, 0);
|
||||
var token = iterator.getCurrentToken();
|
||||
var tabString = session.getTabString();
|
||||
var singletonTags = exports.singletonTags;
|
||||
var blockTags = exports.blockTags;
|
||||
var nextToken;
|
||||
var breakBefore = false;
|
||||
var spaceBefore = false;
|
||||
var spaceAfter = false;
|
||||
var code = "";
|
||||
var value = "";
|
||||
var tagName = "";
|
||||
var depth = 0;
|
||||
var lastDepth = 0;
|
||||
var lastIndent = 0;
|
||||
var indent = 0;
|
||||
var unindent = 0;
|
||||
var roundDepth = 0;
|
||||
var curlyDepth = 0;
|
||||
var row;
|
||||
var curRow = 0;
|
||||
var rowsToAdd = 0;
|
||||
var rowTokens = [];
|
||||
var abort = false;
|
||||
var i;
|
||||
var indentNextLine = false;
|
||||
var inTag = false;
|
||||
var inCSS = false;
|
||||
var inBlock = false;
|
||||
var levels = {0: 0};
|
||||
var parents = [];
|
||||
var caseBody = false;
|
||||
|
||||
var trimNext = function() {
|
||||
if (nextToken && nextToken.value && nextToken.type !== 'string.regexp')
|
||||
nextToken.value = nextToken.value.replace(/^\s*/, "");
|
||||
};
|
||||
|
||||
var trimLine = function() {
|
||||
var end = code.length - 1;
|
||||
|
||||
while (true) {
|
||||
if (end == 0)
|
||||
break;
|
||||
if (code[end] !== " ")
|
||||
break;
|
||||
|
||||
end = end - 1;
|
||||
}
|
||||
|
||||
code = code.slice(0, end + 1);
|
||||
};
|
||||
|
||||
var trimCode = function() {
|
||||
code = code.trimRight();
|
||||
breakBefore = false;
|
||||
};
|
||||
|
||||
while (token !== null) {
|
||||
curRow = iterator.getCurrentTokenRow();
|
||||
rowTokens = iterator.$rowTokens;
|
||||
nextToken = iterator.stepForward();
|
||||
|
||||
if (typeof token !== "undefined") {
|
||||
value = token.value;
|
||||
unindent = 0;
|
||||
inCSS = (tagName === "style" || session.$modeId === "ace/mode/css");
|
||||
if (is(token, "tag-open")) {
|
||||
inTag = true;
|
||||
if (nextToken)
|
||||
inBlock = (blockTags.indexOf(nextToken.value) !== -1);
|
||||
if (value === "</") {
|
||||
if (inBlock && !breakBefore && rowsToAdd < 1)
|
||||
rowsToAdd++;
|
||||
|
||||
if (inCSS)
|
||||
rowsToAdd = 1;
|
||||
|
||||
unindent = 1;
|
||||
inBlock = false;
|
||||
}
|
||||
} else if (is(token, "tag-close")) {
|
||||
inTag = false;
|
||||
} else if (is(token, "comment.start")) {
|
||||
inBlock = true;
|
||||
} else if (is(token, "comment.end")) {
|
||||
inBlock = false;
|
||||
}
|
||||
if (!inTag && !rowsToAdd && token.type === "paren.rparen" && token.value.substr(0, 1) === "}") {
|
||||
rowsToAdd++;
|
||||
}
|
||||
if (curRow !== row) {
|
||||
rowsToAdd = curRow;
|
||||
|
||||
if (row)
|
||||
rowsToAdd -= row;
|
||||
}
|
||||
|
||||
if (rowsToAdd) {
|
||||
trimCode();
|
||||
for (; rowsToAdd > 0; rowsToAdd--)
|
||||
code += "\n";
|
||||
|
||||
breakBefore = true;
|
||||
if (!is(token, "comment") && !token.type.match(/^(comment|string)$/))
|
||||
value = value.trimLeft();
|
||||
}
|
||||
|
||||
if (value) {
|
||||
if (token.type === "keyword" && value.match(/^(if|else|elseif|for|foreach|while|switch)$/)) {
|
||||
parents[depth] = value;
|
||||
|
||||
trimNext();
|
||||
spaceAfter = true;
|
||||
if (value.match(/^(else|elseif)$/)) {
|
||||
if (code.match(/\}[\s]*$/)) {
|
||||
trimCode();
|
||||
spaceBefore = true;
|
||||
}
|
||||
}
|
||||
} else if (token.type === "paren.lparen") {
|
||||
trimNext();
|
||||
if (value.substr(-1) === "{") {
|
||||
spaceAfter = true;
|
||||
indentNextLine = false;
|
||||
|
||||
if(!inTag)
|
||||
rowsToAdd = 1;
|
||||
}
|
||||
if (value.substr(0, 1) === "{") {
|
||||
spaceBefore = true;
|
||||
if (code.substr(-1) !== '[' && code.trimRight().substr(-1) === '[') {
|
||||
trimCode();
|
||||
spaceBefore = false;
|
||||
} else if (code.trimRight().substr(-1) === ')') {
|
||||
trimCode();
|
||||
} else {
|
||||
trimLine();
|
||||
}
|
||||
}
|
||||
} else if (token.type === "paren.rparen") {
|
||||
unindent = 1;
|
||||
if (value.substr(0, 1) === "}") {
|
||||
if (parents[depth-1] === 'case')
|
||||
unindent++;
|
||||
|
||||
if (code.trimRight().substr(-1) === '{') {
|
||||
trimCode();
|
||||
} else {
|
||||
spaceBefore = true;
|
||||
|
||||
if (inCSS)
|
||||
rowsToAdd+=2;
|
||||
}
|
||||
}
|
||||
if (value.substr(0, 1) === "]") {
|
||||
if (code.substr(-1) !== '}' && code.trimRight().substr(-1) === '}') {
|
||||
spaceBefore = false;
|
||||
indent++;
|
||||
trimCode();
|
||||
}
|
||||
}
|
||||
if (value.substr(0, 1) === ")") {
|
||||
if (code.substr(-1) !== '(' && code.trimRight().substr(-1) === '(') {
|
||||
spaceBefore = false;
|
||||
indent++;
|
||||
trimCode();
|
||||
}
|
||||
}
|
||||
|
||||
trimLine();
|
||||
} else if ((token.type === "keyword.operator" || token.type === "keyword") && value.match(/^(=|==|===|!=|!==|&&|\|\||and|or|xor|\+=|.=|>|>=|<|<=|=>)$/)) {
|
||||
trimCode();
|
||||
trimNext();
|
||||
spaceBefore = true;
|
||||
spaceAfter = true;
|
||||
} else if (token.type === "punctuation.operator" && value === ';') {
|
||||
trimCode();
|
||||
trimNext();
|
||||
spaceAfter = true;
|
||||
|
||||
if (inCSS)
|
||||
rowsToAdd++;
|
||||
} else if (token.type === "punctuation.operator" && value.match(/^(:|,)$/)) {
|
||||
trimCode();
|
||||
trimNext();
|
||||
if (value.match(/^(,)$/) && curlyDepth>0 && roundDepth===0) {
|
||||
rowsToAdd++;
|
||||
} else {
|
||||
spaceAfter = true;
|
||||
breakBefore = false;
|
||||
}
|
||||
} else if (token.type === "support.php_tag" && value === "?>" && !breakBefore) {
|
||||
trimCode();
|
||||
spaceBefore = true;
|
||||
} else if (is(token, "attribute-name") && code.substr(-1).match(/^\s$/)) {
|
||||
spaceBefore = true;
|
||||
} else if (is(token, "attribute-equals")) {
|
||||
trimLine();
|
||||
trimNext();
|
||||
} else if (is(token, "tag-close")) {
|
||||
trimLine();
|
||||
if(value === "/>")
|
||||
spaceBefore = true;
|
||||
} else if (token.type === "keyword" && value.match(/^(case|default)$/)) {
|
||||
if (caseBody)
|
||||
unindent = 1;
|
||||
}
|
||||
if (breakBefore && !(token.type.match(/^(comment)$/) && !value.substr(0, 1).match(/^[/#]$/)) && !(token.type.match(/^(string)$/) && !value.substr(0, 1).match(/^['"@]$/))) {
|
||||
|
||||
indent = lastIndent;
|
||||
|
||||
if(depth > lastDepth) {
|
||||
indent++;
|
||||
|
||||
for (i=depth; i > lastDepth; i--)
|
||||
levels[i] = indent;
|
||||
} else if(depth < lastDepth)
|
||||
indent = levels[depth];
|
||||
|
||||
lastDepth = depth;
|
||||
lastIndent = indent;
|
||||
|
||||
if(unindent)
|
||||
indent -= unindent;
|
||||
|
||||
if (indentNextLine && !roundDepth) {
|
||||
indent++;
|
||||
indentNextLine = false;
|
||||
}
|
||||
|
||||
for (i = 0; i < indent; i++)
|
||||
code += tabString;
|
||||
}
|
||||
|
||||
if (token.type === "keyword" && value.match(/^(case|default)$/)) {
|
||||
if (caseBody === false) {
|
||||
parents[depth] = value;
|
||||
depth++;
|
||||
caseBody = true;
|
||||
}
|
||||
} else if (token.type === "keyword" && value.match(/^(break)$/)) {
|
||||
if(parents[depth-1] && parents[depth-1].match(/^(case|default)$/)) {
|
||||
depth--;
|
||||
caseBody = false;
|
||||
}
|
||||
}
|
||||
if (token.type === "paren.lparen") {
|
||||
roundDepth += (value.match(/\(/g) || []).length;
|
||||
curlyDepth += (value.match(/\{/g) || []).length;
|
||||
depth += value.length;
|
||||
}
|
||||
|
||||
if (token.type === "keyword" && value.match(/^(if|else|elseif|for|while)$/)) {
|
||||
indentNextLine = true;
|
||||
roundDepth = 0;
|
||||
} else if (!roundDepth && value.trim() && token.type !== "comment")
|
||||
indentNextLine = false;
|
||||
|
||||
if (token.type === "paren.rparen") {
|
||||
roundDepth -= (value.match(/\)/g) || []).length;
|
||||
curlyDepth -= (value.match(/\}/g) || []).length;
|
||||
|
||||
for (i = 0; i < value.length; i++) {
|
||||
depth--;
|
||||
if(value.substr(i, 1)==='}' && parents[depth]==='case') {
|
||||
depth--;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
if (token.type == "text")
|
||||
value = value.replace(/\s+$/, " ");
|
||||
if (spaceBefore && !breakBefore) {
|
||||
trimLine();
|
||||
if (code.substr(-1) !== "\n")
|
||||
code += " ";
|
||||
}
|
||||
|
||||
code += value;
|
||||
|
||||
if (spaceAfter)
|
||||
code += " ";
|
||||
|
||||
breakBefore = false;
|
||||
spaceBefore = false;
|
||||
spaceAfter = false;
|
||||
if ((is(token, "tag-close") && (inBlock || blockTags.indexOf(tagName) !== -1)) || (is(token, "doctype") && value === ">")) {
|
||||
if (inBlock && nextToken && nextToken.value === "</")
|
||||
rowsToAdd = -1;
|
||||
else
|
||||
rowsToAdd = 1;
|
||||
}
|
||||
if (is(token, "tag-open") && value === "</") {
|
||||
depth--;
|
||||
} else if (is(token, "tag-open") && value === "<" && singletonTags.indexOf(nextToken.value) === -1) {
|
||||
depth++;
|
||||
} else if (is(token, "tag-name")) {
|
||||
tagName = value;
|
||||
} else if (is(token, "tag-close") && value === "/>" && singletonTags.indexOf(tagName) === -1){
|
||||
depth--;
|
||||
}
|
||||
|
||||
row = curRow;
|
||||
}
|
||||
}
|
||||
|
||||
token = nextToken;
|
||||
}
|
||||
|
||||
code = code.trim();
|
||||
session.doc.setValue(code);
|
||||
};
|
||||
|
||||
exports.commands = [{
|
||||
name: "beautify",
|
||||
description: "Format selection (Beautify)",
|
||||
exec: function(editor) {
|
||||
exports.beautify(editor.session);
|
||||
},
|
||||
bindKey: "Ctrl-Shift-B"
|
||||
}];
|
||||
|
||||
}); (function() {
|
||||
define("ace/ext/beautify",["require","exports","module","ace/token_iterator"],function(e,t,n){"use strict";function i(e,t){return e.type.lastIndexOf(t+".xml")>-1}var r=e("../token_iterator").TokenIterator;t.singletonTags=["area","base","br","col","command","embed","hr","html","img","input","keygen","link","meta","param","source","track","wbr"],t.blockTags=["article","aside","blockquote","body","div","dl","fieldset","footer","form","head","header","html","nav","ol","p","script","section","style","table","tbody","tfoot","thead","ul"],t.formatOptions={lineBreaksAfterCommasInCurlyBlock:!0},t.beautify=function(e){var n=new r(e,0,0),s=n.getCurrentToken(),o=e.getTabString(),u=t.singletonTags,a=t.blockTags,f=t.formatOptions||{},l,c=!1,h=!1,p=!1,d="",v="",m="",g=0,y=0,b=0,w=0,E=0,S=0,x=0,T,N=0,C=0,k=[],L=!1,A,O=!1,M=!1,_=!1,D=!1,P={0:0},H=[],B=!1,j=function(){l&&l.value&&l.type!=="string.regexp"&&(l.value=l.value.replace(/^\s*/,""))},F=function(){var e=d.length-1;for(;;){if(e==0)break;if(d[e]!==" ")break;e-=1}d=d.slice(0,e+1)},I=function(){d=d.trimRight(),c=!1};while(s!==null){N=n.getCurrentTokenRow(),k=n.$rowTokens,l=n.stepForward();if(typeof s!="undefined"){v=s.value,E=0,_=m==="style"||e.$modeId==="ace/mode/css",i(s,"tag-open")?(M=!0,l&&(D=a.indexOf(l.value)!==-1),v==="</"&&(D&&!c&&C<1&&C++,_&&(C=1),E=1,D=!1)):i(s,"tag-close")?M=!1:i(s,"comment.start")?D=!0:i(s,"comment.end")&&(D=!1),!M&&!C&&s.type==="paren.rparen"&&s.value.substr(0,1)==="}"&&C++,N!==T&&(C=N,T&&(C-=T));if(C){I();for(;C>0;C--)d+="\n";c=!0,!i(s,"comment")&&!s.type.match(/^(comment|string)$/)&&(v=v.trimLeft())}if(v){s.type==="keyword"&&v.match(/^(if|else|elseif|for|foreach|while|switch)$/)?(H[g]=v,j(),p=!0,v.match(/^(else|elseif)$/)&&d.match(/\}[\s]*$/)&&(I(),h=!0)):s.type==="paren.lparen"?(j(),v.substr(-1)==="{"&&(p=!0,O=!1,M||(C=1)),v.substr(0,1)==="{"&&(h=!0,d.substr(-1)!=="["&&d.trimRight().substr(-1)==="["?(I(),h=!1):d.trimRight().substr(-1)===")"?I():F())):s.type==="paren.rparen"?(E=1,v.substr(0,1)==="}"&&(H[g-1]==="case"&&E++,d.trimRight().substr(-1)==="{"?I():(h=!0,_&&(C+=2))),v.substr(0,1)==="]"&&d.substr(-1)!=="}"&&d.trimRight().substr(-1)==="}"&&(h=!1,w++,I()),v.substr(0,1)===")"&&d.substr(-1)!=="("&&d.trimRight().substr(-1)==="("&&(h=!1,w++,I()),F()):s.type!=="keyword.operator"&&s.type!=="keyword"||!v.match(/^(=|==|===|!=|!==|&&|\|\||and|or|xor|\+=|.=|>|>=|<|<=|=>)$/)?s.type==="punctuation.operator"&&v===";"?(I(),j(),p=!0,_&&C++):s.type==="punctuation.operator"&&v.match(/^(:|,)$/)?(I(),j(),v.match(/^(,)$/)&&x>0&&S===0&&f.lineBreaksAfterCommasInCurlyBlock?C++:(p=!0,c=!1)):s.type==="support.php_tag"&&v==="?>"&&!c?(I(),h=!0):i(s,"attribute-name")&&d.substr(-1).match(/^\s$/)?h=!0:i(s,"attribute-equals")?(F(),j()):i(s,"tag-close")?(F(),v==="/>"&&(h=!0)):s.type==="keyword"&&v.match(/^(case|default)$/)&&B&&(E=1):(I(),j(),h=!0,p=!0);if(c&&(!s.type.match(/^(comment)$/)||!!v.substr(0,1).match(/^[/#]$/))&&(!s.type.match(/^(string)$/)||!!v.substr(0,1).match(/^['"@]$/))){w=b;if(g>y){w++;for(A=g;A>y;A--)P[A]=w}else g<y&&(w=P[g]);y=g,b=w,E&&(w-=E),O&&!S&&(w++,O=!1);for(A=0;A<w;A++)d+=o}s.type==="keyword"&&v.match(/^(case|default)$/)?B===!1&&(H[g]=v,g++,B=!0):s.type==="keyword"&&v.match(/^(break)$/)&&H[g-1]&&H[g-1].match(/^(case|default)$/)&&(g--,B=!1),s.type==="paren.lparen"&&(S+=(v.match(/\(/g)||[]).length,x+=(v.match(/\{/g)||[]).length,g+=v.length),s.type==="keyword"&&v.match(/^(if|else|elseif|for|while)$/)?(O=!0,S=0):!S&&v.trim()&&s.type!=="comment"&&(O=!1);if(s.type==="paren.rparen"){S-=(v.match(/\)/g)||[]).length,x-=(v.match(/\}/g)||[]).length;for(A=0;A<v.length;A++)g--,v.substr(A,1)==="}"&&H[g]==="case"&&g--}s.type=="text"&&(v=v.replace(/\s+$/," ")),h&&!c&&(F(),d.substr(-1)!=="\n"&&(d+=" ")),d+=v,p&&(d+=" "),c=!1,h=!1,p=!1;if(i(s,"tag-close")&&(D||a.indexOf(m)!==-1)||i(s,"doctype")&&v===">")D&&l&&l.value==="</"?C=-1:C=1;l&&u.indexOf(l.value)===-1&&(i(s,"tag-open")&&v==="</"?g--:i(s,"tag-open")&&v==="<"?g++:i(s,"tag-close")&&v==="/>"&&g--),i(s,"tag-name")&&(m=v),T=N}}s=l}d=d.trim(),e.doc.setValue(d)},t.commands=[{name:"beautify",description:"Format selection (Beautify)",exec:function(e){t.beautify(e.session)},bindKey:"Ctrl-Shift-B"}]}); (function() {
|
||||
window.require(["ace/ext/beautify"], function(m) {
|
||||
if (typeof module == "object" && typeof exports == "object" && module) {
|
||||
module.exports = m;
|
||||
}
|
||||
});
|
||||
})();
|
||||
|
||||
@@ -1,238 +1,7 @@
|
||||
define("ace/ext/code_lens",["require","exports","module","ace/line_widgets","ace/lib/event","ace/lib/lang","ace/lib/dom","ace/editor","ace/config"], function(require, exports, module) {
|
||||
"use strict";
|
||||
var LineWidgets = require("../line_widgets").LineWidgets;
|
||||
var event = require("../lib/event");
|
||||
var lang = require("../lib/lang");
|
||||
var dom = require("../lib/dom");
|
||||
|
||||
function clearLensElements(renderer) {
|
||||
var textLayer = renderer.$textLayer;
|
||||
var lensElements = textLayer.$lenses;
|
||||
if (lensElements)
|
||||
lensElements.forEach(function(el) {el.remove(); });
|
||||
textLayer.$lenses = null;
|
||||
}
|
||||
|
||||
function renderWidgets(changes, renderer) {
|
||||
var changed = changes & renderer.CHANGE_LINES
|
||||
|| changes & renderer.CHANGE_FULL
|
||||
|| changes & renderer.CHANGE_SCROLL
|
||||
|| changes & renderer.CHANGE_TEXT;
|
||||
if (!changed)
|
||||
return;
|
||||
|
||||
var session = renderer.session;
|
||||
var lineWidgets = renderer.session.lineWidgets;
|
||||
var textLayer = renderer.$textLayer;
|
||||
var lensElements = textLayer.$lenses;
|
||||
if (!lineWidgets) {
|
||||
if (lensElements)
|
||||
clearLensElements(renderer);
|
||||
return;
|
||||
}
|
||||
|
||||
var textCells = renderer.$textLayer.$lines.cells;
|
||||
var config = renderer.layerConfig;
|
||||
var padding = renderer.$padding;
|
||||
|
||||
if (!lensElements)
|
||||
lensElements = textLayer.$lenses = [];
|
||||
|
||||
|
||||
var index = 0;
|
||||
for (var i = 0; i < textCells.length; i++) {
|
||||
var row = textCells[i].row;
|
||||
var widget = lineWidgets[row];
|
||||
var lenses = widget && widget.lenses;
|
||||
|
||||
if (!lenses || !lenses.length) continue;
|
||||
|
||||
var lensContainer = lensElements[index];
|
||||
if (!lensContainer) {
|
||||
lensContainer = lensElements[index]
|
||||
= dom.buildDom(["div", {class: "ace_codeLens"}], renderer.container);
|
||||
}
|
||||
lensContainer.style.height = config.lineHeight + "px";
|
||||
index++;
|
||||
|
||||
for (var j = 0; j < lenses.length; j++) {
|
||||
var el = lensContainer.childNodes[2 * j];
|
||||
if (!el) {
|
||||
if (j != 0) lensContainer.appendChild(dom.createTextNode("\xa0|\xa0"));
|
||||
el = dom.buildDom(["a"], lensContainer);
|
||||
}
|
||||
el.textContent = lenses[j].title;
|
||||
el.lensCommand = lenses[j];
|
||||
}
|
||||
while (lensContainer.childNodes.length > 2 * j - 1)
|
||||
lensContainer.lastChild.remove();
|
||||
|
||||
var top = renderer.$cursorLayer.getPixelPosition({
|
||||
row: row,
|
||||
column: 0
|
||||
}, true).top - config.lineHeight * widget.rowsAbove - config.offset;
|
||||
lensContainer.style.top = top + "px";
|
||||
|
||||
var left = renderer.gutterWidth;
|
||||
var indent = session.getLine(row).search(/\S|$/);
|
||||
if (indent == -1)
|
||||
indent = 0;
|
||||
left += indent * config.characterWidth;
|
||||
left -= renderer.scrollLeft;
|
||||
lensContainer.style.paddingLeft = padding + left + "px";
|
||||
}
|
||||
while (index < lensElements.length)
|
||||
lensElements.pop().remove();
|
||||
}
|
||||
|
||||
function clearCodeLensWidgets(session) {
|
||||
if (!session.lineWidgets) return;
|
||||
var widgetManager = session.widgetManager;
|
||||
session.lineWidgets.forEach(function(widget) {
|
||||
if (widget && widget.lenses)
|
||||
widgetManager.removeLineWidget(widget);
|
||||
});
|
||||
}
|
||||
|
||||
exports.setLenses = function(session, lenses) {
|
||||
var firstRow = Number.MAX_VALUE;
|
||||
|
||||
clearCodeLensWidgets(session);
|
||||
lenses && lenses.forEach(function(lens) {
|
||||
var row = lens.start.row;
|
||||
var column = lens.start.column;
|
||||
var widget = session.lineWidgets && session.lineWidgets[row];
|
||||
if (!widget || !widget.lenses) {
|
||||
widget = session.widgetManager.$registerLineWidget({
|
||||
rowCount: 1,
|
||||
rowsAbove: 1,
|
||||
row: row,
|
||||
column: column,
|
||||
lenses: []
|
||||
});
|
||||
}
|
||||
widget.lenses.push(lens.command);
|
||||
if (row < firstRow)
|
||||
firstRow = row;
|
||||
});
|
||||
session._emit("changeFold", {data: {start: {row: firstRow}}});
|
||||
};
|
||||
|
||||
function attachToEditor(editor) {
|
||||
editor.codeLensProviders = [];
|
||||
editor.renderer.on("afterRender", renderWidgets);
|
||||
if (!editor.$codeLensClickHandler) {
|
||||
editor.$codeLensClickHandler = function(e) {
|
||||
var command = e.target.lensCommand;
|
||||
if (command)
|
||||
editor.execCommand(command.id, command.arguments);
|
||||
};
|
||||
event.addListener(editor.container, "click", editor.$codeLensClickHandler, editor);
|
||||
}
|
||||
editor.$updateLenses = function() {
|
||||
var session = editor.session;
|
||||
if (!session) return;
|
||||
|
||||
if (!session.widgetManager) {
|
||||
session.widgetManager = new LineWidgets(session);
|
||||
session.widgetManager.attach(editor);
|
||||
}
|
||||
|
||||
var providersToWaitNum = editor.codeLensProviders.length;
|
||||
var lenses = [];
|
||||
editor.codeLensProviders.forEach(function(provider) {
|
||||
provider.provideCodeLenses(session, function(err, payload) {
|
||||
if (err) return;
|
||||
payload.forEach(function(lens) {
|
||||
lenses.push(lens);
|
||||
});
|
||||
providersToWaitNum--;
|
||||
if (providersToWaitNum == 0) {
|
||||
applyLenses();
|
||||
}
|
||||
});
|
||||
});
|
||||
|
||||
function applyLenses() {
|
||||
var cursor = session.selection.cursor;
|
||||
var oldRow = session.documentToScreenRow(cursor);
|
||||
exports.setLenses(session, lenses);
|
||||
|
||||
var lastDelta = session.$undoManager && session.$undoManager.$lastDelta;
|
||||
if (lastDelta && lastDelta.action == "remove" && lastDelta.lines.length > 1)
|
||||
return;
|
||||
var row = session.documentToScreenRow(cursor);
|
||||
var lineHeight = editor.renderer.layerConfig.lineHeight;
|
||||
var top = session.getScrollTop() + (row - oldRow) * lineHeight;
|
||||
session.setScrollTop(top);
|
||||
}
|
||||
};
|
||||
var updateLenses = lang.delayedCall(editor.$updateLenses);
|
||||
editor.$updateLensesOnInput = function() {
|
||||
updateLenses.delay(250);
|
||||
};
|
||||
editor.on("input", editor.$updateLensesOnInput);
|
||||
}
|
||||
|
||||
function detachFromEditor(editor) {
|
||||
editor.off("input", editor.$updateLensesOnInput);
|
||||
editor.renderer.off("afterRender", renderWidgets);
|
||||
if (editor.$codeLensClickHandler)
|
||||
editor.container.removeEventListener("click", editor.$codeLensClickHandler);
|
||||
}
|
||||
|
||||
exports.registerCodeLensProvider = function(editor, codeLensProvider) {
|
||||
editor.setOption("enableCodeLens", true);
|
||||
editor.codeLensProviders.push(codeLensProvider);
|
||||
editor.$updateLensesOnInput();
|
||||
};
|
||||
|
||||
exports.clear = function(session) {
|
||||
exports.setLenses(session, null);
|
||||
};
|
||||
|
||||
var Editor = require("../editor").Editor;
|
||||
require("../config").defineOptions(Editor.prototype, "editor", {
|
||||
enableCodeLens: {
|
||||
set: function(val) {
|
||||
if (val) {
|
||||
attachToEditor(this);
|
||||
} else {
|
||||
detachFromEditor(this);
|
||||
}
|
||||
}
|
||||
}
|
||||
});
|
||||
|
||||
dom.importCssString("\
|
||||
.ace_codeLens {\
|
||||
position: absolute;\
|
||||
color: #aaa;\
|
||||
font-size: 88%;\
|
||||
background: inherit;\
|
||||
width: 100%;\
|
||||
display: flex;\
|
||||
align-items: flex-end;\
|
||||
pointer-events: none;\
|
||||
}\
|
||||
.ace_codeLens > a {\
|
||||
cursor: pointer;\
|
||||
pointer-events: auto;\
|
||||
}\
|
||||
.ace_codeLens > a:hover {\
|
||||
color: #0000ff;\
|
||||
text-decoration: underline;\
|
||||
}\
|
||||
.ace_dark > .ace_codeLens > a:hover {\
|
||||
color: #4e94ce;\
|
||||
}\
|
||||
", "codelense.css", false);
|
||||
|
||||
}); (function() {
|
||||
define("ace/ext/code_lens",["require","exports","module","ace/lib/event","ace/lib/lang","ace/lib/dom","ace/editor","ace/config"],function(e,t,n){"use strict";function o(e){var t=e.$textLayer,n=t.$lenses;n&&n.forEach(function(e){e.remove()}),t.$lenses=null}function u(e,t){var n=e&t.CHANGE_LINES||e&t.CHANGE_FULL||e&t.CHANGE_SCROLL||e&t.CHANGE_TEXT;if(!n)return;var r=t.session,i=t.session.lineWidgets,u=t.$textLayer,a=u.$lenses;if(!i){a&&o(t);return}var f=t.$textLayer.$lines.cells,l=t.layerConfig,c=t.$padding;a||(a=u.$lenses=[]);var h=0;for(var p=0;p<f.length;p++){var d=f[p].row,v=i[d],m=v&&v.lenses;if(!m||!m.length)continue;var g=a[h];g||(g=a[h]=s.buildDom(["div",{"class":"ace_codeLens"}],t.container)),g.style.height=l.lineHeight+"px",h++;for(var y=0;y<m.length;y++){var b=g.childNodes[2*y];b||(y!=0&&g.appendChild(s.createTextNode("\u00a0|\u00a0")),b=s.buildDom(["a"],g)),b.textContent=m[y].title,b.lensCommand=m[y]}while(g.childNodes.length>2*y-1)g.lastChild.remove();var w=t.$cursorLayer.getPixelPosition({row:d,column:0},!0).top-l.lineHeight*v.rowsAbove-l.offset;g.style.top=w+"px";var E=t.gutterWidth,S=r.getLine(d).search(/\S|$/);S==-1&&(S=0),E+=S*l.characterWidth,g.style.paddingLeft=c+E+"px"}while(h<a.length)a.pop().remove()}function a(e){if(!e.lineWidgets)return;var t=e.widgetManager;e.lineWidgets.forEach(function(e){e&&e.lenses&&t.removeLineWidget(e)})}function f(e){e.codeLensProviders=[],e.renderer.on("afterRender",u),e.$codeLensClickHandler||(e.$codeLensClickHandler=function(t){var n=t.target.lensCommand;if(!n)return;e.execCommand(n.id,n.arguments),e._emit("codeLensClick",t)},r.addListener(e.container,"click",e.$codeLensClickHandler,e)),e.$updateLenses=function(){function s(){var r=n.selection.cursor,s=n.documentToScreenRow(r),o=n.getScrollTop(),u=t.setLenses(n,i),a=n.$undoManager&&n.$undoManager.$lastDelta;if(a&&a.action=="remove"&&a.lines.length>1)return;var f=n.documentToScreenRow(r),l=e.renderer.layerConfig.lineHeight,c=n.getScrollTop()+(f-s)*l;u==0&&o<l/4&&o>-l/4&&(c=-l),n.setScrollTop(c)}var n=e.session;if(!n)return;var r=e.codeLensProviders.length,i=[];e.codeLensProviders.forEach(function(e){e.provideCodeLenses(n,function(e,t){if(e)return;t.forEach(function(e){i.push(e)}),r--,r==0&&s()})})};var n=i.delayedCall(e.$updateLenses);e.$updateLensesOnInput=function(){n.delay(250)},e.on("input",e.$updateLensesOnInput)}function l(e){e.off("input",e.$updateLensesOnInput),e.renderer.off("afterRender",u),e.$codeLensClickHandler&&e.container.removeEventListener("click",e.$codeLensClickHandler)}var r=e("../lib/event"),i=e("../lib/lang"),s=e("../lib/dom");t.setLenses=function(e,t){var n=Number.MAX_VALUE;return a(e),t&&t.forEach(function(t){var r=t.start.row,i=t.start.column,s=e.lineWidgets&&e.lineWidgets[r];if(!s||!s.lenses)s=e.widgetManager.$registerLineWidget({rowCount:1,rowsAbove:1,row:r,column:i,lenses:[]});s.lenses.push(t.command),r<n&&(n=r)}),e._emit("changeFold",{data:{start:{row:n}}}),n},t.registerCodeLensProvider=function(e,t){e.setOption("enableCodeLens",!0),e.codeLensProviders.push(t),e.$updateLensesOnInput()},t.clear=function(e){t.setLenses(e,null)};var c=e("../editor").Editor;e("../config").defineOptions(c.prototype,"editor",{enableCodeLens:{set:function(e){e?f(this):l(this)}}}),s.importCssString("\n.ace_codeLens {\n position: absolute;\n color: #aaa;\n font-size: 88%;\n background: inherit;\n width: 100%;\n display: flex;\n align-items: flex-end;\n pointer-events: none;\n}\n.ace_codeLens > a {\n cursor: pointer;\n pointer-events: auto;\n}\n.ace_codeLens > a:hover {\n color: #0000ff;\n text-decoration: underline;\n}\n.ace_dark > .ace_codeLens > a:hover {\n color: #4e94ce;\n}\n","codelense.css",!1)}); (function() {
|
||||
window.require(["ace/ext/code_lens"], function(m) {
|
||||
if (typeof module == "object" && typeof exports == "object" && module) {
|
||||
module.exports = m;
|
||||
}
|
||||
});
|
||||
})();
|
||||
|
||||
7
htdocs/includes/ace/src/ext-command_bar.js
Normal file
7
htdocs/includes/ace/src/ext-command_bar.js
Normal file
File diff suppressed because one or more lines are too long
7
htdocs/includes/ace/src/ext-diff.js
Normal file
7
htdocs/includes/ace/src/ext-diff.js
Normal file
File diff suppressed because one or more lines are too long
@@ -1,277 +1,7 @@
|
||||
define("ace/ext/elastic_tabstops_lite",["require","exports","module","ace/editor","ace/config"], function(require, exports, module) {
|
||||
"use strict";
|
||||
|
||||
var ElasticTabstopsLite = function(editor) {
|
||||
this.$editor = editor;
|
||||
var self = this;
|
||||
var changedRows = [];
|
||||
var recordChanges = false;
|
||||
this.onAfterExec = function() {
|
||||
recordChanges = false;
|
||||
self.processRows(changedRows);
|
||||
changedRows = [];
|
||||
};
|
||||
this.onExec = function() {
|
||||
recordChanges = true;
|
||||
};
|
||||
this.onChange = function(delta) {
|
||||
if (recordChanges) {
|
||||
if (changedRows.indexOf(delta.start.row) == -1)
|
||||
changedRows.push(delta.start.row);
|
||||
if (delta.end.row != delta.start.row)
|
||||
changedRows.push(delta.end.row);
|
||||
}
|
||||
};
|
||||
};
|
||||
|
||||
(function() {
|
||||
this.processRows = function(rows) {
|
||||
this.$inChange = true;
|
||||
var checkedRows = [];
|
||||
|
||||
for (var r = 0, rowCount = rows.length; r < rowCount; r++) {
|
||||
var row = rows[r];
|
||||
|
||||
if (checkedRows.indexOf(row) > -1)
|
||||
continue;
|
||||
|
||||
var cellWidthObj = this.$findCellWidthsForBlock(row);
|
||||
var cellWidths = this.$setBlockCellWidthsToMax(cellWidthObj.cellWidths);
|
||||
var rowIndex = cellWidthObj.firstRow;
|
||||
|
||||
for (var w = 0, l = cellWidths.length; w < l; w++) {
|
||||
var widths = cellWidths[w];
|
||||
checkedRows.push(rowIndex);
|
||||
this.$adjustRow(rowIndex, widths);
|
||||
rowIndex++;
|
||||
}
|
||||
}
|
||||
this.$inChange = false;
|
||||
};
|
||||
|
||||
this.$findCellWidthsForBlock = function(row) {
|
||||
var cellWidths = [], widths;
|
||||
var rowIter = row;
|
||||
while (rowIter >= 0) {
|
||||
widths = this.$cellWidthsForRow(rowIter);
|
||||
if (widths.length == 0)
|
||||
break;
|
||||
|
||||
cellWidths.unshift(widths);
|
||||
rowIter--;
|
||||
}
|
||||
var firstRow = rowIter + 1;
|
||||
rowIter = row;
|
||||
var numRows = this.$editor.session.getLength();
|
||||
|
||||
while (rowIter < numRows - 1) {
|
||||
rowIter++;
|
||||
|
||||
widths = this.$cellWidthsForRow(rowIter);
|
||||
if (widths.length == 0)
|
||||
break;
|
||||
|
||||
cellWidths.push(widths);
|
||||
}
|
||||
|
||||
return { cellWidths: cellWidths, firstRow: firstRow };
|
||||
};
|
||||
|
||||
this.$cellWidthsForRow = function(row) {
|
||||
var selectionColumns = this.$selectionColumnsForRow(row);
|
||||
|
||||
var tabs = [-1].concat(this.$tabsForRow(row));
|
||||
var widths = tabs.map(function(el) { return 0; } ).slice(1);
|
||||
var line = this.$editor.session.getLine(row);
|
||||
|
||||
for (var i = 0, len = tabs.length - 1; i < len; i++) {
|
||||
var leftEdge = tabs[i]+1;
|
||||
var rightEdge = tabs[i+1];
|
||||
|
||||
var rightmostSelection = this.$rightmostSelectionInCell(selectionColumns, rightEdge);
|
||||
var cell = line.substring(leftEdge, rightEdge);
|
||||
widths[i] = Math.max(cell.replace(/\s+$/g,'').length, rightmostSelection - leftEdge);
|
||||
}
|
||||
|
||||
return widths;
|
||||
};
|
||||
|
||||
this.$selectionColumnsForRow = function(row) {
|
||||
var selections = [], cursor = this.$editor.getCursorPosition();
|
||||
if (this.$editor.session.getSelection().isEmpty()) {
|
||||
if (row == cursor.row)
|
||||
selections.push(cursor.column);
|
||||
}
|
||||
|
||||
return selections;
|
||||
};
|
||||
|
||||
this.$setBlockCellWidthsToMax = function(cellWidths) {
|
||||
var startingNewBlock = true, blockStartRow, blockEndRow, maxWidth;
|
||||
var columnInfo = this.$izip_longest(cellWidths);
|
||||
|
||||
for (var c = 0, l = columnInfo.length; c < l; c++) {
|
||||
var column = columnInfo[c];
|
||||
if (!column.push) {
|
||||
console.error(column);
|
||||
continue;
|
||||
}
|
||||
column.push(NaN);
|
||||
|
||||
for (var r = 0, s = column.length; r < s; r++) {
|
||||
var width = column[r];
|
||||
if (startingNewBlock) {
|
||||
blockStartRow = r;
|
||||
maxWidth = 0;
|
||||
startingNewBlock = false;
|
||||
}
|
||||
if (isNaN(width)) {
|
||||
blockEndRow = r;
|
||||
|
||||
for (var j = blockStartRow; j < blockEndRow; j++) {
|
||||
cellWidths[j][c] = maxWidth;
|
||||
}
|
||||
startingNewBlock = true;
|
||||
}
|
||||
|
||||
maxWidth = Math.max(maxWidth, width);
|
||||
}
|
||||
}
|
||||
|
||||
return cellWidths;
|
||||
};
|
||||
|
||||
this.$rightmostSelectionInCell = function(selectionColumns, cellRightEdge) {
|
||||
var rightmost = 0;
|
||||
|
||||
if (selectionColumns.length) {
|
||||
var lengths = [];
|
||||
for (var s = 0, length = selectionColumns.length; s < length; s++) {
|
||||
if (selectionColumns[s] <= cellRightEdge)
|
||||
lengths.push(s);
|
||||
else
|
||||
lengths.push(0);
|
||||
}
|
||||
rightmost = Math.max.apply(Math, lengths);
|
||||
}
|
||||
|
||||
return rightmost;
|
||||
};
|
||||
|
||||
this.$tabsForRow = function(row) {
|
||||
var rowTabs = [], line = this.$editor.session.getLine(row),
|
||||
re = /\t/g, match;
|
||||
|
||||
while ((match = re.exec(line)) != null) {
|
||||
rowTabs.push(match.index);
|
||||
}
|
||||
|
||||
return rowTabs;
|
||||
};
|
||||
|
||||
this.$adjustRow = function(row, widths) {
|
||||
var rowTabs = this.$tabsForRow(row);
|
||||
|
||||
if (rowTabs.length == 0)
|
||||
return;
|
||||
|
||||
var bias = 0, location = -1;
|
||||
var expandedSet = this.$izip(widths, rowTabs);
|
||||
|
||||
for (var i = 0, l = expandedSet.length; i < l; i++) {
|
||||
var w = expandedSet[i][0], it = expandedSet[i][1];
|
||||
location += 1 + w;
|
||||
it += bias;
|
||||
var difference = location - it;
|
||||
|
||||
if (difference == 0)
|
||||
continue;
|
||||
|
||||
var partialLine = this.$editor.session.getLine(row).substr(0, it );
|
||||
var strippedPartialLine = partialLine.replace(/\s*$/g, "");
|
||||
var ispaces = partialLine.length - strippedPartialLine.length;
|
||||
|
||||
if (difference > 0) {
|
||||
this.$editor.session.getDocument().insertInLine({row: row, column: it + 1}, Array(difference + 1).join(" ") + "\t");
|
||||
this.$editor.session.getDocument().removeInLine(row, it, it + 1);
|
||||
|
||||
bias += difference;
|
||||
}
|
||||
|
||||
if (difference < 0 && ispaces >= -difference) {
|
||||
this.$editor.session.getDocument().removeInLine(row, it + difference, it);
|
||||
bias += difference;
|
||||
}
|
||||
}
|
||||
};
|
||||
this.$izip_longest = function(iterables) {
|
||||
if (!iterables[0])
|
||||
return [];
|
||||
var longest = iterables[0].length;
|
||||
var iterablesLength = iterables.length;
|
||||
|
||||
for (var i = 1; i < iterablesLength; i++) {
|
||||
var iLength = iterables[i].length;
|
||||
if (iLength > longest)
|
||||
longest = iLength;
|
||||
}
|
||||
|
||||
var expandedSet = [];
|
||||
|
||||
for (var l = 0; l < longest; l++) {
|
||||
var set = [];
|
||||
for (var i = 0; i < iterablesLength; i++) {
|
||||
if (iterables[i][l] === "")
|
||||
set.push(NaN);
|
||||
else
|
||||
set.push(iterables[i][l]);
|
||||
}
|
||||
|
||||
expandedSet.push(set);
|
||||
}
|
||||
|
||||
|
||||
return expandedSet;
|
||||
};
|
||||
this.$izip = function(widths, tabs) {
|
||||
var size = widths.length >= tabs.length ? tabs.length : widths.length;
|
||||
|
||||
var expandedSet = [];
|
||||
for (var i = 0; i < size; i++) {
|
||||
var set = [ widths[i], tabs[i] ];
|
||||
expandedSet.push(set);
|
||||
}
|
||||
return expandedSet;
|
||||
};
|
||||
|
||||
}).call(ElasticTabstopsLite.prototype);
|
||||
|
||||
exports.ElasticTabstopsLite = ElasticTabstopsLite;
|
||||
|
||||
var Editor = require("../editor").Editor;
|
||||
require("../config").defineOptions(Editor.prototype, "editor", {
|
||||
useElasticTabstops: {
|
||||
set: function(val) {
|
||||
if (val) {
|
||||
if (!this.elasticTabstops)
|
||||
this.elasticTabstops = new ElasticTabstopsLite(this);
|
||||
this.commands.on("afterExec", this.elasticTabstops.onAfterExec);
|
||||
this.commands.on("exec", this.elasticTabstops.onExec);
|
||||
this.on("change", this.elasticTabstops.onChange);
|
||||
} else if (this.elasticTabstops) {
|
||||
this.commands.removeListener("afterExec", this.elasticTabstops.onAfterExec);
|
||||
this.commands.removeListener("exec", this.elasticTabstops.onExec);
|
||||
this.removeListener("change", this.elasticTabstops.onChange);
|
||||
}
|
||||
}
|
||||
}
|
||||
});
|
||||
|
||||
}); (function() {
|
||||
define("ace/ext/elastic_tabstops_lite",["require","exports","module","ace/editor","ace/config"],function(e,t,n){"use strict";var r=function(){function e(e){this.$editor=e;var t=this,n=[],r=!1;this.onAfterExec=function(){r=!1,t.processRows(n),n=[]},this.onExec=function(){r=!0},this.onChange=function(e){r&&(n.indexOf(e.start.row)==-1&&n.push(e.start.row),e.end.row!=e.start.row&&n.push(e.end.row))}}return e.prototype.processRows=function(e){this.$inChange=!0;var t=[];for(var n=0,r=e.length;n<r;n++){var i=e[n];if(t.indexOf(i)>-1)continue;var s=this.$findCellWidthsForBlock(i),o=this.$setBlockCellWidthsToMax(s.cellWidths),u=s.firstRow;for(var a=0,f=o.length;a<f;a++){var l=o[a];t.push(u),this.$adjustRow(u,l),u++}}this.$inChange=!1},e.prototype.$findCellWidthsForBlock=function(e){var t=[],n,r=e;while(r>=0){n=this.$cellWidthsForRow(r);if(n.length==0)break;t.unshift(n),r--}var i=r+1;r=e;var s=this.$editor.session.getLength();while(r<s-1){r++,n=this.$cellWidthsForRow(r);if(n.length==0)break;t.push(n)}return{cellWidths:t,firstRow:i}},e.prototype.$cellWidthsForRow=function(e){var t=this.$selectionColumnsForRow(e),n=[-1].concat(this.$tabsForRow(e)),r=n.map(function(e){return 0}).slice(1),i=this.$editor.session.getLine(e);for(var s=0,o=n.length-1;s<o;s++){var u=n[s]+1,a=n[s+1],f=this.$rightmostSelectionInCell(t,a),l=i.substring(u,a);r[s]=Math.max(l.replace(/\s+$/g,"").length,f-u)}return r},e.prototype.$selectionColumnsForRow=function(e){var t=[],n=this.$editor.getCursorPosition();return this.$editor.session.getSelection().isEmpty()&&e==n.row&&t.push(n.column),t},e.prototype.$setBlockCellWidthsToMax=function(e){var t=!0,n,r,i,s=this.$izip_longest(e);for(var o=0,u=s.length;o<u;o++){var a=s[o];if(!a.push){console.error(a);continue}a.push(NaN);for(var f=0,l=a.length;f<l;f++){var c=a[f];t&&(n=f,i=0,t=!1);if(isNaN(c)){r=f;for(var h=n;h<r;h++)e[h][o]=i;t=!0}i=Math.max(i,c)}}return e},e.prototype.$rightmostSelectionInCell=function(e,t){var n=0;if(e.length){var r=[];for(var i=0,s=e.length;i<s;i++)e[i]<=t?r.push(i):r.push(0);n=Math.max.apply(Math,r)}return n},e.prototype.$tabsForRow=function(e){var t=[],n=this.$editor.session.getLine(e),r=/\t/g,i;while((i=r.exec(n))!=null)t.push(i.index);return t},e.prototype.$adjustRow=function(e,t){var n=this.$tabsForRow(e);if(n.length==0)return;var r=0,i=-1,s=this.$izip(t,n);for(var o=0,u=s.length;o<u;o++){var a=s[o][0],f=s[o][1];i+=1+a,f+=r;var l=i-f;if(l==0)continue;var c=this.$editor.session.getLine(e).substr(0,f),h=c.replace(/\s*$/g,""),p=c.length-h.length;l>0&&(this.$editor.session.getDocument().insertInLine({row:e,column:f+1},Array(l+1).join(" ")+" "),this.$editor.session.getDocument().removeInLine(e,f,f+1),r+=l),l<0&&p>=-l&&(this.$editor.session.getDocument().removeInLine(e,f+l,f),r+=l)}},e.prototype.$izip_longest=function(e){if(!e[0])return[];var t=e[0].length,n=e.length;for(var r=1;r<n;r++){var i=e[r].length;i>t&&(t=i)}var s=[];for(var o=0;o<t;o++){var u=[];for(var r=0;r<n;r++)e[r][o]===""?u.push(NaN):u.push(e[r][o]);s.push(u)}return s},e.prototype.$izip=function(e,t){var n=e.length>=t.length?t.length:e.length,r=[];for(var i=0;i<n;i++){var s=[e[i],t[i]];r.push(s)}return r},e}();t.ElasticTabstopsLite=r;var i=e("../editor").Editor;e("../config").defineOptions(i.prototype,"editor",{useElasticTabstops:{set:function(e){e?(this.elasticTabstops||(this.elasticTabstops=new r(this)),this.commands.on("afterExec",this.elasticTabstops.onAfterExec),this.commands.on("exec",this.elasticTabstops.onExec),this.on("change",this.elasticTabstops.onChange)):this.elasticTabstops&&(this.commands.removeListener("afterExec",this.elasticTabstops.onAfterExec),this.commands.removeListener("exec",this.elasticTabstops.onExec),this.removeListener("change",this.elasticTabstops.onChange))}}})}); (function() {
|
||||
window.require(["ace/ext/elastic_tabstops_lite"], function(m) {
|
||||
if (typeof module == "object" && typeof exports == "object" && module) {
|
||||
module.exports = m;
|
||||
}
|
||||
});
|
||||
})();
|
||||
|
||||
File diff suppressed because one or more lines are too long
@@ -1,4 +1,3 @@
|
||||
|
||||
; (function() {
|
||||
window.require(["ace/ext/error_marker"], function(m) {
|
||||
if (typeof module == "object" && typeof exports == "object" && module) {
|
||||
@@ -6,4 +5,3 @@
|
||||
}
|
||||
});
|
||||
})();
|
||||
|
||||
@@ -1,125 +1,7 @@
|
||||
define("ace/ext/hardwrap",["require","exports","module","ace/range","ace/editor","ace/config"], function(require, exports, module) {
|
||||
"use strict";
|
||||
|
||||
var Range = require("../range").Range;
|
||||
|
||||
function hardWrap(editor, options) {
|
||||
var max = options.column || editor.getOption("printMarginColumn");
|
||||
var allowMerge = options.allowMerge != false;
|
||||
|
||||
var row = Math.min(options.startRow, options.endRow);
|
||||
var endRow = Math.max(options.startRow, options.endRow);
|
||||
|
||||
var session = editor.session;
|
||||
|
||||
while (row <= endRow) {
|
||||
var line = session.getLine(row);
|
||||
if (line.length > max) {
|
||||
var space = findSpace(line, max, 5);
|
||||
if (space) {
|
||||
var indentation = /^\s*/.exec(line)[0];
|
||||
session.replace(new Range(row,space.start,row,space.end), "\n" + indentation);
|
||||
}
|
||||
endRow++;
|
||||
} else if (allowMerge && /\S/.test(line) && row != endRow) {
|
||||
var nextLine = session.getLine(row + 1);
|
||||
if (nextLine && /\S/.test(nextLine)) {
|
||||
var trimmedLine = line.replace(/\s+$/, "");
|
||||
var trimmedNextLine = nextLine.replace(/^\s+/, "");
|
||||
var mergedLine = trimmedLine + " " + trimmedNextLine;
|
||||
|
||||
var space = findSpace(mergedLine, max, 5);
|
||||
if (space && space.start > trimmedLine.length || mergedLine.length < max) {
|
||||
var replaceRange = new Range(row,trimmedLine.length,row + 1,nextLine.length - trimmedNextLine.length);
|
||||
session.replace(replaceRange, " ");
|
||||
row--;
|
||||
endRow--;
|
||||
} else if (trimmedLine.length < line.length) {
|
||||
session.remove(new Range(row, trimmedLine.length, row, line.length));
|
||||
}
|
||||
}
|
||||
}
|
||||
row++;
|
||||
}
|
||||
|
||||
function findSpace(line, max, min) {
|
||||
if (line.length < max)
|
||||
return;
|
||||
var before = line.slice(0, max);
|
||||
var after = line.slice(max);
|
||||
var spaceAfter = /^(?:(\s+)|(\S+)(\s+))/.exec(after);
|
||||
var spaceBefore = /(?:(\s+)|(\s+)(\S+))$/.exec(before);
|
||||
var start = 0;
|
||||
var end = 0;
|
||||
if (spaceBefore && !spaceBefore[2]) {
|
||||
start = max - spaceBefore[1].length;
|
||||
end = max;
|
||||
}
|
||||
if (spaceAfter && !spaceAfter[2]) {
|
||||
if (!start)
|
||||
start = max;
|
||||
end = max + spaceAfter[1].length;
|
||||
}
|
||||
if (start) {
|
||||
return {
|
||||
start: start,
|
||||
end: end
|
||||
};
|
||||
}
|
||||
if (spaceBefore && spaceBefore[2] && spaceBefore.index > min) {
|
||||
return {
|
||||
start: spaceBefore.index,
|
||||
end: spaceBefore.index + spaceBefore[2].length
|
||||
};
|
||||
}
|
||||
if (spaceAfter && spaceAfter[2]) {
|
||||
start = max + spaceAfter[2].length;
|
||||
return {
|
||||
start: start,
|
||||
end: start + spaceAfter[3].length
|
||||
};
|
||||
}
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
function wrapAfterInput(e) {
|
||||
if (e.command.name == "insertstring" && /\S/.test(e.args)) {
|
||||
var editor = e.editor;
|
||||
var cursor = editor.selection.cursor;
|
||||
if (cursor.column <= editor.renderer.$printMarginColumn) return;
|
||||
var lastDelta = editor.session.$undoManager.$lastDelta;
|
||||
|
||||
hardWrap(editor, {
|
||||
startRow: cursor.row, endRow: cursor.row,
|
||||
allowMerge: false
|
||||
});
|
||||
if (lastDelta != editor.session.$undoManager.$lastDelta)
|
||||
editor.session.markUndoGroup();
|
||||
}
|
||||
}
|
||||
|
||||
var Editor = require("../editor").Editor;
|
||||
require("../config").defineOptions(Editor.prototype, "editor", {
|
||||
hardWrap: {
|
||||
set: function(val) {
|
||||
if (val) {
|
||||
this.commands.on("afterExec", wrapAfterInput);
|
||||
} else {
|
||||
this.commands.off("afterExec", wrapAfterInput);
|
||||
}
|
||||
},
|
||||
value: false
|
||||
}
|
||||
});
|
||||
|
||||
exports.hardWrap = hardWrap;
|
||||
|
||||
}); (function() {
|
||||
define("ace/ext/hardwrap",["require","exports","module","ace/range","ace/editor","ace/config"],function(e,t,n){"use strict";function i(e,t){function m(e,t,n){if(e.length<t)return;var r=e.slice(0,t),i=e.slice(t),s=/^(?:(\s+)|(\S+)(\s+))/.exec(i),o=/(?:(\s+)|(\s+)(\S+))$/.exec(r),u=0,a=0;o&&!o[2]&&(u=t-o[1].length,a=t),s&&!s[2]&&(u||(u=t),a=t+s[1].length);if(u)return{start:u,end:a};if(o&&o[2]&&o.index>n)return{start:o.index,end:o.index+o[2].length};if(s&&s[2])return u=t+s[2].length,{start:u,end:u+s[3].length}}var n=t.column||e.getOption("printMarginColumn"),i=t.allowMerge!=0,s=Math.min(t.startRow,t.endRow),o=Math.max(t.startRow,t.endRow),u=e.session;while(s<=o){var a=u.getLine(s);if(a.length>n){var f=m(a,n,5);if(f){var l=/^\s*/.exec(a)[0];u.replace(new r(s,f.start,s,f.end),"\n"+l)}o++}else if(i&&/\S/.test(a)&&s!=o){var c=u.getLine(s+1);if(c&&/\S/.test(c)){var h=a.replace(/\s+$/,""),p=c.replace(/^\s+/,""),d=h+" "+p,f=m(d,n,5);if(f&&f.start>h.length||d.length<n){var v=new r(s,h.length,s+1,c.length-p.length);u.replace(v," "),s--,o--}else h.length<a.length&&u.remove(new r(s,h.length,s,a.length))}}s++}}function s(e){if(e.command.name=="insertstring"&&/\S/.test(e.args)){var t=e.editor,n=t.selection.cursor;if(n.column<=t.renderer.$printMarginColumn)return;var r=t.session.$undoManager.$lastDelta;i(t,{startRow:n.row,endRow:n.row,allowMerge:!1}),r!=t.session.$undoManager.$lastDelta&&t.session.markUndoGroup()}}var r=e("../range").Range,o=e("../editor").Editor;e("../config").defineOptions(o.prototype,"editor",{hardWrap:{set:function(e){e?this.commands.on("afterExec",s):this.commands.off("afterExec",s)},value:!1}}),t.hardWrap=i}); (function() {
|
||||
window.require(["ace/ext/hardwrap"], function(m) {
|
||||
if (typeof module == "object" && typeof exports == "object" && module) {
|
||||
module.exports = m;
|
||||
}
|
||||
});
|
||||
})();
|
||||
|
||||
7
htdocs/includes/ace/src/ext-inline_autocomplete.js
Normal file
7
htdocs/includes/ace/src/ext-inline_autocomplete.js
Normal file
File diff suppressed because one or more lines are too long
@@ -1,193 +1,7 @@
|
||||
define("ace/ext/menu_tools/overlay_page",["require","exports","module","ace/lib/dom"], function(require, exports, module) {
|
||||
'use strict';
|
||||
var dom = require("../../lib/dom");
|
||||
var cssText = "#ace_settingsmenu, #kbshortcutmenu {\
|
||||
background-color: #F7F7F7;\
|
||||
color: black;\
|
||||
box-shadow: -5px 4px 5px rgba(126, 126, 126, 0.55);\
|
||||
padding: 1em 0.5em 2em 1em;\
|
||||
overflow: auto;\
|
||||
position: absolute;\
|
||||
margin: 0;\
|
||||
bottom: 0;\
|
||||
right: 0;\
|
||||
top: 0;\
|
||||
z-index: 9991;\
|
||||
cursor: default;\
|
||||
}\
|
||||
.ace_dark #ace_settingsmenu, .ace_dark #kbshortcutmenu {\
|
||||
box-shadow: -20px 10px 25px rgba(126, 126, 126, 0.25);\
|
||||
background-color: rgba(255, 255, 255, 0.6);\
|
||||
color: black;\
|
||||
}\
|
||||
.ace_optionsMenuEntry:hover {\
|
||||
background-color: rgba(100, 100, 100, 0.1);\
|
||||
transition: all 0.3s\
|
||||
}\
|
||||
.ace_closeButton {\
|
||||
background: rgba(245, 146, 146, 0.5);\
|
||||
border: 1px solid #F48A8A;\
|
||||
border-radius: 50%;\
|
||||
padding: 7px;\
|
||||
position: absolute;\
|
||||
right: -8px;\
|
||||
top: -8px;\
|
||||
z-index: 100000;\
|
||||
}\
|
||||
.ace_closeButton{\
|
||||
background: rgba(245, 146, 146, 0.9);\
|
||||
}\
|
||||
.ace_optionsMenuKey {\
|
||||
color: darkslateblue;\
|
||||
font-weight: bold;\
|
||||
}\
|
||||
.ace_optionsMenuCommand {\
|
||||
color: darkcyan;\
|
||||
font-weight: normal;\
|
||||
}\
|
||||
.ace_optionsMenuEntry input, .ace_optionsMenuEntry button {\
|
||||
vertical-align: middle;\
|
||||
}\
|
||||
.ace_optionsMenuEntry button[ace_selected_button=true] {\
|
||||
background: #e7e7e7;\
|
||||
box-shadow: 1px 0px 2px 0px #adadad inset;\
|
||||
border-color: #adadad;\
|
||||
}\
|
||||
.ace_optionsMenuEntry button {\
|
||||
background: white;\
|
||||
border: 1px solid lightgray;\
|
||||
margin: 0px;\
|
||||
}\
|
||||
.ace_optionsMenuEntry button:hover{\
|
||||
background: #f0f0f0;\
|
||||
}";
|
||||
dom.importCssString(cssText, "settings_menu.css", false);
|
||||
|
||||
module.exports.overlayPage = function overlayPage(editor, contentElement, callback) {
|
||||
var closer = document.createElement('div');
|
||||
var ignoreFocusOut = false;
|
||||
|
||||
function documentEscListener(e) {
|
||||
if (e.keyCode === 27) {
|
||||
close();
|
||||
}
|
||||
}
|
||||
|
||||
function close() {
|
||||
if (!closer) return;
|
||||
document.removeEventListener('keydown', documentEscListener);
|
||||
closer.parentNode.removeChild(closer);
|
||||
if (editor) {
|
||||
editor.focus();
|
||||
}
|
||||
closer = null;
|
||||
callback && callback();
|
||||
}
|
||||
function setIgnoreFocusOut(ignore) {
|
||||
ignoreFocusOut = ignore;
|
||||
if (ignore) {
|
||||
closer.style.pointerEvents = "none";
|
||||
contentElement.style.pointerEvents = "auto";
|
||||
}
|
||||
}
|
||||
|
||||
closer.style.cssText = 'margin: 0; padding: 0; ' +
|
||||
'position: fixed; top:0; bottom:0; left:0; right:0;' +
|
||||
'z-index: 9990; ' +
|
||||
(editor ? 'background-color: rgba(0, 0, 0, 0.3);' : '');
|
||||
closer.addEventListener('click', function(e) {
|
||||
if (!ignoreFocusOut) {
|
||||
close();
|
||||
}
|
||||
});
|
||||
document.addEventListener('keydown', documentEscListener);
|
||||
|
||||
contentElement.addEventListener('click', function (e) {
|
||||
e.stopPropagation();
|
||||
});
|
||||
|
||||
closer.appendChild(contentElement);
|
||||
document.body.appendChild(closer);
|
||||
if (editor) {
|
||||
editor.blur();
|
||||
}
|
||||
return {
|
||||
close: close,
|
||||
setIgnoreFocusOut: setIgnoreFocusOut
|
||||
};
|
||||
};
|
||||
|
||||
});
|
||||
|
||||
define("ace/ext/menu_tools/get_editor_keyboard_shortcuts",["require","exports","module","ace/lib/keys"], function(require, exports, module) {
|
||||
"use strict";
|
||||
var keys = require("../../lib/keys");
|
||||
module.exports.getEditorKeybordShortcuts = function(editor) {
|
||||
var KEY_MODS = keys.KEY_MODS;
|
||||
var keybindings = [];
|
||||
var commandMap = {};
|
||||
editor.keyBinding.$handlers.forEach(function(handler) {
|
||||
var ckb = handler.commandKeyBinding;
|
||||
for (var i in ckb) {
|
||||
var key = i.replace(/(^|-)\w/g, function(x) { return x.toUpperCase(); });
|
||||
var commands = ckb[i];
|
||||
if (!Array.isArray(commands))
|
||||
commands = [commands];
|
||||
commands.forEach(function(command) {
|
||||
if (typeof command != "string")
|
||||
command = command.name;
|
||||
if (commandMap[command]) {
|
||||
commandMap[command].key += "|" + key;
|
||||
} else {
|
||||
commandMap[command] = {key: key, command: command};
|
||||
keybindings.push(commandMap[command]);
|
||||
}
|
||||
});
|
||||
}
|
||||
});
|
||||
return keybindings;
|
||||
};
|
||||
|
||||
});
|
||||
|
||||
define("ace/ext/keybinding_menu",["require","exports","module","ace/editor","ace/ext/menu_tools/overlay_page","ace/ext/menu_tools/get_editor_keyboard_shortcuts"], function(require, exports, module) {
|
||||
"use strict";
|
||||
var Editor = require("../editor").Editor;
|
||||
function showKeyboardShortcuts (editor) {
|
||||
if(!document.getElementById('kbshortcutmenu')) {
|
||||
var overlayPage = require('./menu_tools/overlay_page').overlayPage;
|
||||
var getEditorKeybordShortcuts = require('./menu_tools/get_editor_keyboard_shortcuts').getEditorKeybordShortcuts;
|
||||
var kb = getEditorKeybordShortcuts(editor);
|
||||
var el = document.createElement('div');
|
||||
var commands = kb.reduce(function(previous, current) {
|
||||
return previous + '<div class="ace_optionsMenuEntry"><span class="ace_optionsMenuCommand">'
|
||||
+ current.command + '</span> : '
|
||||
+ '<span class="ace_optionsMenuKey">' + current.key + '</span></div>';
|
||||
}, '');
|
||||
|
||||
el.id = 'kbshortcutmenu';
|
||||
el.innerHTML = '<h1>Keyboard Shortcuts</h1>' + commands + '</div>';
|
||||
overlayPage(editor, el);
|
||||
}
|
||||
}
|
||||
module.exports.init = function(editor) {
|
||||
Editor.prototype.showKeyboardShortcuts = function() {
|
||||
showKeyboardShortcuts(this);
|
||||
};
|
||||
editor.commands.addCommands([{
|
||||
name: "showKeyboardShortcuts",
|
||||
bindKey: {win: "Ctrl-Alt-h", mac: "Command-Alt-h"},
|
||||
exec: function(editor, line) {
|
||||
editor.showKeyboardShortcuts();
|
||||
}
|
||||
}]);
|
||||
};
|
||||
|
||||
}); (function() {
|
||||
define("ace/ext/menu_tools/settings_menu.css",["require","exports","module"],function(e,t,n){n.exports="#ace_settingsmenu, #kbshortcutmenu {\n background-color: #F7F7F7;\n color: black;\n box-shadow: -5px 4px 5px rgba(126, 126, 126, 0.55);\n padding: 1em 0.5em 2em 1em;\n overflow: auto;\n position: absolute;\n margin: 0;\n bottom: 0;\n right: 0;\n top: 0;\n z-index: 9991;\n cursor: default;\n}\n\n.ace_dark #ace_settingsmenu, .ace_dark #kbshortcutmenu {\n box-shadow: -20px 10px 25px rgba(126, 126, 126, 0.25);\n background-color: rgba(255, 255, 255, 0.6);\n color: black;\n}\n\n.ace_optionsMenuEntry:hover {\n background-color: rgba(100, 100, 100, 0.1);\n transition: all 0.3s\n}\n\n.ace_closeButton {\n background: rgba(245, 146, 146, 0.5);\n border: 1px solid #F48A8A;\n border-radius: 50%;\n padding: 7px;\n position: absolute;\n right: -8px;\n top: -8px;\n z-index: 100000;\n}\n.ace_closeButton{\n background: rgba(245, 146, 146, 0.9);\n}\n.ace_optionsMenuKey {\n color: darkslateblue;\n font-weight: bold;\n}\n.ace_optionsMenuCommand {\n color: darkcyan;\n font-weight: normal;\n}\n.ace_optionsMenuEntry input, .ace_optionsMenuEntry button {\n vertical-align: middle;\n}\n\n.ace_optionsMenuEntry button[ace_selected_button=true] {\n background: #e7e7e7;\n box-shadow: 1px 0px 2px 0px #adadad inset;\n border-color: #adadad;\n}\n.ace_optionsMenuEntry button {\n background: white;\n border: 1px solid lightgray;\n margin: 0px;\n}\n.ace_optionsMenuEntry button:hover{\n background: #f0f0f0;\n}"}),define("ace/ext/menu_tools/overlay_page",["require","exports","module","ace/ext/menu_tools/overlay_page","ace/lib/dom","ace/ext/menu_tools/settings_menu.css"],function(e,t,n){"use strict";var r=e("../../lib/dom"),i=e("./settings_menu.css");r.importCssString(i,"settings_menu.css",!1),n.exports.overlayPage=function(t,n,r){function o(e){e.keyCode===27&&u()}function u(){if(!i)return;document.removeEventListener("keydown",o),i.parentNode.removeChild(i),t&&t.focus(),i=null,r&&r()}function a(e){s=e,e&&(i.style.pointerEvents="none",n.style.pointerEvents="auto")}var i=document.createElement("div"),s=!1;return i.style.cssText="margin: 0; padding: 0; position: fixed; top:0; bottom:0; left:0; right:0;z-index: 9990; "+(t?"background-color: rgba(0, 0, 0, 0.3);":""),i.addEventListener("click",function(e){s||u()}),document.addEventListener("keydown",o),n.addEventListener("click",function(e){e.stopPropagation()}),i.appendChild(n),document.body.appendChild(i),t&&t.blur(),{close:u,setIgnoreFocusOut:a}}}),define("ace/ext/menu_tools/get_editor_keyboard_shortcuts",["require","exports","module","ace/ext/menu_tools/get_editor_keyboard_shortcuts","ace/lib/keys"],function(e,t,n){"use strict";var r=e("../../lib/keys");n.exports.getEditorKeybordShortcuts=function(e){var t=r.KEY_MODS,n=[],i={};return e.keyBinding.$handlers.forEach(function(e){var t=e.commandKeyBinding;for(var r in t){var s=r.replace(/(^|-)\w/g,function(e){return e.toUpperCase()}),o=t[r];Array.isArray(o)||(o=[o]),o.forEach(function(e){typeof e!="string"&&(e=e.name),i[e]?i[e].key+="|"+s:(i[e]={key:s,command:e},n.push(i[e]))})}}),n}}),define("ace/ext/keybinding_menu",["require","exports","module","ace/editor","ace/ext/menu_tools/overlay_page","ace/ext/menu_tools/get_editor_keyboard_shortcuts"],function(e,t,n){"use strict";function i(t){if(!document.getElementById("kbshortcutmenu")){var n=e("./menu_tools/overlay_page").overlayPage,r=e("./menu_tools/get_editor_keyboard_shortcuts").getEditorKeybordShortcuts,i=r(t),s=document.createElement("div"),o=i.reduce(function(e,t){return e+'<div class="ace_optionsMenuEntry"><span class="ace_optionsMenuCommand">'+t.command+"</span> : "+'<span class="ace_optionsMenuKey">'+t.key+"</span></div>"},"");s.id="kbshortcutmenu",s.innerHTML="<h1>Keyboard Shortcuts</h1>"+o+"</div>",n(t,s)}}var r=e("../editor").Editor;n.exports.init=function(e){r.prototype.showKeyboardShortcuts=function(){i(this)},e.commands.addCommands([{name:"showKeyboardShortcuts",bindKey:{win:"Ctrl-Alt-h",mac:"Command-Alt-h"},exec:function(e,t){e.showKeyboardShortcuts()}}])}}); (function() {
|
||||
window.require(["ace/ext/keybinding_menu"], function(m) {
|
||||
if (typeof module == "object" && typeof exports == "object" && module) {
|
||||
module.exports = m;
|
||||
}
|
||||
});
|
||||
})();
|
||||
|
||||
File diff suppressed because one or more lines are too long
@@ -1,64 +1,7 @@
|
||||
define("ace/ext/linking",["require","exports","module","ace/editor","ace/config"], function(require, exports, module) {
|
||||
|
||||
var Editor = require("../editor").Editor;
|
||||
|
||||
require("../config").defineOptions(Editor.prototype, "editor", {
|
||||
enableLinking: {
|
||||
set: function(val) {
|
||||
if (val) {
|
||||
this.on("click", onClick);
|
||||
this.on("mousemove", onMouseMove);
|
||||
} else {
|
||||
this.off("click", onClick);
|
||||
this.off("mousemove", onMouseMove);
|
||||
}
|
||||
},
|
||||
value: false
|
||||
}
|
||||
});
|
||||
|
||||
exports.previousLinkingHover = false;
|
||||
|
||||
function onMouseMove(e) {
|
||||
var editor = e.editor;
|
||||
var ctrl = e.getAccelKey();
|
||||
|
||||
if (ctrl) {
|
||||
var editor = e.editor;
|
||||
var docPos = e.getDocumentPosition();
|
||||
var session = editor.session;
|
||||
var token = session.getTokenAt(docPos.row, docPos.column);
|
||||
|
||||
if (exports.previousLinkingHover && exports.previousLinkingHover != token) {
|
||||
editor._emit("linkHoverOut");
|
||||
}
|
||||
editor._emit("linkHover", {position: docPos, token: token});
|
||||
exports.previousLinkingHover = token;
|
||||
} else if (exports.previousLinkingHover) {
|
||||
editor._emit("linkHoverOut");
|
||||
exports.previousLinkingHover = false;
|
||||
}
|
||||
}
|
||||
|
||||
function onClick(e) {
|
||||
var ctrl = e.getAccelKey();
|
||||
var button = e.getButton();
|
||||
|
||||
if (button == 0 && ctrl) {
|
||||
var editor = e.editor;
|
||||
var docPos = e.getDocumentPosition();
|
||||
var session = editor.session;
|
||||
var token = session.getTokenAt(docPos.row, docPos.column);
|
||||
|
||||
editor._emit("linkClick", {position: docPos, token: token});
|
||||
}
|
||||
}
|
||||
|
||||
}); (function() {
|
||||
define("ace/ext/linking",["require","exports","module","ace/editor","ace/config"],function(e,t,n){function i(e){var n=e.editor,r=e.getAccelKey();if(r){var n=e.editor,i=e.getDocumentPosition(),s=n.session,o=s.getTokenAt(i.row,i.column);t.previousLinkingHover&&t.previousLinkingHover!=o&&n._emit("linkHoverOut"),n._emit("linkHover",{position:i,token:o}),t.previousLinkingHover=o}else t.previousLinkingHover&&(n._emit("linkHoverOut"),t.previousLinkingHover=!1)}function s(e){var t=e.getAccelKey(),n=e.getButton();if(n==0&&t){var r=e.editor,i=e.getDocumentPosition(),s=r.session,o=s.getTokenAt(i.row,i.column);r._emit("linkClick",{position:i,token:o})}}var r=e("../editor").Editor;e("../config").defineOptions(r.prototype,"editor",{enableLinking:{set:function(e){e?(this.on("click",s),this.on("mousemove",i)):(this.off("click",s),this.off("mousemove",i))},value:!1}}),t.previousLinkingHover=!1}); (function() {
|
||||
window.require(["ace/ext/linking"], function(m) {
|
||||
if (typeof module == "object" && typeof exports == "object" && module) {
|
||||
module.exports = m;
|
||||
}
|
||||
});
|
||||
})();
|
||||
|
||||
@@ -1,248 +1,7 @@
|
||||
define("ace/ext/modelist",["require","exports","module"], function(require, exports, module) {
|
||||
"use strict";
|
||||
|
||||
var modes = [];
|
||||
function getModeForPath(path) {
|
||||
var mode = modesByName.text;
|
||||
var fileName = path.split(/[\/\\]/).pop();
|
||||
for (var i = 0; i < modes.length; i++) {
|
||||
if (modes[i].supportsFile(fileName)) {
|
||||
mode = modes[i];
|
||||
break;
|
||||
}
|
||||
}
|
||||
return mode;
|
||||
}
|
||||
|
||||
var Mode = function(name, caption, extensions) {
|
||||
this.name = name;
|
||||
this.caption = caption;
|
||||
this.mode = "ace/mode/" + name;
|
||||
this.extensions = extensions;
|
||||
var re;
|
||||
if (/\^/.test(extensions)) {
|
||||
re = extensions.replace(/\|(\^)?/g, function(a, b){
|
||||
return "$|" + (b ? "^" : "^.*\\.");
|
||||
}) + "$";
|
||||
} else {
|
||||
re = "^.*\\.(" + extensions + ")$";
|
||||
}
|
||||
|
||||
this.extRe = new RegExp(re, "gi");
|
||||
};
|
||||
|
||||
Mode.prototype.supportsFile = function(filename) {
|
||||
return filename.match(this.extRe);
|
||||
};
|
||||
var supportedModes = {
|
||||
ABAP: ["abap"],
|
||||
ABC: ["abc"],
|
||||
ActionScript:["as"],
|
||||
ADA: ["ada|adb"],
|
||||
Alda: ["alda"],
|
||||
Apache_Conf: ["^htaccess|^htgroups|^htpasswd|^conf|htaccess|htgroups|htpasswd"],
|
||||
Apex: ["apex|cls|trigger|tgr"],
|
||||
AQL: ["aql"],
|
||||
AsciiDoc: ["asciidoc|adoc"],
|
||||
ASL: ["dsl|asl|asl.json"],
|
||||
Assembly_x86:["asm|a"],
|
||||
AutoHotKey: ["ahk"],
|
||||
BatchFile: ["bat|cmd"],
|
||||
C_Cpp: ["cpp|c|cc|cxx|h|hh|hpp|ino"],
|
||||
C9Search: ["c9search_results"],
|
||||
Cirru: ["cirru|cr"],
|
||||
Clojure: ["clj|cljs"],
|
||||
Cobol: ["CBL|COB"],
|
||||
coffee: ["coffee|cf|cson|^Cakefile"],
|
||||
ColdFusion: ["cfm"],
|
||||
Crystal: ["cr"],
|
||||
CSharp: ["cs"],
|
||||
Csound_Document: ["csd"],
|
||||
Csound_Orchestra: ["orc"],
|
||||
Csound_Score: ["sco"],
|
||||
CSS: ["css"],
|
||||
Curly: ["curly"],
|
||||
D: ["d|di"],
|
||||
Dart: ["dart"],
|
||||
Diff: ["diff|patch"],
|
||||
Dockerfile: ["^Dockerfile"],
|
||||
Dot: ["dot"],
|
||||
Drools: ["drl"],
|
||||
Edifact: ["edi"],
|
||||
Eiffel: ["e|ge"],
|
||||
EJS: ["ejs"],
|
||||
Elixir: ["ex|exs"],
|
||||
Elm: ["elm"],
|
||||
Erlang: ["erl|hrl"],
|
||||
Forth: ["frt|fs|ldr|fth|4th"],
|
||||
Fortran: ["f|f90"],
|
||||
FSharp: ["fsi|fs|ml|mli|fsx|fsscript"],
|
||||
FSL: ["fsl"],
|
||||
FTL: ["ftl"],
|
||||
Gcode: ["gcode"],
|
||||
Gherkin: ["feature"],
|
||||
Gitignore: ["^.gitignore"],
|
||||
Glsl: ["glsl|frag|vert"],
|
||||
Gobstones: ["gbs"],
|
||||
golang: ["go"],
|
||||
GraphQLSchema: ["gql"],
|
||||
Groovy: ["groovy"],
|
||||
HAML: ["haml"],
|
||||
Handlebars: ["hbs|handlebars|tpl|mustache"],
|
||||
Haskell: ["hs"],
|
||||
Haskell_Cabal: ["cabal"],
|
||||
haXe: ["hx"],
|
||||
Hjson: ["hjson"],
|
||||
HTML: ["html|htm|xhtml|vue|we|wpy"],
|
||||
HTML_Elixir: ["eex|html.eex"],
|
||||
HTML_Ruby: ["erb|rhtml|html.erb"],
|
||||
INI: ["ini|conf|cfg|prefs"],
|
||||
Io: ["io"],
|
||||
Jack: ["jack"],
|
||||
Jade: ["jade|pug"],
|
||||
Java: ["java"],
|
||||
JavaScript: ["js|jsm|jsx"],
|
||||
JSON: ["json"],
|
||||
JSON5: ["json5"],
|
||||
JSONiq: ["jq"],
|
||||
JSP: ["jsp"],
|
||||
JSSM: ["jssm|jssm_state"],
|
||||
JSX: ["jsx"],
|
||||
Julia: ["jl"],
|
||||
Kotlin: ["kt|kts"],
|
||||
LaTeX: ["tex|latex|ltx|bib"],
|
||||
Latte: ["latte"],
|
||||
LESS: ["less"],
|
||||
Liquid: ["liquid"],
|
||||
Lisp: ["lisp"],
|
||||
LiveScript: ["ls"],
|
||||
LogiQL: ["logic|lql"],
|
||||
LSL: ["lsl"],
|
||||
Lua: ["lua"],
|
||||
LuaPage: ["lp"],
|
||||
Lucene: ["lucene"],
|
||||
Makefile: ["^Makefile|^GNUmakefile|^makefile|^OCamlMakefile|make"],
|
||||
Markdown: ["md|markdown"],
|
||||
Mask: ["mask"],
|
||||
MATLAB: ["matlab"],
|
||||
Maze: ["mz"],
|
||||
MediaWiki: ["wiki|mediawiki"],
|
||||
MEL: ["mel"],
|
||||
MIPS: ["s|asm"],
|
||||
MIXAL: ["mixal"],
|
||||
MUSHCode: ["mc|mush"],
|
||||
MySQL: ["mysql"],
|
||||
Nginx: ["nginx|conf"],
|
||||
Nim: ["nim"],
|
||||
Nix: ["nix"],
|
||||
NSIS: ["nsi|nsh"],
|
||||
Nunjucks: ["nunjucks|nunjs|nj|njk"],
|
||||
ObjectiveC: ["m|mm"],
|
||||
OCaml: ["ml|mli"],
|
||||
Pascal: ["pas|p"],
|
||||
Perl: ["pl|pm"],
|
||||
pgSQL: ["pgsql"],
|
||||
PHP: ["php|inc|phtml|shtml|php3|php4|php5|phps|phpt|aw|ctp|module"],
|
||||
PHP_Laravel_blade: ["blade.php"],
|
||||
Pig: ["pig"],
|
||||
Powershell: ["ps1"],
|
||||
Praat: ["praat|praatscript|psc|proc"],
|
||||
Prisma: ["prisma"],
|
||||
Prolog: ["plg|prolog"],
|
||||
Properties: ["properties"],
|
||||
Protobuf: ["proto"],
|
||||
Puppet: ["epp|pp"],
|
||||
Python: ["py"],
|
||||
QML: ["qml"],
|
||||
R: ["r"],
|
||||
Raku: ["raku|rakumod|rakutest|p6|pl6|pm6"],
|
||||
Razor: ["cshtml|asp"],
|
||||
RDoc: ["Rd"],
|
||||
Red: ["red|reds"],
|
||||
RHTML: ["Rhtml"],
|
||||
RST: ["rst"],
|
||||
Ruby: ["rb|ru|gemspec|rake|^Guardfile|^Rakefile|^Gemfile"],
|
||||
Rust: ["rs"],
|
||||
SASS: ["sass"],
|
||||
SCAD: ["scad"],
|
||||
Scala: ["scala|sbt"],
|
||||
Scheme: ["scm|sm|rkt|oak|scheme"],
|
||||
Scrypt: ["scrypt"],
|
||||
SCSS: ["scss"],
|
||||
SH: ["sh|bash|^.bashrc"],
|
||||
SJS: ["sjs"],
|
||||
Slim: ["slim|skim"],
|
||||
Smarty: ["smarty|tpl"],
|
||||
Smithy: ["smithy"],
|
||||
snippets: ["snippets"],
|
||||
Soy_Template:["soy"],
|
||||
Space: ["space"],
|
||||
SQL: ["sql"],
|
||||
SQLServer: ["sqlserver"],
|
||||
Stylus: ["styl|stylus"],
|
||||
SVG: ["svg"],
|
||||
Swift: ["swift"],
|
||||
Tcl: ["tcl"],
|
||||
Terraform: ["tf", "tfvars", "terragrunt"],
|
||||
Tex: ["tex"],
|
||||
Text: ["txt"],
|
||||
Textile: ["textile"],
|
||||
Toml: ["toml"],
|
||||
TSX: ["tsx"],
|
||||
Twig: ["twig|swig"],
|
||||
Typescript: ["ts|typescript|str"],
|
||||
Vala: ["vala"],
|
||||
VBScript: ["vbs|vb"],
|
||||
Velocity: ["vm"],
|
||||
Verilog: ["v|vh|sv|svh"],
|
||||
VHDL: ["vhd|vhdl"],
|
||||
Visualforce: ["vfp|component|page"],
|
||||
Wollok: ["wlk|wpgm|wtest"],
|
||||
XML: ["xml|rdf|rss|wsdl|xslt|atom|mathml|mml|xul|xbl|xaml"],
|
||||
XQuery: ["xq"],
|
||||
YAML: ["yaml|yml"],
|
||||
Zeek: ["zeek|bro"],
|
||||
Django: ["html"]
|
||||
};
|
||||
|
||||
var nameOverrides = {
|
||||
ObjectiveC: "Objective-C",
|
||||
CSharp: "C#",
|
||||
golang: "Go",
|
||||
C_Cpp: "C and C++",
|
||||
Csound_Document: "Csound Document",
|
||||
Csound_Orchestra: "Csound",
|
||||
Csound_Score: "Csound Score",
|
||||
coffee: "CoffeeScript",
|
||||
HTML_Ruby: "HTML (Ruby)",
|
||||
HTML_Elixir: "HTML (Elixir)",
|
||||
FTL: "FreeMarker",
|
||||
PHP_Laravel_blade: "PHP (Blade Template)",
|
||||
Perl6: "Perl 6",
|
||||
AutoHotKey: "AutoHotkey / AutoIt"
|
||||
};
|
||||
|
||||
var modesByName = {};
|
||||
for (var name in supportedModes) {
|
||||
var data = supportedModes[name];
|
||||
var displayName = (nameOverrides[name] || name).replace(/_/g, " ");
|
||||
var filename = name.toLowerCase();
|
||||
var mode = new Mode(filename, displayName, data[0]);
|
||||
modesByName[filename] = mode;
|
||||
modes.push(mode);
|
||||
}
|
||||
|
||||
module.exports = {
|
||||
getModeForPath: getModeForPath,
|
||||
modes: modes,
|
||||
modesByName: modesByName
|
||||
};
|
||||
|
||||
}); (function() {
|
||||
define("ace/ext/modelist",["require","exports","module"],function(e,t,n){"use strict";function i(e){var t=a.text,n=e.split(/[\/\\]/).pop();for(var i=0;i<r.length;i++)if(r[i].supportsFile(n)){t=r[i];break}return t}var r=[],s=function(){function e(e,t,n){this.name=e,this.caption=t,this.mode="ace/mode/"+e,this.extensions=n;var r;/\^/.test(n)?r=n.replace(/\|(\^)?/g,function(e,t){return"$|"+(t?"^":"^.*\\.")})+"$":r="\\.("+n+")$",this.extRe=new RegExp(r,"gi")}return e.prototype.supportsFile=function(e){return e.match(this.extRe)},e}(),o={ABAP:["abap"],ABC:["abc"],ActionScript:["as"],ADA:["ada|adb"],Alda:["alda"],Apache_Conf:["^htaccess|^htgroups|^htpasswd|^conf|htaccess|htgroups|htpasswd"],Apex:["apex|cls|trigger|tgr"],AQL:["aql"],AsciiDoc:["asciidoc|adoc"],ASL:["dsl|asl|asl.json"],Assembly_ARM32:["s"],Assembly_x86:["asm|a"],Astro:["astro"],AutoHotKey:["ahk"],Basic:["bas|bak"],BatchFile:["bat|cmd"],BibTeX:["bib"],C_Cpp:["cpp|c|cc|cxx|h|hh|hpp|ino"],C9Search:["c9search_results"],Cirru:["cirru|cr"],Clojure:["clj|cljs"],Clue:["clue"],Cobol:["CBL|COB"],coffee:["coffee|cf|cson|^Cakefile"],ColdFusion:["cfm|cfc"],Crystal:["cr"],CSharp:["cs"],Csound_Document:["csd"],Csound_Orchestra:["orc"],Csound_Score:["sco"],CSS:["css"],CSV:["csv"],Curly:["curly"],Cuttlefish:["conf"],D:["d|di"],Dart:["dart"],Diff:["diff|patch"],Django:["djt|html.djt|dj.html|djhtml"],Dockerfile:["^Dockerfile"],Dot:["dot"],Drools:["drl"],Edifact:["edi"],Eiffel:["e|ge"],EJS:["ejs"],Elixir:["ex|exs"],Elm:["elm"],Erlang:["erl|hrl"],Flix:["flix"],Forth:["frt|fs|ldr|fth|4th"],Fortran:["f|f90"],FSharp:["fsi|fs|ml|mli|fsx|fsscript"],FSL:["fsl"],FTL:["ftl"],Gcode:["gcode"],Gherkin:["feature"],Gitignore:["^.gitignore"],Glsl:["glsl|frag|vert"],Gobstones:["gbs"],golang:["go"],GraphQLSchema:["gql"],Groovy:["groovy"],HAML:["haml"],Handlebars:["hbs|handlebars|tpl|mustache"],Haskell:["hs"],Haskell_Cabal:["cabal"],haXe:["hx"],Hjson:["hjson"],HTML:["html|htm|xhtml|we|wpy"],HTML_Elixir:["eex|html.eex"],HTML_Ruby:["erb|rhtml|html.erb"],INI:["ini|conf|cfg|prefs"],Io:["io"],Ion:["ion"],Jack:["jack"],Jade:["jade|pug"],Java:["java"],JavaScript:["js|jsm|cjs|mjs"],JEXL:["jexl"],JSON:["json"],JSON5:["json5"],JSONiq:["jq"],JSP:["jsp"],JSSM:["jssm|jssm_state"],JSX:["jsx"],Julia:["jl"],Kotlin:["kt|kts"],LaTeX:["tex|latex|ltx|bib"],Latte:["latte"],LESS:["less"],Liquid:["liquid"],Lisp:["lisp"],LiveScript:["ls"],Log:["log"],LogiQL:["logic|lql"],Logtalk:["lgt"],LSL:["lsl"],Lua:["lua"],LuaPage:["lp"],Lucene:["lucene"],Makefile:["^Makefile|^GNUmakefile|^makefile|^OCamlMakefile|make"],Markdown:["md|markdown"],Mask:["mask"],MATLAB:["matlab"],Maze:["mz"],MediaWiki:["wiki|mediawiki"],MEL:["mel"],MIPS:["s|asm"],MIXAL:["mixal"],MUSHCode:["mc|mush"],MySQL:["mysql"],Nasal:["nas"],Nginx:["nginx|conf"],Nim:["nim"],Nix:["nix"],NSIS:["nsi|nsh"],Nunjucks:["nunjucks|nunjs|nj|njk"],ObjectiveC:["m|mm"],OCaml:["ml|mli"],Odin:["odin"],PartiQL:["partiql|pql"],Pascal:["pas|p"],Perl:["pl|pm"],pgSQL:["pgsql"],PHP:["php|inc|phtml|shtml|php3|php4|php5|phps|phpt|aw|ctp|module"],PHP_Laravel_blade:["blade.php"],Pig:["pig"],PLSQL:["plsql"],Powershell:["ps1"],Praat:["praat|praatscript|psc|proc"],Prisma:["prisma"],Prolog:["plg|prolog"],Properties:["properties"],Protobuf:["proto"],PRQL:["prql"],Puppet:["epp|pp"],Python:["py"],QML:["qml"],R:["r"],Raku:["raku|rakumod|rakutest|p6|pl6|pm6"],Razor:["cshtml|asp"],RDoc:["Rd"],Red:["red|reds"],RHTML:["Rhtml"],Robot:["robot|resource"],RST:["rst"],Ruby:["rb|ru|gemspec|rake|^Guardfile|^Rakefile|^Gemfile"],Rust:["rs"],SaC:["sac"],SASS:["sass"],SCAD:["scad"],Scala:["scala|sbt"],Scheme:["scm|sm|rkt|oak|scheme"],Scrypt:["scrypt"],SCSS:["scss"],SH:["sh|bash|^.bashrc"],SJS:["sjs"],Slim:["slim|skim"],Smarty:["smarty|tpl"],Smithy:["smithy"],snippets:["snippets"],Soy_Template:["soy"],Space:["space"],SPARQL:["rq"],SQL:["sql"],SQLServer:["sqlserver"],Stylus:["styl|stylus"],SVG:["svg"],Swift:["swift"],Tcl:["tcl"],Terraform:["tf","tfvars","terragrunt"],Tex:["tex"],Text:["txt"],Textile:["textile"],Toml:["toml"],TSV:["tsv"],TSX:["tsx"],Turtle:["ttl"],Twig:["twig|swig"],Typescript:["ts|mts|cts|typescript|str"],Vala:["vala"],VBScript:["vbs|vb"],Velocity:["vm"],Verilog:["v|vh|sv|svh"],VHDL:["vhd|vhdl"],Visualforce:["vfp|component|page"],Vue:["vue"],Wollok:["wlk|wpgm|wtest"],XML:["xml|rdf|rss|wsdl|xslt|atom|mathml|mml|xul|xbl|xaml"],XQuery:["xq"],YAML:["yaml|yml"],Zeek:["zeek|bro"],Zig:["zig"]},u={ObjectiveC:"Objective-C",CSharp:"C#",golang:"Go",C_Cpp:"C and C++",Csound_Document:"Csound Document",Csound_Orchestra:"Csound",Csound_Score:"Csound Score",coffee:"CoffeeScript",HTML_Ruby:"HTML (Ruby)",HTML_Elixir:"HTML (Elixir)",FTL:"FreeMarker",PHP_Laravel_blade:"PHP (Blade Template)",Perl6:"Perl 6",AutoHotKey:"AutoHotkey / AutoIt"},a={};for(var f in o){var l=o[f],c=(u[f]||f).replace(/_/g," "),h=f.toLowerCase(),p=new s(h,c,l[0]);a[h]=p,r.push(p)}t.getModeForPath=i,t.modes=r,t.modesByName=a}); (function() {
|
||||
window.require(["ace/ext/modelist"], function(m) {
|
||||
if (typeof module == "object" && typeof exports == "object" && module) {
|
||||
module.exports = m;
|
||||
}
|
||||
});
|
||||
})();
|
||||
|
||||
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
@@ -1,122 +1,7 @@
|
||||
define("ace/ext/rtl",["require","exports","module","ace/editor","ace/config"], function(require, exports, module) {
|
||||
"use strict";
|
||||
|
||||
var commands = [{
|
||||
name: "leftToRight",
|
||||
bindKey: { win: "Ctrl-Alt-Shift-L", mac: "Command-Alt-Shift-L" },
|
||||
exec: function(editor) {
|
||||
editor.session.$bidiHandler.setRtlDirection(editor, false);
|
||||
},
|
||||
readOnly: true
|
||||
}, {
|
||||
name: "rightToLeft",
|
||||
bindKey: { win: "Ctrl-Alt-Shift-R", mac: "Command-Alt-Shift-R" },
|
||||
exec: function(editor) {
|
||||
editor.session.$bidiHandler.setRtlDirection(editor, true);
|
||||
},
|
||||
readOnly: true
|
||||
}];
|
||||
|
||||
var Editor = require("../editor").Editor;
|
||||
require("../config").defineOptions(Editor.prototype, "editor", {
|
||||
rtlText: {
|
||||
set: function(val) {
|
||||
if (val) {
|
||||
this.on("change", onChange);
|
||||
this.on("changeSelection", onChangeSelection);
|
||||
this.renderer.on("afterRender", updateLineDirection);
|
||||
this.commands.on("exec", onCommandEmitted);
|
||||
this.commands.addCommands(commands);
|
||||
} else {
|
||||
this.off("change", onChange);
|
||||
this.off("changeSelection", onChangeSelection);
|
||||
this.renderer.off("afterRender", updateLineDirection);
|
||||
this.commands.off("exec", onCommandEmitted);
|
||||
this.commands.removeCommands(commands);
|
||||
clearTextLayer(this.renderer);
|
||||
}
|
||||
this.renderer.updateFull();
|
||||
}
|
||||
},
|
||||
rtl: {
|
||||
set: function(val) {
|
||||
this.session.$bidiHandler.$isRtl = val;
|
||||
if (val) {
|
||||
this.setOption("rtlText", false);
|
||||
this.renderer.on("afterRender", updateLineDirection);
|
||||
this.session.$bidiHandler.seenBidi = true;
|
||||
} else {
|
||||
this.renderer.off("afterRender", updateLineDirection);
|
||||
clearTextLayer(this.renderer);
|
||||
}
|
||||
this.renderer.updateFull();
|
||||
}
|
||||
}
|
||||
});
|
||||
function onChangeSelection(e, editor) {
|
||||
var lead = editor.getSelection().lead;
|
||||
if (editor.session.$bidiHandler.isRtlLine(lead.row)) {
|
||||
if (lead.column === 0) {
|
||||
if (editor.session.$bidiHandler.isMoveLeftOperation && lead.row > 0) {
|
||||
editor.getSelection().moveCursorTo(lead.row - 1, editor.session.getLine(lead.row - 1).length);
|
||||
} else {
|
||||
if (editor.getSelection().isEmpty())
|
||||
lead.column += 1;
|
||||
else
|
||||
lead.setPosition(lead.row, lead.column + 1);
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
function onCommandEmitted(commadEvent) {
|
||||
commadEvent.editor.session.$bidiHandler.isMoveLeftOperation = /gotoleft|selectleft|backspace|removewordleft/.test(commadEvent.command.name);
|
||||
}
|
||||
function onChange(delta, editor) {
|
||||
var session = editor.session;
|
||||
session.$bidiHandler.currentRow = null;
|
||||
if (session.$bidiHandler.isRtlLine(delta.start.row) && delta.action === 'insert' && delta.lines.length > 1) {
|
||||
for (var row = delta.start.row; row < delta.end.row; row++) {
|
||||
if (session.getLine(row + 1).charAt(0) !== session.$bidiHandler.RLE)
|
||||
session.doc.$lines[row + 1] = session.$bidiHandler.RLE + session.getLine(row + 1);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
function updateLineDirection(e, renderer) {
|
||||
var session = renderer.session;
|
||||
var $bidiHandler = session.$bidiHandler;
|
||||
var cells = renderer.$textLayer.$lines.cells;
|
||||
var width = renderer.layerConfig.width - renderer.layerConfig.padding + "px";
|
||||
cells.forEach(function(cell) {
|
||||
var style = cell.element.style;
|
||||
if ($bidiHandler && $bidiHandler.isRtlLine(cell.row)) {
|
||||
style.direction = "rtl";
|
||||
style.textAlign = "right";
|
||||
style.width = width;
|
||||
} else {
|
||||
style.direction = "";
|
||||
style.textAlign = "";
|
||||
style.width = "";
|
||||
}
|
||||
});
|
||||
}
|
||||
|
||||
function clearTextLayer(renderer) {
|
||||
var lines = renderer.$textLayer.$lines;
|
||||
lines.cells.forEach(clear);
|
||||
lines.cellCache.forEach(clear);
|
||||
function clear(cell) {
|
||||
var style = cell.element.style;
|
||||
style.direction = style.textAlign = style.width = "";
|
||||
}
|
||||
}
|
||||
|
||||
}); (function() {
|
||||
define("ace/ext/rtl",["require","exports","module","ace/editor","ace/config"],function(e,t,n){"use strict";function s(e,t){var n=t.getSelection().lead;t.session.$bidiHandler.isRtlLine(n.row)&&n.column===0&&(t.session.$bidiHandler.isMoveLeftOperation&&n.row>0?t.getSelection().moveCursorTo(n.row-1,t.session.getLine(n.row-1).length):t.getSelection().isEmpty()?n.column+=1:n.setPosition(n.row,n.column+1))}function o(e){e.editor.session.$bidiHandler.isMoveLeftOperation=/gotoleft|selectleft|backspace|removewordleft/.test(e.command.name)}function u(e,t){var n=t.session;n.$bidiHandler.currentRow=null;if(n.$bidiHandler.isRtlLine(e.start.row)&&e.action==="insert"&&e.lines.length>1)for(var r=e.start.row;r<e.end.row;r++)n.getLine(r+1).charAt(0)!==n.$bidiHandler.RLE&&(n.doc.$lines[r+1]=n.$bidiHandler.RLE+n.getLine(r+1))}function a(e,t){var n=t.session,r=n.$bidiHandler,i=t.$textLayer.$lines.cells,s=t.layerConfig.width-t.layerConfig.padding+"px";i.forEach(function(e){var t=e.element.style;r&&r.isRtlLine(e.row)?(t.direction="rtl",t.textAlign="right",t.width=s):(t.direction="",t.textAlign="",t.width="")})}function f(e){function n(e){var t=e.element.style;t.direction=t.textAlign=t.width=""}var t=e.$textLayer.$lines;t.cells.forEach(n),t.cellCache.forEach(n)}var r=[{name:"leftToRight",bindKey:{win:"Ctrl-Alt-Shift-L",mac:"Command-Alt-Shift-L"},exec:function(e){e.session.$bidiHandler.setRtlDirection(e,!1)},readOnly:!0},{name:"rightToLeft",bindKey:{win:"Ctrl-Alt-Shift-R",mac:"Command-Alt-Shift-R"},exec:function(e){e.session.$bidiHandler.setRtlDirection(e,!0)},readOnly:!0}],i=e("../editor").Editor;e("../config").defineOptions(i.prototype,"editor",{rtlText:{set:function(e){e?(this.on("change",u),this.on("changeSelection",s),this.renderer.on("afterRender",a),this.commands.on("exec",o),this.commands.addCommands(r)):(this.off("change",u),this.off("changeSelection",s),this.renderer.off("afterRender",a),this.commands.off("exec",o),this.commands.removeCommands(r),f(this.renderer)),this.renderer.updateFull()}},rtl:{set:function(e){this.session.$bidiHandler.$isRtl=e,e?(this.setOption("rtlText",!1),this.renderer.on("afterRender",a),this.session.$bidiHandler.seenBidi=!0):(this.renderer.off("afterRender",a),f(this.renderer)),this.renderer.updateFull()}}})}); (function() {
|
||||
window.require(["ace/ext/rtl"], function(m) {
|
||||
if (typeof module == "object" && typeof exports == "object" && module) {
|
||||
module.exports = m;
|
||||
}
|
||||
});
|
||||
})();
|
||||
|
||||
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
7
htdocs/includes/ace/src/ext-simple_tokenizer.js
Normal file
7
htdocs/includes/ace/src/ext-simple_tokenizer.js
Normal file
@@ -0,0 +1,7 @@
|
||||
define("ace/mode/json_highlight_rules",["require","exports","module","ace/lib/oop","ace/mode/text_highlight_rules"],function(e,t,n){"use strict";var r=e("../lib/oop"),i=e("./text_highlight_rules").TextHighlightRules,s=function(){this.$rules={start:[{token:"variable",regex:'["](?:(?:\\\\.)|(?:[^"\\\\]))*?["]\\s*(?=:)'},{token:"string",regex:'"',next:"string"},{token:"constant.numeric",regex:"0[xX][0-9a-fA-F]+\\b"},{token:"constant.numeric",regex:"[+-]?\\d+(?:(?:\\.\\d*)?(?:[eE][+-]?\\d+)?)?\\b"},{token:"constant.language.boolean",regex:"(?:true|false)\\b"},{token:"text",regex:"['](?:(?:\\\\.)|(?:[^'\\\\]))*?[']"},{token:"comment",regex:"\\/\\/.*$"},{token:"comment.start",regex:"\\/\\*",next:"comment"},{token:"paren.lparen",regex:"[[({]"},{token:"paren.rparen",regex:"[\\])}]"},{token:"punctuation.operator",regex:/[,]/},{token:"text",regex:"\\s+"}],string:[{token:"constant.language.escape",regex:/\\(?:x[0-9a-fA-F]{2}|u[0-9a-fA-F]{4}|["\\\/bfnrt])/},{token:"string",regex:'"|$',next:"start"},{defaultToken:"string"}],comment:[{token:"comment.end",regex:"\\*\\/",next:"start"},{defaultToken:"comment"}]}};r.inherits(s,i),t.JsonHighlightRules=s}),define("ace/ext/simple_tokenizer",["require","exports","module","ace/ext/simple_tokenizer","ace/mode/json_highlight_rules","ace/tokenizer","ace/layer/text_util"],function(e,t,n){"use strict";function o(e,t){var n=new s(e,new r(t.getRules())),o=[];for(var u=0;u<n.getLength();u++){var a=n.getTokens(u);o.push(a.map(function(e){return{className:i(e.type)?undefined:"ace_"+e.type.replace(/\./g," ace_"),value:e.value}}))}return o}var r=e("../tokenizer").Tokenizer,i=e("../layer/text_util").isTextToken,s=function(){function e(e,t){this._lines=e.split(/\r\n|\r|\n/),this._states=[],this._tokenizer=t}return e.prototype.getTokens=function(e){var t=this._lines[e],n=this._states[e-1],r=this._tokenizer.getLineTokens(t,n);return this._states[e]=r.state,r.tokens},e.prototype.getLength=function(){return this._lines.length},e}();t.tokenize=o}); (function() {
|
||||
window.require(["ace/ext/simple_tokenizer"], function(m) {
|
||||
if (typeof module == "object" && typeof exports == "object" && module) {
|
||||
module.exports = m;
|
||||
}
|
||||
});
|
||||
})();
|
||||
@@ -1,73 +1,7 @@
|
||||
define("ace/ext/spellcheck",["require","exports","module","ace/lib/event","ace/editor","ace/config"], function(require, exports, module) {
|
||||
"use strict";
|
||||
var event = require("../lib/event");
|
||||
|
||||
exports.contextMenuHandler = function(e){
|
||||
var host = e.target;
|
||||
var text = host.textInput.getElement();
|
||||
if (!host.selection.isEmpty())
|
||||
return;
|
||||
var c = host.getCursorPosition();
|
||||
var r = host.session.getWordRange(c.row, c.column);
|
||||
var w = host.session.getTextRange(r);
|
||||
|
||||
host.session.tokenRe.lastIndex = 0;
|
||||
if (!host.session.tokenRe.test(w))
|
||||
return;
|
||||
var PLACEHOLDER = "\x01\x01";
|
||||
var value = w + " " + PLACEHOLDER;
|
||||
text.value = value;
|
||||
text.setSelectionRange(w.length, w.length + 1);
|
||||
text.setSelectionRange(0, 0);
|
||||
text.setSelectionRange(0, w.length);
|
||||
|
||||
var afterKeydown = false;
|
||||
event.addListener(text, "keydown", function onKeydown() {
|
||||
event.removeListener(text, "keydown", onKeydown);
|
||||
afterKeydown = true;
|
||||
});
|
||||
|
||||
host.textInput.setInputHandler(function(newVal) {
|
||||
if (newVal == value)
|
||||
return '';
|
||||
if (newVal.lastIndexOf(value, 0) === 0)
|
||||
return newVal.slice(value.length);
|
||||
if (newVal.substr(text.selectionEnd) == value)
|
||||
return newVal.slice(0, -value.length);
|
||||
if (newVal.slice(-2) == PLACEHOLDER) {
|
||||
var val = newVal.slice(0, -2);
|
||||
if (val.slice(-1) == " ") {
|
||||
if (afterKeydown)
|
||||
return val.substring(0, text.selectionEnd);
|
||||
val = val.slice(0, -1);
|
||||
host.session.replace(r, val);
|
||||
return "";
|
||||
}
|
||||
}
|
||||
|
||||
return newVal;
|
||||
});
|
||||
};
|
||||
var Editor = require("../editor").Editor;
|
||||
require("../config").defineOptions(Editor.prototype, "editor", {
|
||||
spellcheck: {
|
||||
set: function(val) {
|
||||
var text = this.textInput.getElement();
|
||||
text.spellcheck = !!val;
|
||||
if (!val)
|
||||
this.removeListener("nativecontextmenu", exports.contextMenuHandler);
|
||||
else
|
||||
this.on("nativecontextmenu", exports.contextMenuHandler);
|
||||
},
|
||||
value: true
|
||||
}
|
||||
});
|
||||
|
||||
}); (function() {
|
||||
define("ace/ext/spellcheck",["require","exports","module","ace/lib/event","ace/editor","ace/config"],function(e,t,n){"use strict";var r=e("../lib/event");t.contextMenuHandler=function(e){var t=e.target,n=t.textInput.getElement();if(!t.selection.isEmpty())return;var i=t.getCursorPosition(),s=t.session.getWordRange(i.row,i.column),o=t.session.getTextRange(s);t.session.tokenRe.lastIndex=0;if(!t.session.tokenRe.test(o))return;var u="\x01\x01",a=o+" "+u;n.value=a,n.setSelectionRange(o.length,o.length+1),n.setSelectionRange(0,0),n.setSelectionRange(0,o.length);var f=!1;r.addListener(n,"keydown",function l(){r.removeListener(n,"keydown",l),f=!0}),t.textInput.setInputHandler(function(e){if(e==a)return"";if(e.lastIndexOf(a,0)===0)return e.slice(a.length);if(e.substr(n.selectionEnd)==a)return e.slice(0,-a.length);if(e.slice(-2)==u){var r=e.slice(0,-2);if(r.slice(-1)==" ")return f?r.substring(0,n.selectionEnd):(r=r.slice(0,-1),t.session.replace(s,r),"")}return e})};var i=e("../editor").Editor;e("../config").defineOptions(i.prototype,"editor",{spellcheck:{set:function(e){var n=this.textInput.getElement();n.spellcheck=!!e,e?this.on("nativecontextmenu",t.contextMenuHandler):this.removeListener("nativecontextmenu",t.contextMenuHandler)},value:!0}})}); (function() {
|
||||
window.require(["ace/ext/spellcheck"], function(m) {
|
||||
if (typeof module == "object" && typeof exports == "object" && module) {
|
||||
module.exports = m;
|
||||
}
|
||||
});
|
||||
})();
|
||||
|
||||
@@ -1,207 +1,7 @@
|
||||
define("ace/split",["require","exports","module","ace/lib/oop","ace/lib/lang","ace/lib/event_emitter","ace/editor","ace/virtual_renderer","ace/edit_session"], function(require, exports, module) {
|
||||
"use strict";
|
||||
|
||||
var oop = require("./lib/oop");
|
||||
var lang = require("./lib/lang");
|
||||
var EventEmitter = require("./lib/event_emitter").EventEmitter;
|
||||
|
||||
var Editor = require("./editor").Editor;
|
||||
var Renderer = require("./virtual_renderer").VirtualRenderer;
|
||||
var EditSession = require("./edit_session").EditSession;
|
||||
|
||||
|
||||
var Split = function(container, theme, splits) {
|
||||
this.BELOW = 1;
|
||||
this.BESIDE = 0;
|
||||
|
||||
this.$container = container;
|
||||
this.$theme = theme;
|
||||
this.$splits = 0;
|
||||
this.$editorCSS = "";
|
||||
this.$editors = [];
|
||||
this.$orientation = this.BESIDE;
|
||||
|
||||
this.setSplits(splits || 1);
|
||||
this.$cEditor = this.$editors[0];
|
||||
|
||||
|
||||
this.on("focus", function(editor) {
|
||||
this.$cEditor = editor;
|
||||
}.bind(this));
|
||||
};
|
||||
|
||||
(function(){
|
||||
|
||||
oop.implement(this, EventEmitter);
|
||||
|
||||
this.$createEditor = function() {
|
||||
var el = document.createElement("div");
|
||||
el.className = this.$editorCSS;
|
||||
el.style.cssText = "position: absolute; top:0px; bottom:0px";
|
||||
this.$container.appendChild(el);
|
||||
var editor = new Editor(new Renderer(el, this.$theme));
|
||||
|
||||
editor.on("focus", function() {
|
||||
this._emit("focus", editor);
|
||||
}.bind(this));
|
||||
|
||||
this.$editors.push(editor);
|
||||
editor.setFontSize(this.$fontSize);
|
||||
return editor;
|
||||
};
|
||||
|
||||
this.setSplits = function(splits) {
|
||||
var editor;
|
||||
if (splits < 1) {
|
||||
throw "The number of splits have to be > 0!";
|
||||
}
|
||||
|
||||
if (splits == this.$splits) {
|
||||
return;
|
||||
} else if (splits > this.$splits) {
|
||||
while (this.$splits < this.$editors.length && this.$splits < splits) {
|
||||
editor = this.$editors[this.$splits];
|
||||
this.$container.appendChild(editor.container);
|
||||
editor.setFontSize(this.$fontSize);
|
||||
this.$splits ++;
|
||||
}
|
||||
while (this.$splits < splits) {
|
||||
this.$createEditor();
|
||||
this.$splits ++;
|
||||
}
|
||||
} else {
|
||||
while (this.$splits > splits) {
|
||||
editor = this.$editors[this.$splits - 1];
|
||||
this.$container.removeChild(editor.container);
|
||||
this.$splits --;
|
||||
}
|
||||
}
|
||||
this.resize();
|
||||
};
|
||||
this.getSplits = function() {
|
||||
return this.$splits;
|
||||
};
|
||||
this.getEditor = function(idx) {
|
||||
return this.$editors[idx];
|
||||
};
|
||||
this.getCurrentEditor = function() {
|
||||
return this.$cEditor;
|
||||
};
|
||||
this.focus = function() {
|
||||
this.$cEditor.focus();
|
||||
};
|
||||
this.blur = function() {
|
||||
this.$cEditor.blur();
|
||||
};
|
||||
this.setTheme = function(theme) {
|
||||
this.$editors.forEach(function(editor) {
|
||||
editor.setTheme(theme);
|
||||
});
|
||||
};
|
||||
this.setKeyboardHandler = function(keybinding) {
|
||||
this.$editors.forEach(function(editor) {
|
||||
editor.setKeyboardHandler(keybinding);
|
||||
});
|
||||
};
|
||||
this.forEach = function(callback, scope) {
|
||||
this.$editors.forEach(callback, scope);
|
||||
};
|
||||
|
||||
|
||||
this.$fontSize = "";
|
||||
this.setFontSize = function(size) {
|
||||
this.$fontSize = size;
|
||||
this.forEach(function(editor) {
|
||||
editor.setFontSize(size);
|
||||
});
|
||||
};
|
||||
|
||||
this.$cloneSession = function(session) {
|
||||
var s = new EditSession(session.getDocument(), session.getMode());
|
||||
|
||||
var undoManager = session.getUndoManager();
|
||||
s.setUndoManager(undoManager);
|
||||
s.setTabSize(session.getTabSize());
|
||||
s.setUseSoftTabs(session.getUseSoftTabs());
|
||||
s.setOverwrite(session.getOverwrite());
|
||||
s.setBreakpoints(session.getBreakpoints());
|
||||
s.setUseWrapMode(session.getUseWrapMode());
|
||||
s.setUseWorker(session.getUseWorker());
|
||||
s.setWrapLimitRange(session.$wrapLimitRange.min,
|
||||
session.$wrapLimitRange.max);
|
||||
s.$foldData = session.$cloneFoldData();
|
||||
|
||||
return s;
|
||||
};
|
||||
this.setSession = function(session, idx) {
|
||||
var editor;
|
||||
if (idx == null) {
|
||||
editor = this.$cEditor;
|
||||
} else {
|
||||
editor = this.$editors[idx];
|
||||
}
|
||||
var isUsed = this.$editors.some(function(editor) {
|
||||
return editor.session === session;
|
||||
});
|
||||
|
||||
if (isUsed) {
|
||||
session = this.$cloneSession(session);
|
||||
}
|
||||
editor.setSession(session);
|
||||
return session;
|
||||
};
|
||||
this.getOrientation = function() {
|
||||
return this.$orientation;
|
||||
};
|
||||
this.setOrientation = function(orientation) {
|
||||
if (this.$orientation == orientation) {
|
||||
return;
|
||||
}
|
||||
this.$orientation = orientation;
|
||||
this.resize();
|
||||
};
|
||||
this.resize = function() {
|
||||
var width = this.$container.clientWidth;
|
||||
var height = this.$container.clientHeight;
|
||||
var editor;
|
||||
|
||||
if (this.$orientation == this.BESIDE) {
|
||||
var editorWidth = width / this.$splits;
|
||||
for (var i = 0; i < this.$splits; i++) {
|
||||
editor = this.$editors[i];
|
||||
editor.container.style.width = editorWidth + "px";
|
||||
editor.container.style.top = "0px";
|
||||
editor.container.style.left = i * editorWidth + "px";
|
||||
editor.container.style.height = height + "px";
|
||||
editor.resize();
|
||||
}
|
||||
} else {
|
||||
var editorHeight = height / this.$splits;
|
||||
for (var i = 0; i < this.$splits; i++) {
|
||||
editor = this.$editors[i];
|
||||
editor.container.style.width = width + "px";
|
||||
editor.container.style.top = i * editorHeight + "px";
|
||||
editor.container.style.left = "0px";
|
||||
editor.container.style.height = editorHeight + "px";
|
||||
editor.resize();
|
||||
}
|
||||
}
|
||||
};
|
||||
|
||||
}).call(Split.prototype);
|
||||
|
||||
exports.Split = Split;
|
||||
});
|
||||
|
||||
define("ace/ext/split",["require","exports","module","ace/split"], function(require, exports, module) {
|
||||
"use strict";
|
||||
module.exports = require("../split");
|
||||
|
||||
}); (function() {
|
||||
define("ace/split",["require","exports","module","ace/lib/oop","ace/lib/lang","ace/lib/event_emitter","ace/editor","ace/virtual_renderer","ace/edit_session"],function(e,t,n){"use strict";var r=e("./lib/oop"),i=e("./lib/lang"),s=e("./lib/event_emitter").EventEmitter,o=e("./editor").Editor,u=e("./virtual_renderer").VirtualRenderer,a=e("./edit_session").EditSession,f;f=function(e,t,n){this.BELOW=1,this.BESIDE=0,this.$container=e,this.$theme=t,this.$splits=0,this.$editorCSS="",this.$editors=[],this.$orientation=this.BESIDE,this.setSplits(n||1),this.$cEditor=this.$editors[0],this.on("focus",function(e){this.$cEditor=e}.bind(this))},function(){r.implement(this,s),this.$createEditor=function(){var e=document.createElement("div");e.className=this.$editorCSS,e.style.cssText="position: absolute; top:0px; bottom:0px",this.$container.appendChild(e);var t=new o(new u(e,this.$theme));return t.on("focus",function(){this._emit("focus",t)}.bind(this)),this.$editors.push(t),t.setFontSize(this.$fontSize),t},this.setSplits=function(e){var t;if(e<1)throw"The number of splits have to be > 0!";if(e==this.$splits)return;if(e>this.$splits){while(this.$splits<this.$editors.length&&this.$splits<e)t=this.$editors[this.$splits],this.$container.appendChild(t.container),t.setFontSize(this.$fontSize),this.$splits++;while(this.$splits<e)this.$createEditor(),this.$splits++}else while(this.$splits>e)t=this.$editors[this.$splits-1],this.$container.removeChild(t.container),this.$splits--;this.resize()},this.getSplits=function(){return this.$splits},this.getEditor=function(e){return this.$editors[e]},this.getCurrentEditor=function(){return this.$cEditor},this.focus=function(){this.$cEditor.focus()},this.blur=function(){this.$cEditor.blur()},this.setTheme=function(e){this.$editors.forEach(function(t){t.setTheme(e)})},this.setKeyboardHandler=function(e){this.$editors.forEach(function(t){t.setKeyboardHandler(e)})},this.forEach=function(e,t){this.$editors.forEach(e,t)},this.$fontSize="",this.setFontSize=function(e){this.$fontSize=e,this.forEach(function(t){t.setFontSize(e)})},this.$cloneSession=function(e){var t=new a(e.getDocument(),e.getMode()),n=e.getUndoManager();return t.setUndoManager(n),t.setTabSize(e.getTabSize()),t.setUseSoftTabs(e.getUseSoftTabs()),t.setOverwrite(e.getOverwrite()),t.setBreakpoints(e.getBreakpoints()),t.setUseWrapMode(e.getUseWrapMode()),t.setUseWorker(e.getUseWorker()),t.setWrapLimitRange(e.$wrapLimitRange.min,e.$wrapLimitRange.max),t.$foldData=e.$cloneFoldData(),t},this.setSession=function(e,t){var n;t==null?n=this.$cEditor:n=this.$editors[t];var r=this.$editors.some(function(t){return t.session===e});return r&&(e=this.$cloneSession(e)),n.setSession(e),e},this.getOrientation=function(){return this.$orientation},this.setOrientation=function(e){if(this.$orientation==e)return;this.$orientation=e,this.resize()},this.resize=function(){var e=this.$container.clientWidth,t=this.$container.clientHeight,n;if(this.$orientation==this.BESIDE){var r=e/this.$splits;for(var i=0;i<this.$splits;i++)n=this.$editors[i],n.container.style.width=r+"px",n.container.style.top="0px",n.container.style.left=i*r+"px",n.container.style.height=t+"px",n.resize()}else{var s=t/this.$splits;for(var i=0;i<this.$splits;i++)n=this.$editors[i],n.container.style.width=e+"px",n.container.style.top=i*s+"px",n.container.style.left="0px",n.container.style.height=s+"px",n.resize()}}}.call(f.prototype),t.Split=f}),define("ace/ext/split",["require","exports","module","ace/ext/split","ace/split"],function(e,t,n){"use strict";n.exports=e("../split")}); (function() {
|
||||
window.require(["ace/ext/split"], function(m) {
|
||||
if (typeof module == "object" && typeof exports == "object" && module) {
|
||||
module.exports = m;
|
||||
}
|
||||
});
|
||||
})();
|
||||
|
||||
@@ -1,229 +1,7 @@
|
||||
define("ace/ext/static_highlight",["require","exports","module","ace/edit_session","ace/layer/text","ace/config","ace/lib/dom","ace/lib/lang"], function(require, exports, module) {
|
||||
"use strict";
|
||||
|
||||
var EditSession = require("../edit_session").EditSession;
|
||||
var TextLayer = require("../layer/text").Text;
|
||||
var baseStyles = ".ace_static_highlight {\
|
||||
font-family: 'Monaco', 'Menlo', 'Ubuntu Mono', 'Consolas', 'source-code-pro', 'Droid Sans Mono', monospace;\
|
||||
font-size: 12px;\
|
||||
white-space: pre-wrap\
|
||||
}\
|
||||
.ace_static_highlight .ace_gutter {\
|
||||
width: 2em;\
|
||||
text-align: right;\
|
||||
padding: 0 3px 0 0;\
|
||||
margin-right: 3px;\
|
||||
contain: none;\
|
||||
}\
|
||||
.ace_static_highlight.ace_show_gutter .ace_line {\
|
||||
padding-left: 2.6em;\
|
||||
}\
|
||||
.ace_static_highlight .ace_line { position: relative; }\
|
||||
.ace_static_highlight .ace_gutter-cell {\
|
||||
-moz-user-select: -moz-none;\
|
||||
-khtml-user-select: none;\
|
||||
-webkit-user-select: none;\
|
||||
user-select: none;\
|
||||
top: 0;\
|
||||
bottom: 0;\
|
||||
left: 0;\
|
||||
position: absolute;\
|
||||
}\
|
||||
.ace_static_highlight .ace_gutter-cell:before {\
|
||||
content: counter(ace_line, decimal);\
|
||||
counter-increment: ace_line;\
|
||||
}\
|
||||
.ace_static_highlight {\
|
||||
counter-reset: ace_line;\
|
||||
}\
|
||||
";
|
||||
var config = require("../config");
|
||||
var dom = require("../lib/dom");
|
||||
var escapeHTML = require("../lib/lang").escapeHTML;
|
||||
|
||||
function Element(type) {
|
||||
this.type = type;
|
||||
this.style = {};
|
||||
this.textContent = "";
|
||||
}
|
||||
Element.prototype.cloneNode = function() {
|
||||
return this;
|
||||
};
|
||||
Element.prototype.appendChild = function(child) {
|
||||
this.textContent += child.toString();
|
||||
};
|
||||
Element.prototype.toString = function() {
|
||||
var stringBuilder = [];
|
||||
if (this.type != "fragment") {
|
||||
stringBuilder.push("<", this.type);
|
||||
if (this.className)
|
||||
stringBuilder.push(" class='", this.className, "'");
|
||||
var styleStr = [];
|
||||
for (var key in this.style) {
|
||||
styleStr.push(key, ":", this.style[key]);
|
||||
}
|
||||
if (styleStr.length)
|
||||
stringBuilder.push(" style='", styleStr.join(""), "'");
|
||||
stringBuilder.push(">");
|
||||
}
|
||||
|
||||
if (this.textContent) {
|
||||
stringBuilder.push(this.textContent);
|
||||
}
|
||||
|
||||
if (this.type != "fragment") {
|
||||
stringBuilder.push("</", this.type, ">");
|
||||
}
|
||||
|
||||
return stringBuilder.join("");
|
||||
};
|
||||
|
||||
|
||||
var simpleDom = {
|
||||
createTextNode: function(textContent, element) {
|
||||
return escapeHTML(textContent);
|
||||
},
|
||||
createElement: function(type) {
|
||||
return new Element(type);
|
||||
},
|
||||
createFragment: function() {
|
||||
return new Element("fragment");
|
||||
}
|
||||
};
|
||||
|
||||
var SimpleTextLayer = function() {
|
||||
this.config = {};
|
||||
this.dom = simpleDom;
|
||||
};
|
||||
SimpleTextLayer.prototype = TextLayer.prototype;
|
||||
|
||||
var highlight = function(el, opts, callback) {
|
||||
var m = el.className.match(/lang-(\w+)/);
|
||||
var mode = opts.mode || m && ("ace/mode/" + m[1]);
|
||||
if (!mode)
|
||||
return false;
|
||||
var theme = opts.theme || "ace/theme/textmate";
|
||||
|
||||
var data = "";
|
||||
var nodes = [];
|
||||
|
||||
if (el.firstElementChild) {
|
||||
var textLen = 0;
|
||||
for (var i = 0; i < el.childNodes.length; i++) {
|
||||
var ch = el.childNodes[i];
|
||||
if (ch.nodeType == 3) {
|
||||
textLen += ch.data.length;
|
||||
data += ch.data;
|
||||
} else {
|
||||
nodes.push(textLen, ch);
|
||||
}
|
||||
}
|
||||
} else {
|
||||
data = el.textContent;
|
||||
if (opts.trim)
|
||||
data = data.trim();
|
||||
}
|
||||
|
||||
highlight.render(data, mode, theme, opts.firstLineNumber, !opts.showGutter, function (highlighted) {
|
||||
dom.importCssString(highlighted.css, "ace_highlight");
|
||||
el.innerHTML = highlighted.html;
|
||||
var container = el.firstChild.firstChild;
|
||||
for (var i = 0; i < nodes.length; i += 2) {
|
||||
var pos = highlighted.session.doc.indexToPosition(nodes[i]);
|
||||
var node = nodes[i + 1];
|
||||
var lineEl = container.children[pos.row];
|
||||
lineEl && lineEl.appendChild(node);
|
||||
}
|
||||
callback && callback();
|
||||
});
|
||||
};
|
||||
highlight.render = function(input, mode, theme, lineStart, disableGutter, callback) {
|
||||
var waiting = 1;
|
||||
var modeCache = EditSession.prototype.$modes;
|
||||
if (typeof theme == "string") {
|
||||
waiting++;
|
||||
config.loadModule(['theme', theme], function(m) {
|
||||
theme = m;
|
||||
--waiting || done();
|
||||
});
|
||||
}
|
||||
var modeOptions;
|
||||
if (mode && typeof mode === "object" && !mode.getTokenizer) {
|
||||
modeOptions = mode;
|
||||
mode = modeOptions.path;
|
||||
}
|
||||
if (typeof mode == "string") {
|
||||
waiting++;
|
||||
config.loadModule(['mode', mode], function(m) {
|
||||
if (!modeCache[mode] || modeOptions)
|
||||
modeCache[mode] = new m.Mode(modeOptions);
|
||||
mode = modeCache[mode];
|
||||
--waiting || done();
|
||||
});
|
||||
}
|
||||
function done() {
|
||||
var result = highlight.renderSync(input, mode, theme, lineStart, disableGutter);
|
||||
return callback ? callback(result) : result;
|
||||
}
|
||||
return --waiting || done();
|
||||
};
|
||||
highlight.renderSync = function(input, mode, theme, lineStart, disableGutter) {
|
||||
lineStart = parseInt(lineStart || 1, 10);
|
||||
|
||||
var session = new EditSession("");
|
||||
session.setUseWorker(false);
|
||||
session.setMode(mode);
|
||||
|
||||
var textLayer = new SimpleTextLayer();
|
||||
textLayer.setSession(session);
|
||||
Object.keys(textLayer.$tabStrings).forEach(function(k) {
|
||||
if (typeof textLayer.$tabStrings[k] == "string") {
|
||||
var el = simpleDom.createFragment();
|
||||
el.textContent = textLayer.$tabStrings[k];
|
||||
textLayer.$tabStrings[k] = el;
|
||||
}
|
||||
});
|
||||
|
||||
session.setValue(input);
|
||||
var length = session.getLength();
|
||||
|
||||
var outerEl = simpleDom.createElement("div");
|
||||
outerEl.className = theme.cssClass;
|
||||
|
||||
var innerEl = simpleDom.createElement("div");
|
||||
innerEl.className = "ace_static_highlight" + (disableGutter ? "" : " ace_show_gutter");
|
||||
innerEl.style["counter-reset"] = "ace_line " + (lineStart - 1);
|
||||
|
||||
for (var ix = 0; ix < length; ix++) {
|
||||
var lineEl = simpleDom.createElement("div");
|
||||
lineEl.className = "ace_line";
|
||||
|
||||
if (!disableGutter) {
|
||||
var gutterEl = simpleDom.createElement("span");
|
||||
gutterEl.className ="ace_gutter ace_gutter-cell";
|
||||
gutterEl.textContent = "";
|
||||
lineEl.appendChild(gutterEl);
|
||||
}
|
||||
textLayer.$renderLine(lineEl, ix, false);
|
||||
lineEl.textContent += "\n";
|
||||
innerEl.appendChild(lineEl);
|
||||
}
|
||||
outerEl.appendChild(innerEl);
|
||||
|
||||
return {
|
||||
css: baseStyles + theme.cssText,
|
||||
html: outerEl.toString(),
|
||||
session: session
|
||||
};
|
||||
};
|
||||
|
||||
module.exports = highlight;
|
||||
module.exports.highlight = highlight;
|
||||
}); (function() {
|
||||
define("ace/ext/static-css",["require","exports","module"],function(e,t,n){n.exports=".ace_static_highlight {\n font-family: 'Monaco', 'Menlo', 'Ubuntu Mono', 'Consolas', 'Source Code Pro', 'source-code-pro', 'Droid Sans Mono', monospace;\n font-size: 12px;\n white-space: pre-wrap\n}\n\n.ace_static_highlight .ace_gutter {\n width: 2em;\n text-align: right;\n padding: 0 3px 0 0;\n margin-right: 3px;\n contain: none;\n}\n\n.ace_static_highlight.ace_show_gutter .ace_line {\n padding-left: 2.6em;\n}\n\n.ace_static_highlight .ace_line { position: relative; }\n\n.ace_static_highlight .ace_gutter-cell {\n -moz-user-select: -moz-none;\n -khtml-user-select: none;\n -webkit-user-select: none;\n user-select: none;\n top: 0;\n bottom: 0;\n left: 0;\n position: absolute;\n}\n\n\n.ace_static_highlight .ace_gutter-cell:before {\n content: counter(ace_line, decimal);\n counter-increment: ace_line;\n}\n.ace_static_highlight {\n counter-reset: ace_line;\n}\n"}),define("ace/ext/static_highlight",["require","exports","module","ace/edit_session","ace/layer/text","ace/ext/static-css","ace/config","ace/lib/dom","ace/lib/lang"],function(e,t,n){"use strict";var r=e("../edit_session").EditSession,i=e("../layer/text").Text,s=e("./static-css"),o=e("../config"),u=e("../lib/dom"),a=e("../lib/lang").escapeHTML,f=function(){function e(e){this.className,this.type=e,this.style={},this.textContent=""}return e.prototype.cloneNode=function(){return this},e.prototype.appendChild=function(e){this.textContent+=e.toString()},e.prototype.toString=function(){var e=[];if(this.type!="fragment"){e.push("<",this.type),this.className&&e.push(" class='",this.className,"'");var t=[];for(var n in this.style)t.push(n,":",this.style[n]);t.length&&e.push(" style='",t.join(""),"'"),e.push(">")}return this.textContent&&e.push(this.textContent),this.type!="fragment"&&e.push("</",this.type,">"),e.join("")},e}(),l={createTextNode:function(e,t){return a(e)},createElement:function(e){return new f(e)},createFragment:function(){return new f("fragment")}},c=function(){this.config={},this.dom=l};c.prototype=i.prototype;var h=function(e,t,n){var r=e.className.match(/lang-(\w+)/),i=t.mode||r&&"ace/mode/"+r[1];if(!i)return!1;var s=t.theme||"ace/theme/textmate",o="",a=[];if(e.firstElementChild){var f=0;for(var l=0;l<e.childNodes.length;l++){var c=e.childNodes[l];c.nodeType==3?(f+=c.data.length,o+=c.data):a.push(f,c)}}else o=e.textContent,t.trim&&(o=o.trim());h.render(o,i,s,t.firstLineNumber,!t.showGutter,function(t){u.importCssString(t.css,"ace_highlight",!0),e.innerHTML=t.html;var r=e.firstChild.firstChild;for(var i=0;i<a.length;i+=2){var s=t.session.doc.indexToPosition(a[i]),o=a[i+1],f=r.children[s.row];f&&f.appendChild(o)}n&&n()})};h.render=function(e,t,n,i,s,u){function c(){var r=h.renderSync(e,t,n,i,s);return u?u(r):r}var a=1,f=r.prototype.$modes;typeof n=="string"&&(a++,o.loadModule(["theme",n],function(e){n=e,--a||c()}));var l;return t&&typeof t=="object"&&!t.getTokenizer&&(l=t,t=l.path),typeof t=="string"&&(a++,o.loadModule(["mode",t],function(e){if(!f[t]||l)f[t]=new e.Mode(l);t=f[t],--a||c()})),--a||c()},h.renderSync=function(e,t,n,i,o){i=parseInt(i||1,10);var u=new r("");u.setUseWorker(!1),u.setMode(t);var a=new c;a.setSession(u),Object.keys(a.$tabStrings).forEach(function(e){if(typeof a.$tabStrings[e]=="string"){var t=l.createFragment();t.textContent=a.$tabStrings[e],a.$tabStrings[e]=t}}),u.setValue(e);var f=u.getLength(),h=l.createElement("div");h.className=n.cssClass;var p=l.createElement("div");p.className="ace_static_highlight"+(o?"":" ace_show_gutter"),p.style["counter-reset"]="ace_line "+(i-1);for(var d=0;d<f;d++){var v=l.createElement("div");v.className="ace_line";if(!o){var m=l.createElement("span");m.className="ace_gutter ace_gutter-cell",m.textContent="",v.appendChild(m)}a.$renderLine(v,d,!1),v.textContent+="\n",p.appendChild(v)}return h.appendChild(p),{css:s+n.cssText,html:h.toString(),session:u}},n.exports=h,n.exports.highlight=h}); (function() {
|
||||
window.require(["ace/ext/static_highlight"], function(m) {
|
||||
if (typeof module == "object" && typeof exports == "object" && module) {
|
||||
module.exports = m;
|
||||
}
|
||||
});
|
||||
})();
|
||||
|
||||
@@ -1,56 +1,7 @@
|
||||
define("ace/ext/statusbar",["require","exports","module","ace/lib/dom","ace/lib/lang"], function(require, exports, module) {
|
||||
"use strict";
|
||||
var dom = require("../lib/dom");
|
||||
var lang = require("../lib/lang");
|
||||
|
||||
var StatusBar = function(editor, parentNode) {
|
||||
this.element = dom.createElement("div");
|
||||
this.element.className = "ace_status-indicator";
|
||||
this.element.style.cssText = "display: inline-block;";
|
||||
parentNode.appendChild(this.element);
|
||||
|
||||
var statusUpdate = lang.delayedCall(function(){
|
||||
this.updateStatus(editor);
|
||||
}.bind(this)).schedule.bind(null, 100);
|
||||
|
||||
editor.on("changeStatus", statusUpdate);
|
||||
editor.on("changeSelection", statusUpdate);
|
||||
editor.on("keyboardActivity", statusUpdate);
|
||||
};
|
||||
|
||||
(function(){
|
||||
this.updateStatus = function(editor) {
|
||||
var status = [];
|
||||
function add(str, separator) {
|
||||
str && status.push(str, separator || "|");
|
||||
}
|
||||
|
||||
add(editor.keyBinding.getStatusText(editor));
|
||||
if (editor.commands.recording)
|
||||
add("REC");
|
||||
|
||||
var sel = editor.selection;
|
||||
var c = sel.lead;
|
||||
|
||||
if (!sel.isEmpty()) {
|
||||
var r = editor.getSelectionRange();
|
||||
add("(" + (r.end.row - r.start.row) + ":" +(r.end.column - r.start.column) + ")", " ");
|
||||
}
|
||||
add(c.row + ":" + c.column, " ");
|
||||
if (sel.rangeCount)
|
||||
add("[" + sel.rangeCount + "]", " ");
|
||||
status.pop();
|
||||
this.element.textContent = status.join("");
|
||||
};
|
||||
}).call(StatusBar.prototype);
|
||||
|
||||
exports.StatusBar = StatusBar;
|
||||
|
||||
}); (function() {
|
||||
define("ace/ext/statusbar",["require","exports","module","ace/ext/statusbar","ace/lib/dom","ace/lib/lang"],function(e,t,n){"use strict";var r=e("../lib/dom"),i=e("../lib/lang"),s=function(){function e(e,t){this.element=r.createElement("div"),this.element.className="ace_status-indicator",this.element.style.cssText="display: inline-block;",t.appendChild(this.element);var n=i.delayedCall(function(){this.updateStatus(e)}.bind(this)).schedule.bind(null,100);e.on("changeStatus",n),e.on("changeSelection",n),e.on("keyboardActivity",n)}return e.prototype.updateStatus=function(e){function n(e,n){e&&t.push(e,n||"|")}var t=[];n(e.keyBinding.getStatusText(e)),e.commands.recording&&n("REC");var r=e.selection,i=r.lead;if(!r.isEmpty()){var s=e.getSelectionRange();n("("+(s.end.row-s.start.row)+":"+(s.end.column-s.start.column)+")"," ")}n(i.row+":"+i.column," "),r.rangeCount&&n("["+r.rangeCount+"]"," "),t.pop(),this.element.textContent=t.join("")},e}();t.StatusBar=s}); (function() {
|
||||
window.require(["ace/ext/statusbar"], function(m) {
|
||||
if (typeof module == "object" && typeof exports == "object" && module) {
|
||||
module.exports = m;
|
||||
}
|
||||
});
|
||||
})();
|
||||
|
||||
File diff suppressed because one or more lines are too long
@@ -1,67 +1,7 @@
|
||||
define("ace/ext/themelist",["require","exports","module"], function(require, exports, module) {
|
||||
"use strict";
|
||||
|
||||
var themeData = [
|
||||
["Chrome" ],
|
||||
["Clouds" ],
|
||||
["Crimson Editor" ],
|
||||
["Dawn" ],
|
||||
["Dreamweaver" ],
|
||||
["Eclipse" ],
|
||||
["GitHub" ],
|
||||
["IPlastic" ],
|
||||
["Solarized Light"],
|
||||
["TextMate" ],
|
||||
["Tomorrow" ],
|
||||
["Xcode" ],
|
||||
["Kuroir"],
|
||||
["KatzenMilch"],
|
||||
["SQL Server" ,"sqlserver" , "light"],
|
||||
["Ambiance" ,"ambiance" , "dark"],
|
||||
["Chaos" ,"chaos" , "dark"],
|
||||
["Clouds Midnight" ,"clouds_midnight" , "dark"],
|
||||
["Dracula" ,"" , "dark"],
|
||||
["Cobalt" ,"cobalt" , "dark"],
|
||||
["Gruvbox" ,"gruvbox" , "dark"],
|
||||
["Green on Black" ,"gob" , "dark"],
|
||||
["idle Fingers" ,"idle_fingers" , "dark"],
|
||||
["krTheme" ,"kr_theme" , "dark"],
|
||||
["Merbivore" ,"merbivore" , "dark"],
|
||||
["Merbivore Soft" ,"merbivore_soft" , "dark"],
|
||||
["Mono Industrial" ,"mono_industrial" , "dark"],
|
||||
["Monokai" ,"monokai" , "dark"],
|
||||
["Nord Dark" ,"nord_dark" , "dark"],
|
||||
["One Dark" ,"one_dark" , "dark"],
|
||||
["Pastel on dark" ,"pastel_on_dark" , "dark"],
|
||||
["Solarized Dark" ,"solarized_dark" , "dark"],
|
||||
["Terminal" ,"terminal" , "dark"],
|
||||
["Tomorrow Night" ,"tomorrow_night" , "dark"],
|
||||
["Tomorrow Night Blue" ,"tomorrow_night_blue" , "dark"],
|
||||
["Tomorrow Night Bright","tomorrow_night_bright" , "dark"],
|
||||
["Tomorrow Night 80s" ,"tomorrow_night_eighties" , "dark"],
|
||||
["Twilight" ,"twilight" , "dark"],
|
||||
["Vibrant Ink" ,"vibrant_ink" , "dark"]
|
||||
];
|
||||
|
||||
|
||||
exports.themesByName = {};
|
||||
exports.themes = themeData.map(function(data) {
|
||||
var name = data[1] || data[0].replace(/ /g, "_").toLowerCase();
|
||||
var theme = {
|
||||
caption: data[0],
|
||||
theme: "ace/theme/" + name,
|
||||
isDark: data[2] == "dark",
|
||||
name: name
|
||||
};
|
||||
exports.themesByName[name] = theme;
|
||||
return theme;
|
||||
});
|
||||
|
||||
}); (function() {
|
||||
define("ace/ext/themelist",["require","exports","module"],function(e,t,n){"use strict";var r=[["Chrome"],["Clouds"],["Crimson Editor"],["Dawn"],["Dreamweaver"],["Eclipse"],["GitHub Light Default"],["GitHub (Legacy)","github","light"],["IPlastic"],["Solarized Light"],["TextMate"],["Tomorrow"],["XCode"],["Kuroir"],["KatzenMilch"],["SQL Server","sqlserver","light"],["CloudEditor","cloud_editor","light"],["Ambiance","ambiance","dark"],["Chaos","chaos","dark"],["Clouds Midnight","clouds_midnight","dark"],["Dracula","","dark"],["Cobalt","cobalt","dark"],["Gruvbox","gruvbox","dark"],["Green on Black","gob","dark"],["idle Fingers","idle_fingers","dark"],["krTheme","kr_theme","dark"],["Merbivore","merbivore","dark"],["Merbivore Soft","merbivore_soft","dark"],["Mono Industrial","mono_industrial","dark"],["Monokai","monokai","dark"],["Nord Dark","nord_dark","dark"],["One Dark","one_dark","dark"],["Pastel on dark","pastel_on_dark","dark"],["Solarized Dark","solarized_dark","dark"],["Terminal","terminal","dark"],["Tomorrow Night","tomorrow_night","dark"],["Tomorrow Night Blue","tomorrow_night_blue","dark"],["Tomorrow Night Bright","tomorrow_night_bright","dark"],["Tomorrow Night 80s","tomorrow_night_eighties","dark"],["Twilight","twilight","dark"],["Vibrant Ink","vibrant_ink","dark"],["GitHub Dark","github_dark","dark"],["CloudEditor Dark","cloud_editor_dark","dark"]];t.themesByName={},t.themes=r.map(function(e){var n=e[1]||e[0].replace(/ /g,"_").toLowerCase(),r={caption:e[0],theme:"ace/theme/"+n,isDark:e[2]=="dark",name:n};return t.themesByName[n]=r,r})}); (function() {
|
||||
window.require(["ace/ext/themelist"], function(m) {
|
||||
if (typeof module == "object" && typeof exports == "object" && module) {
|
||||
module.exports = m;
|
||||
}
|
||||
});
|
||||
})();
|
||||
|
||||
@@ -1,213 +1,7 @@
|
||||
define("ace/ext/whitespace",["require","exports","module","ace/lib/lang"], function(require, exports, module) {
|
||||
"use strict";
|
||||
|
||||
var lang = require("../lib/lang");
|
||||
exports.$detectIndentation = function(lines, fallback) {
|
||||
var stats = [];
|
||||
var changes = [];
|
||||
var tabIndents = 0;
|
||||
var prevSpaces = 0;
|
||||
var max = Math.min(lines.length, 1000);
|
||||
for (var i = 0; i < max; i++) {
|
||||
var line = lines[i];
|
||||
if (!/^\s*[^*+\-\s]/.test(line))
|
||||
continue;
|
||||
|
||||
if (line[0] == "\t") {
|
||||
tabIndents++;
|
||||
prevSpaces = -Number.MAX_VALUE;
|
||||
} else {
|
||||
var spaces = line.match(/^ */)[0].length;
|
||||
if (spaces && line[spaces] != "\t") {
|
||||
var diff = spaces - prevSpaces;
|
||||
if (diff > 0 && !(prevSpaces%diff) && !(spaces%diff))
|
||||
changes[diff] = (changes[diff] || 0) + 1;
|
||||
|
||||
stats[spaces] = (stats[spaces] || 0) + 1;
|
||||
}
|
||||
prevSpaces = spaces;
|
||||
}
|
||||
while (i < max && line[line.length - 1] == "\\")
|
||||
line = lines[i++];
|
||||
}
|
||||
|
||||
function getScore(indent) {
|
||||
var score = 0;
|
||||
for (var i = indent; i < stats.length; i += indent)
|
||||
score += stats[i] || 0;
|
||||
return score;
|
||||
}
|
||||
|
||||
var changesTotal = changes.reduce(function(a,b){return a+b;}, 0);
|
||||
|
||||
var first = {score: 0, length: 0};
|
||||
var spaceIndents = 0;
|
||||
for (var i = 1; i < 12; i++) {
|
||||
var score = getScore(i);
|
||||
if (i == 1) {
|
||||
spaceIndents = score;
|
||||
score = stats[1] ? 0.9 : 0.8;
|
||||
if (!stats.length)
|
||||
score = 0;
|
||||
} else
|
||||
score /= spaceIndents;
|
||||
|
||||
if (changes[i])
|
||||
score += changes[i] / changesTotal;
|
||||
|
||||
if (score > first.score)
|
||||
first = {score: score, length: i};
|
||||
}
|
||||
|
||||
if (first.score && first.score > 1.4)
|
||||
var tabLength = first.length;
|
||||
|
||||
if (tabIndents > spaceIndents + 1) {
|
||||
if (tabLength == 1 || spaceIndents < tabIndents / 4 || first.score < 1.8)
|
||||
tabLength = undefined;
|
||||
return {ch: "\t", length: tabLength};
|
||||
}
|
||||
if (spaceIndents > tabIndents + 1)
|
||||
return {ch: " ", length: tabLength};
|
||||
};
|
||||
|
||||
exports.detectIndentation = function(session) {
|
||||
var lines = session.getLines(0, 1000);
|
||||
var indent = exports.$detectIndentation(lines) || {};
|
||||
|
||||
if (indent.ch)
|
||||
session.setUseSoftTabs(indent.ch == " ");
|
||||
|
||||
if (indent.length)
|
||||
session.setTabSize(indent.length);
|
||||
return indent;
|
||||
};
|
||||
exports.trimTrailingSpace = function(session, options) {
|
||||
var doc = session.getDocument();
|
||||
var lines = doc.getAllLines();
|
||||
|
||||
var min = options && options.trimEmpty ? -1 : 0;
|
||||
var cursors = [], ci = -1;
|
||||
if (options && options.keepCursorPosition) {
|
||||
if (session.selection.rangeCount) {
|
||||
session.selection.rangeList.ranges.forEach(function(x, i, ranges) {
|
||||
var next = ranges[i + 1];
|
||||
if (next && next.cursor.row == x.cursor.row)
|
||||
return;
|
||||
cursors.push(x.cursor);
|
||||
});
|
||||
} else {
|
||||
cursors.push(session.selection.getCursor());
|
||||
}
|
||||
ci = 0;
|
||||
}
|
||||
var cursorRow = cursors[ci] && cursors[ci].row;
|
||||
|
||||
for (var i = 0, l=lines.length; i < l; i++) {
|
||||
var line = lines[i];
|
||||
var index = line.search(/\s+$/);
|
||||
|
||||
if (i == cursorRow) {
|
||||
if (index < cursors[ci].column && index > min)
|
||||
index = cursors[ci].column;
|
||||
ci++;
|
||||
cursorRow = cursors[ci] ? cursors[ci].row : -1;
|
||||
}
|
||||
|
||||
if (index > min)
|
||||
doc.removeInLine(i, index, line.length);
|
||||
}
|
||||
};
|
||||
|
||||
exports.convertIndentation = function(session, ch, len) {
|
||||
var oldCh = session.getTabString()[0];
|
||||
var oldLen = session.getTabSize();
|
||||
if (!len) len = oldLen;
|
||||
if (!ch) ch = oldCh;
|
||||
|
||||
var tab = ch == "\t" ? ch: lang.stringRepeat(ch, len);
|
||||
|
||||
var doc = session.doc;
|
||||
var lines = doc.getAllLines();
|
||||
|
||||
var cache = {};
|
||||
var spaceCache = {};
|
||||
for (var i = 0, l=lines.length; i < l; i++) {
|
||||
var line = lines[i];
|
||||
var match = line.match(/^\s*/)[0];
|
||||
if (match) {
|
||||
var w = session.$getStringScreenWidth(match)[0];
|
||||
var tabCount = Math.floor(w/oldLen);
|
||||
var reminder = w%oldLen;
|
||||
var toInsert = cache[tabCount] || (cache[tabCount] = lang.stringRepeat(tab, tabCount));
|
||||
toInsert += spaceCache[reminder] || (spaceCache[reminder] = lang.stringRepeat(" ", reminder));
|
||||
|
||||
if (toInsert != match) {
|
||||
doc.removeInLine(i, 0, match.length);
|
||||
doc.insertInLine({row: i, column: 0}, toInsert);
|
||||
}
|
||||
}
|
||||
}
|
||||
session.setTabSize(len);
|
||||
session.setUseSoftTabs(ch == " ");
|
||||
};
|
||||
|
||||
exports.$parseStringArg = function(text) {
|
||||
var indent = {};
|
||||
if (/t/.test(text))
|
||||
indent.ch = "\t";
|
||||
else if (/s/.test(text))
|
||||
indent.ch = " ";
|
||||
var m = text.match(/\d+/);
|
||||
if (m)
|
||||
indent.length = parseInt(m[0], 10);
|
||||
return indent;
|
||||
};
|
||||
|
||||
exports.$parseArg = function(arg) {
|
||||
if (!arg)
|
||||
return {};
|
||||
if (typeof arg == "string")
|
||||
return exports.$parseStringArg(arg);
|
||||
if (typeof arg.text == "string")
|
||||
return exports.$parseStringArg(arg.text);
|
||||
return arg;
|
||||
};
|
||||
|
||||
exports.commands = [{
|
||||
name: "detectIndentation",
|
||||
description: "Detect indentation from content",
|
||||
exec: function(editor) {
|
||||
exports.detectIndentation(editor.session);
|
||||
}
|
||||
}, {
|
||||
name: "trimTrailingSpace",
|
||||
description: "Trim trailing whitespace",
|
||||
exec: function(editor, args) {
|
||||
exports.trimTrailingSpace(editor.session, args);
|
||||
}
|
||||
}, {
|
||||
name: "convertIndentation",
|
||||
description: "Convert indentation to ...",
|
||||
exec: function(editor, arg) {
|
||||
var indent = exports.$parseArg(arg);
|
||||
exports.convertIndentation(editor.session, indent.ch, indent.length);
|
||||
}
|
||||
}, {
|
||||
name: "setIndentation",
|
||||
description: "Set indentation",
|
||||
exec: function(editor, arg) {
|
||||
var indent = exports.$parseArg(arg);
|
||||
indent.length && editor.session.setTabSize(indent.length);
|
||||
indent.ch && editor.session.setUseSoftTabs(indent.ch == " ");
|
||||
}
|
||||
}];
|
||||
|
||||
}); (function() {
|
||||
define("ace/ext/whitespace",["require","exports","module","ace/lib/lang"],function(e,t,n){"use strict";var r=e("../lib/lang");t.$detectIndentation=function(e,t){function c(e){var t=0;for(var r=e;r<n.length;r+=e)t+=n[r]||0;return t}var n=[],r=[],i=0,s=0,o=Math.min(e.length,1e3);for(var u=0;u<o;u++){var a=e[u];if(!/^\s*[^*+\-\s]/.test(a))continue;if(a[0]==" ")i++,s=-Number.MAX_VALUE;else{var f=a.match(/^ */)[0].length;if(f&&a[f]!=" "){var l=f-s;l>0&&!(s%l)&&!(f%l)&&(r[l]=(r[l]||0)+1),n[f]=(n[f]||0)+1}s=f}while(u<o&&a[a.length-1]=="\\")a=e[u++]}var h=r.reduce(function(e,t){return e+t},0),p={score:0,length:0},d=0;for(var u=1;u<12;u++){var v=c(u);u==1?(d=v,v=n[1]?.9:.8,n.length||(v=0)):v/=d,r[u]&&(v+=r[u]/h),v>p.score&&(p={score:v,length:u})}if(p.score&&p.score>1.4)var m=p.length;if(i>d+1){if(m==1||d<i/4||p.score<1.8)m=undefined;return{ch:" ",length:m}}if(d>i+1)return{ch:" ",length:m}},t.detectIndentation=function(e){var n=e.getLines(0,1e3),r=t.$detectIndentation(n)||{};return r.ch&&e.setUseSoftTabs(r.ch==" "),r.length&&e.setTabSize(r.length),r},t.trimTrailingSpace=function(e,t){var n=e.getDocument(),r=n.getAllLines(),i=t&&t.trimEmpty?-1:0,s=[],o=-1;t&&t.keepCursorPosition&&(e.selection.rangeCount?e.selection.rangeList.ranges.forEach(function(e,t,n){var r=n[t+1];if(r&&r.cursor.row==e.cursor.row)return;s.push(e.cursor)}):s.push(e.selection.getCursor()),o=0);var u=s[o]&&s[o].row;for(var a=0,f=r.length;a<f;a++){var l=r[a],c=l.search(/\s+$/);a==u&&(c<s[o].column&&c>i&&(c=s[o].column),o++,u=s[o]?s[o].row:-1),c>i&&n.removeInLine(a,c,l.length)}},t.convertIndentation=function(e,t,n){var i=e.getTabString()[0],s=e.getTabSize();n||(n=s),t||(t=i);var o=t==" "?t:r.stringRepeat(t,n),u=e.doc,a=u.getAllLines(),f={},l={};for(var c=0,h=a.length;c<h;c++){var p=a[c],d=p.match(/^\s*/)[0];if(d){var v=e.$getStringScreenWidth(d)[0],m=Math.floor(v/s),g=v%s,y=f[m]||(f[m]=r.stringRepeat(o,m));y+=l[g]||(l[g]=r.stringRepeat(" ",g)),y!=d&&(u.removeInLine(c,0,d.length),u.insertInLine({row:c,column:0},y))}}e.setTabSize(n),e.setUseSoftTabs(t==" ")},t.$parseStringArg=function(e){var t={};/t/.test(e)?t.ch=" ":/s/.test(e)&&(t.ch=" ");var n=e.match(/\d+/);return n&&(t.length=parseInt(n[0],10)),t},t.$parseArg=function(e){return e?typeof e=="string"?t.$parseStringArg(e):typeof e.text=="string"?t.$parseStringArg(e.text):e:{}},t.commands=[{name:"detectIndentation",description:"Detect indentation from content",exec:function(e){t.detectIndentation(e.session)}},{name:"trimTrailingSpace",description:"Trim trailing whitespace",exec:function(e,n){t.trimTrailingSpace(e.session,n)}},{name:"convertIndentation",description:"Convert indentation to ...",exec:function(e,n){var r=t.$parseArg(n);t.convertIndentation(e.session,r.ch,r.length)}},{name:"setIndentation",description:"Set indentation",exec:function(e,n){var r=t.$parseArg(n);r.length&&e.session.setTabSize(r.length),r.ch&&e.session.setUseSoftTabs(r.ch==" ")}}]}); (function() {
|
||||
window.require(["ace/ext/whitespace"], function(m) {
|
||||
if (typeof module == "object" && typeof exports == "object" && module) {
|
||||
module.exports = m;
|
||||
}
|
||||
});
|
||||
})();
|
||||
|
||||
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
@@ -1,271 +1,7 @@
|
||||
define("ace/mode/abc_highlight_rules",["require","exports","module","ace/lib/oop","ace/mode/text_highlight_rules"], function (require, exports, module) {
|
||||
"use strict";
|
||||
|
||||
var oop = require("../lib/oop");
|
||||
var TextHighlightRules = require("./text_highlight_rules").TextHighlightRules;
|
||||
|
||||
var ABCHighlightRules = function () {
|
||||
|
||||
this.$rules = {
|
||||
start: [
|
||||
{
|
||||
token: ['zupfnoter.information.comment.line.percentage', 'information.keyword', 'in formation.keyword.embedded'],
|
||||
regex: '(%%%%)(hn\\.[a-z]*)(.*)',
|
||||
comment: 'Instruction Comment'
|
||||
},
|
||||
{
|
||||
token: ['information.comment.line.percentage', 'information.keyword.embedded'],
|
||||
regex: '(%%)(.*)',
|
||||
comment: 'Instruction Comment'
|
||||
},
|
||||
|
||||
{
|
||||
token: 'comment.line.percentage',
|
||||
regex: '%.*',
|
||||
comment: 'Comments'
|
||||
},
|
||||
|
||||
{
|
||||
token: 'barline.keyword.operator',
|
||||
regex: '[\\[:]*[|:][|\\]:]*(?:\\[?[0-9]+)?|\\[[0-9]+',
|
||||
comment: 'Bar lines'
|
||||
},
|
||||
{
|
||||
token: ['information.keyword.embedded', 'information.argument.string.unquoted'],
|
||||
regex: '(\\[[A-Za-z]:)([^\\]]*\\])',
|
||||
comment: 'embedded Header lines'
|
||||
},
|
||||
{
|
||||
token: ['information.keyword', 'information.argument.string.unquoted'],
|
||||
regex: '^([A-Za-z]:)([^%\\\\]*)',
|
||||
comment: 'Header lines'
|
||||
},
|
||||
{
|
||||
token: ['text', 'entity.name.function', 'string.unquoted', 'text'],
|
||||
regex: '(\\[)([A-Z]:)(.*?)(\\])',
|
||||
comment: 'Inline fields'
|
||||
},
|
||||
{
|
||||
token: ['accent.constant.language', 'pitch.constant.numeric', 'duration.constant.numeric'],
|
||||
regex: '([\\^=_]*)([A-Ga-gz][,\']*)([0-9]*/*[><0-9]*)',
|
||||
comment: 'Notes'
|
||||
},
|
||||
{
|
||||
token: 'zupfnoter.jumptarget.string.quoted',
|
||||
regex: '[\\"!]\\^\\:.*?[\\"!]',
|
||||
comment: 'Zupfnoter jumptarget'
|
||||
}, {
|
||||
token: 'zupfnoter.goto.string.quoted',
|
||||
regex: '[\\"!]\\^\\@.*?[\\"!]',
|
||||
comment: 'Zupfnoter goto'
|
||||
},
|
||||
{
|
||||
token: 'zupfnoter.annotation.string.quoted',
|
||||
regex: '[\\"!]\\^\\!.*?[\\"!]',
|
||||
comment: 'Zupfnoter annoation'
|
||||
},
|
||||
{
|
||||
token: 'zupfnoter.annotationref.string.quoted',
|
||||
regex: '[\\"!]\\^\\#.*?[\\"!]',
|
||||
comment: 'Zupfnoter annotation reference'
|
||||
},
|
||||
{
|
||||
token: 'chordname.string.quoted',
|
||||
regex: '[\\"!]\\^.*?[\\"!]',
|
||||
comment: 'abc chord'
|
||||
},
|
||||
{
|
||||
token: 'string.quoted',
|
||||
regex: '[\\"!].*?[\\"!]',
|
||||
comment: 'abc annotation'
|
||||
}
|
||||
|
||||
]
|
||||
};
|
||||
|
||||
this.normalizeRules();
|
||||
};
|
||||
|
||||
ABCHighlightRules.metaData = {
|
||||
fileTypes: ['abc'],
|
||||
name: 'ABC',
|
||||
scopeName: 'text.abcnotation'
|
||||
};
|
||||
|
||||
|
||||
oop.inherits(ABCHighlightRules, TextHighlightRules);
|
||||
|
||||
exports.ABCHighlightRules = ABCHighlightRules;
|
||||
});
|
||||
|
||||
define("ace/mode/folding/cstyle",["require","exports","module","ace/lib/oop","ace/range","ace/mode/folding/fold_mode"], function(require, exports, module) {
|
||||
"use strict";
|
||||
|
||||
var oop = require("../../lib/oop");
|
||||
var Range = require("../../range").Range;
|
||||
var BaseFoldMode = require("./fold_mode").FoldMode;
|
||||
|
||||
var FoldMode = exports.FoldMode = function(commentRegex) {
|
||||
if (commentRegex) {
|
||||
this.foldingStartMarker = new RegExp(
|
||||
this.foldingStartMarker.source.replace(/\|[^|]*?$/, "|" + commentRegex.start)
|
||||
);
|
||||
this.foldingStopMarker = new RegExp(
|
||||
this.foldingStopMarker.source.replace(/\|[^|]*?$/, "|" + commentRegex.end)
|
||||
);
|
||||
}
|
||||
};
|
||||
oop.inherits(FoldMode, BaseFoldMode);
|
||||
|
||||
(function() {
|
||||
|
||||
this.foldingStartMarker = /([\{\[\(])[^\}\]\)]*$|^\s*(\/\*)/;
|
||||
this.foldingStopMarker = /^[^\[\{\(]*([\}\]\)])|^[\s\*]*(\*\/)/;
|
||||
this.singleLineBlockCommentRe= /^\s*(\/\*).*\*\/\s*$/;
|
||||
this.tripleStarBlockCommentRe = /^\s*(\/\*\*\*).*\*\/\s*$/;
|
||||
this.startRegionRe = /^\s*(\/\*|\/\/)#?region\b/;
|
||||
this._getFoldWidgetBase = this.getFoldWidget;
|
||||
this.getFoldWidget = function(session, foldStyle, row) {
|
||||
var line = session.getLine(row);
|
||||
|
||||
if (this.singleLineBlockCommentRe.test(line)) {
|
||||
if (!this.startRegionRe.test(line) && !this.tripleStarBlockCommentRe.test(line))
|
||||
return "";
|
||||
}
|
||||
|
||||
var fw = this._getFoldWidgetBase(session, foldStyle, row);
|
||||
|
||||
if (!fw && this.startRegionRe.test(line))
|
||||
return "start"; // lineCommentRegionStart
|
||||
|
||||
return fw;
|
||||
};
|
||||
|
||||
this.getFoldWidgetRange = function(session, foldStyle, row, forceMultiline) {
|
||||
var line = session.getLine(row);
|
||||
|
||||
if (this.startRegionRe.test(line))
|
||||
return this.getCommentRegionBlock(session, line, row);
|
||||
|
||||
var match = line.match(this.foldingStartMarker);
|
||||
if (match) {
|
||||
var i = match.index;
|
||||
|
||||
if (match[1])
|
||||
return this.openingBracketBlock(session, match[1], row, i);
|
||||
|
||||
var range = session.getCommentFoldRange(row, i + match[0].length, 1);
|
||||
|
||||
if (range && !range.isMultiLine()) {
|
||||
if (forceMultiline) {
|
||||
range = this.getSectionRange(session, row);
|
||||
} else if (foldStyle != "all")
|
||||
range = null;
|
||||
}
|
||||
|
||||
return range;
|
||||
}
|
||||
|
||||
if (foldStyle === "markbegin")
|
||||
return;
|
||||
|
||||
var match = line.match(this.foldingStopMarker);
|
||||
if (match) {
|
||||
var i = match.index + match[0].length;
|
||||
|
||||
if (match[1])
|
||||
return this.closingBracketBlock(session, match[1], row, i);
|
||||
|
||||
return session.getCommentFoldRange(row, i, -1);
|
||||
}
|
||||
};
|
||||
|
||||
this.getSectionRange = function(session, row) {
|
||||
var line = session.getLine(row);
|
||||
var startIndent = line.search(/\S/);
|
||||
var startRow = row;
|
||||
var startColumn = line.length;
|
||||
row = row + 1;
|
||||
var endRow = row;
|
||||
var maxRow = session.getLength();
|
||||
while (++row < maxRow) {
|
||||
line = session.getLine(row);
|
||||
var indent = line.search(/\S/);
|
||||
if (indent === -1)
|
||||
continue;
|
||||
if (startIndent > indent)
|
||||
break;
|
||||
var subRange = this.getFoldWidgetRange(session, "all", row);
|
||||
|
||||
if (subRange) {
|
||||
if (subRange.start.row <= startRow) {
|
||||
break;
|
||||
} else if (subRange.isMultiLine()) {
|
||||
row = subRange.end.row;
|
||||
} else if (startIndent == indent) {
|
||||
break;
|
||||
}
|
||||
}
|
||||
endRow = row;
|
||||
}
|
||||
|
||||
return new Range(startRow, startColumn, endRow, session.getLine(endRow).length);
|
||||
};
|
||||
this.getCommentRegionBlock = function(session, line, row) {
|
||||
var startColumn = line.search(/\s*$/);
|
||||
var maxRow = session.getLength();
|
||||
var startRow = row;
|
||||
|
||||
var re = /^\s*(?:\/\*|\/\/|--)#?(end)?region\b/;
|
||||
var depth = 1;
|
||||
while (++row < maxRow) {
|
||||
line = session.getLine(row);
|
||||
var m = re.exec(line);
|
||||
if (!m) continue;
|
||||
if (m[1]) depth--;
|
||||
else depth++;
|
||||
|
||||
if (!depth) break;
|
||||
}
|
||||
|
||||
var endRow = row;
|
||||
if (endRow > startRow) {
|
||||
return new Range(startRow, startColumn, endRow, line.length);
|
||||
}
|
||||
};
|
||||
|
||||
}).call(FoldMode.prototype);
|
||||
|
||||
});
|
||||
|
||||
define("ace/mode/abc",["require","exports","module","ace/lib/oop","ace/mode/text","ace/mode/abc_highlight_rules","ace/mode/folding/cstyle"], function (require, exports, module) {
|
||||
"use strict";
|
||||
|
||||
var oop = require("../lib/oop");
|
||||
var TextMode = require("./text").Mode;
|
||||
var ABCHighlightRules = require("./abc_highlight_rules").ABCHighlightRules;
|
||||
var FoldMode = require("./folding/cstyle").FoldMode;
|
||||
|
||||
var Mode = function () {
|
||||
this.HighlightRules = ABCHighlightRules;
|
||||
this.foldingRules = new FoldMode();
|
||||
this.$behaviour = this.$defaultBehaviour;
|
||||
};
|
||||
oop.inherits(Mode, TextMode);
|
||||
|
||||
(function () {
|
||||
this.lineCommentStart = "%";
|
||||
|
||||
this.$id = "ace/mode/abc";
|
||||
this.snippetFileId = "ace/snippets/abc";
|
||||
}).call(Mode.prototype);
|
||||
|
||||
exports.Mode = Mode;
|
||||
}); (function() {
|
||||
define("ace/mode/abc_highlight_rules",["require","exports","module","ace/lib/oop","ace/mode/text_highlight_rules"],function(e,t,n){"use strict";var r=e("../lib/oop"),i=e("./text_highlight_rules").TextHighlightRules,s=function(){this.$rules={start:[{token:["zupfnoter.information.comment.line.percentage","information.keyword","in formation.keyword.embedded"],regex:"(%%%%)(hn\\.[a-z]*)(.*)",comment:"Instruction Comment"},{token:["information.comment.line.percentage","information.keyword.embedded"],regex:"(%%)(.*)",comment:"Instruction Comment"},{token:"comment.line.percentage",regex:"%.*",comment:"Comments"},{token:"barline.keyword.operator",regex:"[\\[:]*[|:][|\\]:]*(?:\\[?[0-9]+)?|\\[[0-9]+",comment:"Bar lines"},{token:["information.keyword.embedded","information.argument.string.unquoted"],regex:"(\\[[A-Za-z]:)([^\\]]*\\])",comment:"embedded Header lines"},{token:["information.keyword","information.argument.string.unquoted"],regex:"^([A-Za-z]:)([^%\\\\]*)",comment:"Header lines"},{token:["text","entity.name.function","string.unquoted","text"],regex:"(\\[)([A-Z]:)(.*?)(\\])",comment:"Inline fields"},{token:["accent.constant.language","pitch.constant.numeric","duration.constant.numeric"],regex:"([\\^=_]*)([A-Ga-gz][,']*)([0-9]*/*[><0-9]*)",comment:"Notes"},{token:"zupfnoter.jumptarget.string.quoted",regex:'[\\"!]\\^\\:.*?[\\"!]',comment:"Zupfnoter jumptarget"},{token:"zupfnoter.goto.string.quoted",regex:'[\\"!]\\^\\@.*?[\\"!]',comment:"Zupfnoter goto"},{token:"zupfnoter.annotation.string.quoted",regex:'[\\"!]\\^\\!.*?[\\"!]',comment:"Zupfnoter annoation"},{token:"zupfnoter.annotationref.string.quoted",regex:'[\\"!]\\^\\#.*?[\\"!]',comment:"Zupfnoter annotation reference"},{token:"chordname.string.quoted",regex:'[\\"!]\\^.*?[\\"!]',comment:"abc chord"},{token:"string.quoted",regex:'[\\"!].*?[\\"!]',comment:"abc annotation"}]},this.normalizeRules()};s.metaData={fileTypes:["abc"],name:"ABC",scopeName:"text.abcnotation"},r.inherits(s,i),t.ABCHighlightRules=s}),define("ace/mode/folding/cstyle",["require","exports","module","ace/lib/oop","ace/range","ace/mode/folding/fold_mode"],function(e,t,n){"use strict";var r=e("../../lib/oop"),i=e("../../range").Range,s=e("./fold_mode").FoldMode,o=t.FoldMode=function(e){e&&(this.foldingStartMarker=new RegExp(this.foldingStartMarker.source.replace(/\|[^|]*?$/,"|"+e.start)),this.foldingStopMarker=new RegExp(this.foldingStopMarker.source.replace(/\|[^|]*?$/,"|"+e.end)))};r.inherits(o,s),function(){this.foldingStartMarker=/([\{\[\(])[^\}\]\)]*$|^\s*(\/\*)/,this.foldingStopMarker=/^[^\[\{\(]*([\}\]\)])|^[\s\*]*(\*\/)/,this.singleLineBlockCommentRe=/^\s*(\/\*).*\*\/\s*$/,this.tripleStarBlockCommentRe=/^\s*(\/\*\*\*).*\*\/\s*$/,this.startRegionRe=/^\s*(\/\*|\/\/)#?region\b/,this._getFoldWidgetBase=this.getFoldWidget,this.getFoldWidget=function(e,t,n){var r=e.getLine(n);if(this.singleLineBlockCommentRe.test(r)&&!this.startRegionRe.test(r)&&!this.tripleStarBlockCommentRe.test(r))return"";var i=this._getFoldWidgetBase(e,t,n);return!i&&this.startRegionRe.test(r)?"start":i},this.getFoldWidgetRange=function(e,t,n,r){var i=e.getLine(n);if(this.startRegionRe.test(i))return this.getCommentRegionBlock(e,i,n);var s=i.match(this.foldingStartMarker);if(s){var o=s.index;if(s[1])return this.openingBracketBlock(e,s[1],n,o);var u=e.getCommentFoldRange(n,o+s[0].length,1);return u&&!u.isMultiLine()&&(r?u=this.getSectionRange(e,n):t!="all"&&(u=null)),u}if(t==="markbegin")return;var s=i.match(this.foldingStopMarker);if(s){var o=s.index+s[0].length;return s[1]?this.closingBracketBlock(e,s[1],n,o):e.getCommentFoldRange(n,o,-1)}},this.getSectionRange=function(e,t){var n=e.getLine(t),r=n.search(/\S/),s=t,o=n.length;t+=1;var u=t,a=e.getLength();while(++t<a){n=e.getLine(t);var f=n.search(/\S/);if(f===-1)continue;if(r>f)break;var l=this.getFoldWidgetRange(e,"all",t);if(l){if(l.start.row<=s)break;if(l.isMultiLine())t=l.end.row;else if(r==f)break}u=t}return new i(s,o,u,e.getLine(u).length)},this.getCommentRegionBlock=function(e,t,n){var r=t.search(/\s*$/),s=e.getLength(),o=n,u=/^\s*(?:\/\*|\/\/|--)#?(end)?region\b/,a=1;while(++n<s){t=e.getLine(n);var f=u.exec(t);if(!f)continue;f[1]?a--:a++;if(!a)break}var l=n;if(l>o)return new i(o,r,l,t.length)}}.call(o.prototype)}),define("ace/mode/abc",["require","exports","module","ace/lib/oop","ace/mode/text","ace/mode/abc_highlight_rules","ace/mode/folding/cstyle"],function(e,t,n){"use strict";var r=e("../lib/oop"),i=e("./text").Mode,s=e("./abc_highlight_rules").ABCHighlightRules,o=e("./folding/cstyle").FoldMode,u=function(){this.HighlightRules=s,this.foldingRules=new o,this.$behaviour=this.$defaultBehaviour};r.inherits(u,i),function(){this.lineCommentStart="%",this.$id="ace/mode/abc",this.snippetFileId="ace/snippets/abc"}.call(u.prototype),t.Mode=u}); (function() {
|
||||
window.require(["ace/mode/abc"], function(m) {
|
||||
if (typeof module == "object" && typeof exports == "object" && module) {
|
||||
module.exports = m;
|
||||
}
|
||||
});
|
||||
})();
|
||||
|
||||
File diff suppressed because one or more lines are too long
@@ -1,137 +1,7 @@
|
||||
define("ace/mode/ada_highlight_rules",["require","exports","module","ace/lib/oop","ace/mode/text_highlight_rules"], function(require, exports, module) {
|
||||
"use strict";
|
||||
|
||||
var oop = require("../lib/oop");
|
||||
var TextHighlightRules = require("./text_highlight_rules").TextHighlightRules;
|
||||
|
||||
var AdaHighlightRules = function() {
|
||||
var keywords = "abort|else|new|return|abs|elsif|not|reverse|abstract|end|null|accept|entry|select|" +
|
||||
"access|exception|of|separate|aliased|exit|or|some|all|others|subtype|and|for|out|synchronized|" +
|
||||
"array|function|overriding|at|tagged|generic|package|task|begin|goto|pragma|terminate|" +
|
||||
"body|private|then|if|procedure|type|case|in|protected|constant|interface|until|" +
|
||||
"|is|raise|use|declare|range|delay|limited|record|when|delta|loop|rem|while|digits|renames|with|do|mod|requeue|xor";
|
||||
|
||||
var builtinConstants = (
|
||||
"true|false|null"
|
||||
);
|
||||
|
||||
var builtinFunctions = (
|
||||
"count|min|max|avg|sum|rank|now|coalesce|main"
|
||||
);
|
||||
|
||||
var keywordMapper = this.createKeywordMapper({
|
||||
"support.function": builtinFunctions,
|
||||
"keyword": keywords,
|
||||
"constant.language": builtinConstants
|
||||
}, "identifier", true);
|
||||
|
||||
this.$rules = {
|
||||
"start" : [ {
|
||||
token : "comment",
|
||||
regex : "--.*$"
|
||||
}, {
|
||||
token : "string", // " string
|
||||
regex : '".*?"'
|
||||
}, {
|
||||
token : "string", // character
|
||||
regex : "'.'"
|
||||
}, {
|
||||
token : "constant.numeric", // float
|
||||
regex : "[+-]?\\d+(?:(?:\\.\\d*)?(?:[eE][+-]?\\d+)?)?\\b"
|
||||
}, {
|
||||
token : keywordMapper,
|
||||
regex : "[a-zA-Z_$][a-zA-Z0-9_$]*\\b"
|
||||
}, {
|
||||
token : "keyword.operator",
|
||||
regex : "\\+|\\-|\\/|\\/\\/|%|<@>|@>|<@|&|\\^|~|<|>|<=|=>|==|!=|<>|="
|
||||
}, {
|
||||
token : "paren.lparen",
|
||||
regex : "[\\(]"
|
||||
}, {
|
||||
token : "paren.rparen",
|
||||
regex : "[\\)]"
|
||||
}, {
|
||||
token : "text",
|
||||
regex : "\\s+"
|
||||
} ]
|
||||
};
|
||||
};
|
||||
|
||||
oop.inherits(AdaHighlightRules, TextHighlightRules);
|
||||
|
||||
exports.AdaHighlightRules = AdaHighlightRules;
|
||||
});
|
||||
|
||||
define("ace/mode/ada",["require","exports","module","ace/lib/oop","ace/mode/text","ace/mode/ada_highlight_rules","ace/range"], function(require, exports, module) {
|
||||
"use strict";
|
||||
|
||||
var oop = require("../lib/oop");
|
||||
var TextMode = require("./text").Mode;
|
||||
var AdaHighlightRules = require("./ada_highlight_rules").AdaHighlightRules;
|
||||
var Range = require("../range").Range;
|
||||
|
||||
var Mode = function() {
|
||||
this.HighlightRules = AdaHighlightRules;
|
||||
this.$behaviour = this.$defaultBehaviour;
|
||||
};
|
||||
oop.inherits(Mode, TextMode);
|
||||
|
||||
(function() {
|
||||
|
||||
this.lineCommentStart = "--";
|
||||
|
||||
this.getNextLineIndent = function(state, line, tab) {
|
||||
var indent = this.$getIndent(line);
|
||||
|
||||
var tokenizedLine = this.getTokenizer().getLineTokens(line, state);
|
||||
var tokens = tokenizedLine.tokens;
|
||||
|
||||
if (tokens.length && tokens[tokens.length-1].type == "comment") {
|
||||
return indent;
|
||||
}
|
||||
if (state == "start") {
|
||||
var match = line.match(/^.*(begin|loop|then|is|do)\s*$/);
|
||||
if (match) {
|
||||
indent += tab;
|
||||
}
|
||||
}
|
||||
|
||||
return indent;
|
||||
};
|
||||
|
||||
this.checkOutdent = function(state, line, input) {
|
||||
var complete_line = line + input;
|
||||
if (complete_line.match(/^\s*(begin|end)$/)) {
|
||||
return true;
|
||||
}
|
||||
|
||||
return false;
|
||||
};
|
||||
|
||||
this.autoOutdent = function(state, session, row) {
|
||||
|
||||
var line = session.getLine(row);
|
||||
var prevLine = session.getLine(row - 1);
|
||||
var prevIndent = this.$getIndent(prevLine).length;
|
||||
var indent = this.$getIndent(line).length;
|
||||
if (indent <= prevIndent) {
|
||||
return;
|
||||
}
|
||||
|
||||
session.outdentRows(new Range(row, 0, row + 2, 0));
|
||||
};
|
||||
|
||||
|
||||
this.$id = "ace/mode/ada";
|
||||
}).call(Mode.prototype);
|
||||
|
||||
exports.Mode = Mode;
|
||||
|
||||
}); (function() {
|
||||
define("ace/mode/ada_highlight_rules",["require","exports","module","ace/lib/oop","ace/mode/text_highlight_rules"],function(e,t,n){"use strict";var r=e("../lib/oop"),i=e("./text_highlight_rules").TextHighlightRules,s=function(){var e="abort|else|new|return|abs|elsif|not|reverse|abstract|end|null|accept|entry|select|access|exception|of|separate|aliased|exit|or|some|all|others|subtype|and|for|out|synchronized|array|function|overriding|at|tagged|generic|package|task|begin|goto|pragma|terminate|body|private|then|if|procedure|type|case|in|protected|constant|interface|until||is|raise|use|declare|range|delay|limited|record|when|delta|loop|rem|while|digits|renames|with|do|mod|requeue|xor",t="true|false|null",n="count|min|max|avg|sum|rank|now|coalesce|main",r=this.createKeywordMapper({"support.function":n,keyword:e,"constant.language":t},"identifier",!0);this.$rules={start:[{token:"comment",regex:"--.*$"},{token:"string",regex:'".*?"'},{token:"string",regex:"'.'"},{token:"constant.numeric",regex:"[+-]?\\d+(?:(?:\\.\\d*)?(?:[eE][+-]?\\d+)?)?\\b"},{token:r,regex:"[a-zA-Z_$][a-zA-Z0-9_$]*\\b"},{token:"keyword.operator",regex:"\\+|\\-|\\/|\\/\\/|%|<@>|@>|<@|&|\\^|~|<|>|<=|=>|==|!=|<>|="},{token:"paren.lparen",regex:"[\\(]"},{token:"paren.rparen",regex:"[\\)]"},{token:"text",regex:"\\s+"}]}};r.inherits(s,i),t.AdaHighlightRules=s}),define("ace/mode/ada",["require","exports","module","ace/lib/oop","ace/mode/text","ace/mode/ada_highlight_rules","ace/range"],function(e,t,n){"use strict";var r=e("../lib/oop"),i=e("./text").Mode,s=e("./ada_highlight_rules").AdaHighlightRules,o=e("../range").Range,u=function(){this.HighlightRules=s,this.$behaviour=this.$defaultBehaviour};r.inherits(u,i),function(){this.lineCommentStart="--",this.getNextLineIndent=function(e,t,n){var r=this.$getIndent(t),i=this.getTokenizer().getLineTokens(t,e),s=i.tokens;if(s.length&&s[s.length-1].type=="comment")return r;if(e=="start"){var o=t.match(/^.*(begin|loop|then|is|do)\s*$/);o&&(r+=n)}return r},this.checkOutdent=function(e,t,n){var r=t+n;return r.match(/^\s*(begin|end)$/)?!0:!1},this.autoOutdent=function(e,t,n){var r=t.getLine(n),i=t.getLine(n-1),s=this.$getIndent(i).length,u=this.$getIndent(r).length;if(u<=s)return;t.outdentRows(new o(n,0,n+2,0))},this.$id="ace/mode/ada"}.call(u.prototype),t.Mode=u}); (function() {
|
||||
window.require(["ace/mode/ada"], function(m) {
|
||||
if (typeof module == "object" && typeof exports == "object" && module) {
|
||||
module.exports = m;
|
||||
}
|
||||
});
|
||||
})();
|
||||
|
||||
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
@@ -1,102 +1,7 @@
|
||||
define("ace/mode/aql_highlight_rules",["require","exports","module","ace/lib/oop","ace/mode/text_highlight_rules"], function(require, exports, module) {
|
||||
"use strict";
|
||||
|
||||
var oop = require("../lib/oop");
|
||||
var TextHighlightRules = require("./text_highlight_rules").TextHighlightRules;
|
||||
|
||||
var AqlHighlightRules = function() {
|
||||
|
||||
var keywords = (
|
||||
"for|search|outbound|inbound|any|graph|prune|options|shortest_path|to|in|return|filter|sort|limit|let|collect|remove|update|replace|insers|upsert|with"
|
||||
);
|
||||
|
||||
var builtinConstants = (
|
||||
"true|false"
|
||||
);
|
||||
|
||||
var builtinFunctions = (
|
||||
"append|contains_array|count|count_distinct|count_unique|first|flatten|intersection|last|length|minus|nth|outersection|pop|position|push|remove_nth|remove_value|remove_values|reverse|shift|slice|sorted|sorted_unique|union|union_distinct|unique|unshift|" +
|
||||
"date_now|date_iso8601|date_timestamp|is_datestring|date_dayofweek|date_year|date_month|date_day|date_hour|date_minute|date_second|date_millisecond|date_dayofyear|date_isoweek|date_leapyear|date_quarter|date_days_in_month|date_trunc|date_format|date_add|date_subtract|date_diff|date_compare|" +
|
||||
"attributes|count|has|is_same_collection|keep|length|matches|merge|merge_recursive|parse_identifier|translate|unset|unset_recursive|values|zip|" +
|
||||
"fulltext|" +
|
||||
"distance|geo_contains|geo_distance|geo_equals|geo_intersects|is_in_polygon|" +
|
||||
"not_null|first_list|first_document|check_document|collection_count|collections|count|current_user|document|length|hash|apply|assert|/ warn|call|fail|noopt|passthru|sleep|v8|version|" +
|
||||
"abs|acos|asin|atan|atan2|average|avg|ceil|cos|degrees|exp|exp2|floor|log|log2|log10|max|median|min|percentile|pi|pow|radians|rand|range|round|sin|sqrt|stddev_population|stddev_sample|stddev|sum|tan|variance_population|variance_sample|variance|" +
|
||||
"char_length|concat|concat_separator|contains|count|encode_uri_component|find_first|find_last|json_parse|json_stringify|left|length|levenshtein_distance|like|lower|ltrim|md5|random_token|regex_matches|regex_split|regex_test|regex_replace|reverse|right|rtrim|sha1|sha512|split|soundex|substitute|substring|tokens|to_base64|to_hex|trim|upper|uuid|" +
|
||||
"to_bool|to_number|to_string|to_array|to_list|is_null|is_bool|is_number|is_string|is_array|is_list|is_object|is_document|is_datestring|is_key|typename|"
|
||||
);
|
||||
|
||||
var keywordMapper = this.createKeywordMapper({
|
||||
"support.function": builtinFunctions,
|
||||
"keyword": keywords,
|
||||
"constant.language": builtinConstants
|
||||
}, "identifier", true);
|
||||
|
||||
this.$rules = {
|
||||
"start" : [ {
|
||||
token : "comment",
|
||||
regex : "//.*$"
|
||||
}, {
|
||||
token : "string", // " string
|
||||
regex : '".*?"'
|
||||
}, {
|
||||
token : "string", // ' string
|
||||
regex : "'.*?'"
|
||||
}, {
|
||||
token : "constant.numeric", // float
|
||||
regex : "[+-]?\\d+(?:(?:\\.\\d*)?(?:[eE][+-]?\\d+)?)?\\b"
|
||||
}, {
|
||||
token : keywordMapper,
|
||||
regex : "[a-zA-Z_$][a-zA-Z0-9_$]*\\b"
|
||||
}, {
|
||||
token : "keyword.operator",
|
||||
regex : "\\+|\\-|\\/|\\/\\/|%|<@>|@>|<@|&|\\^|~|<|>|<=|=>|==|!=|<>|="
|
||||
}, {
|
||||
token : "paren.lparen",
|
||||
regex : "[\\(]"
|
||||
}, {
|
||||
token : "paren.rparen",
|
||||
regex : "[\\)]"
|
||||
}, {
|
||||
token : "text",
|
||||
regex : "\\s+"
|
||||
} ]
|
||||
};
|
||||
this.normalizeRules();
|
||||
};
|
||||
|
||||
oop.inherits(AqlHighlightRules, TextHighlightRules);
|
||||
|
||||
exports.AqlHighlightRules = AqlHighlightRules;
|
||||
});
|
||||
|
||||
define("ace/mode/aql",["require","exports","module","ace/lib/oop","ace/mode/text","ace/mode/aql_highlight_rules"], function(require, exports, module) {
|
||||
"use strict";
|
||||
|
||||
var oop = require("../lib/oop");
|
||||
var TextMode = require("./text").Mode;
|
||||
var AqlHighlightRules = require("./aql_highlight_rules").AqlHighlightRules;
|
||||
|
||||
var Mode = function() {
|
||||
this.HighlightRules = AqlHighlightRules;
|
||||
this.$behaviour = this.$defaultBehaviour;
|
||||
};
|
||||
oop.inherits(Mode, TextMode);
|
||||
|
||||
(function() {
|
||||
|
||||
this.lineCommentStart = "//";
|
||||
|
||||
this.$id = "ace/mode/aql";
|
||||
}).call(Mode.prototype);
|
||||
|
||||
exports.Mode = Mode;
|
||||
|
||||
}); (function() {
|
||||
define("ace/mode/aql_highlight_rules",["require","exports","module","ace/lib/oop","ace/mode/text_highlight_rules"],function(e,t,n){"use strict";var r=e("../lib/oop"),i=e("./text_highlight_rules").TextHighlightRules,s=function(){var e="for|return|filter|search|sort|limit|let|collect|asc|desc|in|into|insert|update|remove|replace|upsert|options|with|and|or|not|distinct|graph|shortest_path|outbound|inbound|any|all|none|at least|aggregate|like|k_shortest_paths|k_paths|all_shortest_paths|prune|window",t="true|false",n="to_bool|to_number|to_string|to_array|to_list|is_null|is_bool|is_number|is_string|is_array|is_list|is_object|is_document|is_datestring|typename|json_stringify|json_parse|concat|concat_separator|char_length|lower|upper|substring|left|right|trim|reverse|contains|log|log2|log10|exp|exp2|sin|cos|tan|asin|acos|atan|atan2|radians|degrees|pi|regex_test|regex_replace|like|floor|ceil|round|abs|rand|sqrt|pow|length|count|min|max|average|avg|sum|product|median|variance_population|variance_sample|variance|percentile|bit_and|bit_or|bit_xor|bit_negate|bit_test|bit_popcount|bit_shift_left|bit_shift_right|bit_construct|bit_deconstruct|bit_to_string|bit_from_string|first|last|unique|outersection|interleave|in_range|jaccard|matches|merge|merge_recursive|has|attributes|keys|values|unset|unset_recursive|keep|keep_recursive|near|within|within_rectangle|is_in_polygon|distance|fulltext|stddev_sample|stddev_population|stddev|slice|nth|position|contains_array|translate|zip|call|apply|push|append|pop|shift|unshift|remove_value|remove_values|remove_nth|replace_nth|date_now|date_timestamp|date_iso8601|date_dayofweek|date_year|date_month|date_day|date_hour|date_minute|date_second|date_millisecond|date_dayofyear|date_isoweek|date_isoweekyear|date_leapyear|date_quarter|date_days_in_month|date_trunc|date_round|date_add|date_subtract|date_diff|date_compare|date_format|date_utctolocal|date_localtoutc|date_timezone|date_timezones|fail|passthru|v8|sleep|schema_get|schema_validate|shard_id|call_greenspun|version|noopt|noeval|not_null|first_list|first_document|parse_identifier|current_user|current_database|collection_count|pregel_result|collections|document|decode_rev|range|union|union_distinct|minus|intersection|flatten|is_same_collection|check_document|ltrim|rtrim|find_first|find_last|split|substitute|ipv4_to_number|ipv4_from_number|is_ipv4|md5|sha1|sha512|crc32|fnv64|hash|random_token|to_base64|to_hex|encode_uri_component|soundex|assert|warn|is_key|sorted|sorted_unique|count_distinct|count_unique|levenshtein_distance|levenshtein_match|regex_matches|regex_split|ngram_match|ngram_similarity|ngram_positional_similarity|uuid|tokens|exists|starts_with|phrase|min_match|bm25|tfidf|boost|analyzer|cosine_similarity|decay_exp|decay_gauss|decay_linear|l1_distance|l2_distance|minhash|minhash_count|minhash_error|minhash_match|geo_point|geo_multipoint|geo_polygon|geo_multipolygon|geo_linestring|geo_multilinestring|geo_contains|geo_intersects|geo_equals|geo_distance|geo_area|geo_in_range",r=this.createKeywordMapper({"support.function":n,keyword:e,"constant.language":t},"identifier",!0);this.$rules={start:[{token:"comment",regex:"//.*$"},{token:"string",regex:'".*?"'},{token:"string",regex:"'.*?'"},{token:"constant.numeric",regex:"[+-]?\\d+(?:(?:\\.\\d*)?(?:[eE][+-]?\\d+)?)?\\b"},{token:r,regex:"[a-zA-Z_$][a-zA-Z0-9_$]*\\b"},{token:"keyword.operator",regex:"\\+|\\-|\\/|\\/\\/|%|<@>|@>|<@|&|\\^|~|<|>|<=|=>|==|!=|<>|="},{token:"paren.lparen",regex:"[\\(]"},{token:"paren.rparen",regex:"[\\)]"},{token:"text",regex:"\\s+"}]},this.normalizeRules()};r.inherits(s,i),t.AqlHighlightRules=s}),define("ace/mode/aql",["require","exports","module","ace/lib/oop","ace/mode/text","ace/mode/aql_highlight_rules"],function(e,t,n){"use strict";var r=e("../lib/oop"),i=e("./text").Mode,s=e("./aql_highlight_rules").AqlHighlightRules,o=function(){this.HighlightRules=s,this.$behaviour=this.$defaultBehaviour};r.inherits(o,i),function(){this.lineCommentStart="//",this.$id="ace/mode/aql"}.call(o.prototype),t.Mode=o}); (function() {
|
||||
window.require(["ace/mode/aql"], function(m) {
|
||||
if (typeof module == "object" && typeof exports == "object" && module) {
|
||||
module.exports = m;
|
||||
}
|
||||
});
|
||||
})();
|
||||
|
||||
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
7
htdocs/includes/ace/src/mode-assembly_arm32.js
Normal file
7
htdocs/includes/ace/src/mode-assembly_arm32.js
Normal file
@@ -0,0 +1,7 @@
|
||||
define("ace/mode/assembly_arm32_highlight_rules",["require","exports","module","ace/lib/oop","ace/mode/text_highlight_rules"],function(e,t,n){"use strict";var r=e("../lib/oop"),i=e("./text_highlight_rules").TextHighlightRules,s=function(){this.$rules={start:[{token:"keyword.control.assembly",regex:"\\b(?:cpsid|cpsie|cps|setend|(?:srs|rfe)(?:ia|ib|da|db|fd|ed|fa|ea)|bkpt|nop|pld|cdp2|mrc2|mrrc2|mcr2|mcrr2|ldc2|stc2|(?:add|adc|sub|sbc|rsb|rsc|mul|mla|umull|umlal|smull|smlal|mvn|and|eor|orr|bic)(?:eq|ne|cs|hs|cc|lo|mi|pl|vs|vc|hi|ls|ge|lt|gt|le|al)?s?|(?:(?:q|qd)?(?:add|sub)|umaal|smul(?:b|t)(?:b|t)|smulw(?:b|t)|smla(?:b|t)(?:b|t)|smlaw(?:b|t)|smlal(?:b|t)(?:b|t)|smuadx?|smladx?|smlaldx?|smusdx?|smlsdx?|smlsldx?|smmulr?|smmlar?|smmlsr?|mia|miaph|mia(?:b|t)(?:b|t)|clz|(?:s|q|sh|u|uq|uh)(?:add16|sub16|add8|sub8|addsubx|subaddx)|usad8|usada8|mrs|msr|mra|mar|cpy|tst|teq|cmp|cmn|ssat|ssat16|usat|usat16|pkhbt|pkhtb|sxth|sxtb16|sxtb|uxth|uxtb16|uxtb|sxtah|sxtab16|sxtab|uxtah|uxtab16|uxtab|rev|rev16|revsh|sel|b|bl|bx|blx|bxj|swi|svc|ldrex|strex|cdp|mrc|mrrc|mcr|mcrr|ldc|stc)(?:eq|ne|cs|hs|cc|lo|mi|pl|vs|vc|hi|ls|ge|lt|gt|le|al)?|ldr(?:eq|ne|cs|hs|cc|lo|mi|pl|vs|vc|hi|ls|ge|lt|gt|le|al)?(?:t|b|bt|sb|h|sh|d)?|str(?:eq|ne|cs|hs|cc|lo|mi|pl|vs|vc|hi|ls|ge|lt|gt|le|al)?(?:t|b|bt|h|d)?|(?:ldm|stm)(?:eq|ne|cs|hs|cc|lo|mi|pl|vs|vc|hi|ls|ge|lt|gt|le|al)?(?:ia|ib|da|db|fd|ed|fa|ea)|swp(?:eq|ne|cs|hs|cc|lo|mi|pl|vs|vc|hi|ls|ge|lt|gt|le|al)?b?|mov(?:t|w)?)\\b",caseInsensitive:!0},{token:"variable.parameter.register.assembly",regex:"\\b(?:r0|r1|r2|r3|r4|r5|r6|r7|r8|r9|r10|r11|r12|r13|r14|r15|fp|ip|sp|lr|pc|cpsr|spsr|c|f|s|x|lsl|lsr|asr|ror|rrx)\\b",caseInsensitive:!0},{token:"constant.character.hexadecimal.assembly",regex:"#0x[A-F0-9]+",caseInsensitive:!0},{token:"constant.character.decimal.assembly",regex:"#[0-9]+"},{token:"string.assembly",regex:/'([^\\']|\\.)*'/},{token:"string.assembly",regex:/"([^\\"]|\\.)*"/},{token:"support.function.directive.assembly",regex:"(?:.section|.global|.text|.asciz|.asciiz|.ascii|.align|.byte|.end|.data|.equ|.extern|.include)"},{token:"entity.name.function.assembly",regex:"^\\s*%%[\\w.]+?:$"},{token:"entity.name.function.assembly",regex:"^\\s*%\\$[\\w.]+?:$"},{token:"entity.name.function.assembly",regex:"^[\\w.]+?:"},{token:"entity.name.function.assembly",regex:"^[\\w.]+?\\b"},{token:"comment.assembly",regex:"\\/\\*",next:"comment"},{token:"comment.assembly",regex:"(?:;|//|@).*$"}],comment:[{token:"comment.assembly",regex:"\\*\\/",next:"start"},{defaultToken:"comment"}]},this.normalizeRules()};s.metaData={fileTypes:["s"],name:"Assembly ARM32",scopeName:"source.assembly"},r.inherits(s,i),t.AssemblyARM32HighlightRules=s}),define("ace/mode/folding/coffee",["require","exports","module","ace/lib/oop","ace/mode/folding/fold_mode","ace/range"],function(e,t,n){"use strict";var r=e("../../lib/oop"),i=e("./fold_mode").FoldMode,s=e("../../range").Range,o=t.FoldMode=function(){};r.inherits(o,i),function(){this.commentBlock=function(e,t){var n=/\S/,r=e.getLine(t),i=r.search(n);if(i==-1||r[i]!="#")return;var o=r.length,u=e.getLength(),a=t,f=t;while(++t<u){r=e.getLine(t);var l=r.search(n);if(l==-1)continue;if(r[l]!="#")break;f=t}if(f>a){var c=e.getLine(f).length;return new s(a,o,f,c)}},this.getFoldWidgetRange=function(e,t,n){var r=this.indentationBlock(e,n);if(r)return r;r=this.commentBlock(e,n);if(r)return r},this.getFoldWidget=function(e,t,n){var r=e.getLine(n),i=r.search(/\S/),s=e.getLine(n+1),o=e.getLine(n-1),u=o.search(/\S/),a=s.search(/\S/);if(i==-1)return e.foldWidgets[n-1]=u!=-1&&u<a?"start":"","";if(u==-1){if(i==a&&r[i]=="#"&&s[i]=="#")return e.foldWidgets[n-1]="",e.foldWidgets[n+1]="","start"}else if(u==i&&r[i]=="#"&&o[i]=="#"&&e.getLine(n-2).search(/\S/)==-1)return e.foldWidgets[n-1]="start",e.foldWidgets[n+1]="","";return u!=-1&&u<i?e.foldWidgets[n-1]="start":e.foldWidgets[n-1]="",i<a?"start":""}}.call(o.prototype)}),define("ace/mode/assembly_arm32",["require","exports","module","ace/lib/oop","ace/mode/text","ace/mode/assembly_arm32_highlight_rules","ace/mode/folding/coffee"],function(e,t,n){"use strict";var r=e("../lib/oop"),i=e("./text").Mode,s=e("./assembly_arm32_highlight_rules").AssemblyARM32HighlightRules,o=e("./folding/coffee").FoldMode,u=function(){this.HighlightRules=s,this.foldingRules=new o,this.$behaviour=this.$defaultBehaviour};r.inherits(u,i),function(){this.lineCommentStart=[";"],this.blockComment={start:"/*",end:"*/"},this.$id="ace/mode/assembly_arm32"}.call(u.prototype),t.Mode=u}); (function() {
|
||||
window.require(["ace/mode/assembly_arm32"], function(m) {
|
||||
if (typeof module == "object" && typeof exports == "object" && module) {
|
||||
module.exports = m;
|
||||
}
|
||||
});
|
||||
})();
|
||||
File diff suppressed because one or more lines are too long
7
htdocs/includes/ace/src/mode-astro.js
Normal file
7
htdocs/includes/ace/src/mode-astro.js
Normal file
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
7
htdocs/includes/ace/src/mode-basic.js
Normal file
7
htdocs/includes/ace/src/mode-basic.js
Normal file
@@ -0,0 +1,7 @@
|
||||
define("ace/mode/basic_highlight_rules",["require","exports","module","ace/lib/oop","ace/mode/text_highlight_rules"],function(e,t,n){"use strict";var r=e("../lib/oop"),i=e("./text_highlight_rules").TextHighlightRules,s=function(){var e=this.createKeywordMapper({"keyword.control":"FOR|TO|NEXT|GOSUB|RETURN|IF|THEN|ELSE|GOTO|ON|WHILE|WEND|TRON|TROFF","entity.name":"Auto|Call|Chain|Clear|Close|Common|Cont|Data|MERGE|ALL|Delete|DIM|EDIT|END|ERASE|ERROR|FIELD|GET|INPUT|KILL|LET|LIST|LLIST|LOAD|LSET|RSET|MERGE|NEW|NULL|OPEN|OUT|POKE|PRINT|PUT|RANDOMIZE|READ|RENUM|RESTORE|RESUME|RUN|SAVE|STOP|SWAP|WAIT|WIDTH","keyword.operator":"Mod|And|Not|Or|Xor|Eqv|Imp","support.function":"ABS|ASC|ATN|CDBL|CINT|COS|CSNG|CVI|CVS|CVD|EOF|EXP|FIX|FRE|INP|INSTR|INT|LEN|LOC|LOG|LPOS|PEEK|POS|RND|SGN|SIN|SPC|SQR|TAB|TAN|USR|VAL|VARPTR"},"identifier",!0);this.$rules={start:[{token:"string",regex:/"(?:\\.|[^"\\])*"/},{token:"support.function",regex:/(HEX|CHR|INPUT|LEFT|MID|MKI|MKS|MKD|OCT|RIGHT|SPACE|STR|STRING)\$/},{token:"entity.name",regex:/(?:DEF\s(?:SEG|USR|FN[a-zA-Z]+)|LINE\sINPUT|L?PRINT#?(?:\sUSING)?|MID\$|ON\sERROR\sGOTO|OPTION\sBASE|WRITE#?|DATE\$|INKEY\$|TIME\$)/},{token:"variable",regex:/[a-zA-Z][a-zA-Z0-9_]{0,38}[$%!#]?(?=\s*=)/},{token:"keyword.operator",regex:/\\|=|\^|\*|\/|\+|\-|<|>|-/},{token:"paren.lparen",regex:/[([]/},{token:"paren.rparen",regex:/[\)\]]/},{token:"constant.numeric",regex:/[+-]?\d+(\.\d+)?([ED][+-]?\d+)?(?:[!#])?/},{token:"constant.numeric",regex:/&[HO]?[0-9A-F]+/},{token:"comment",regex:/REM\s+.*$/},{regex:"\\w+",token:e},{token:"punctiation",regex:/[,;]/}]},this.normalizeRules()};r.inherits(s,i),t.BasicHighlightRules=s}),define("ace/mode/folding/basic",["require","exports","module","ace/lib/oop","ace/mode/folding/fold_mode","ace/range","ace/token_iterator"],function(e,t,n){"use strict";var r=e("../../lib/oop"),i=e("./fold_mode").FoldMode,s=e("../../range").Range,o=e("../../token_iterator").TokenIterator,u=t.FoldMode=function(){};r.inherits(u,i),function(){this.indentKeywords={tron:1,"while":1,"for":1,troff:-1,wend:-1,next:-1},this.foldingStartMarker=/(?:\s|^)(tron|while|for)\b/i,this.foldingStopMarker=/(?:\b)(troff|next|wend)\b/i,this.getFoldWidgetRange=function(e,t,n){var r=e.getLine(n),i=this.foldingStartMarker.test(r),s=this.foldingStopMarker.test(r);if(i||s){var o=s?this.foldingStopMarker.exec(r):this.foldingStartMarker.exec(r),u=o&&o[1].toLowerCase();if(u){var a=e.getTokenAt(n,o.index+2).type;if(a==="keyword.control")return this.basicBlock(e,n,o.index+2)}}},this.getFoldWidget=function(e,t,n){var r=e.getLine(n),i=this.foldingStartMarker.test(r),s=this.foldingStopMarker.test(r);if(i&&!s){var o=this.foldingStartMarker.exec(r),u=o&&o[1].toLowerCase();if(u){var a=e.getTokenAt(n,o.index+2).type;if(a=="keyword.control")return"start"}}if(t!="markbeginend"||!s||i&&s)return"";var o=r.match(this.foldingStopMarker),u=o&&o[1].toLowerCase();return this.indentKeywords[u]&&e.getTokenAt(n,o.index+2).type==="keyword.control"?"end":""},this.basicBlock=function(e,t,n,r){var i=new o(e,t,n),u=i.getCurrentToken();if(!u||u.type!="keyword.control")return;var a=u.value.toLowerCase(),f=[a],l=this.indentKeywords[a];if(!l)return;var c=l===-1?i.getCurrentTokenColumn():e.getLine(t).length,h=t;i.step=l===-1?i.stepBackward:i.stepForward;while(u=i.step()){a=u.value.toLowerCase();if(u.type!=="keyword.control"||!this.indentKeywords[a])continue;var p=l*this.indentKeywords[a];p>0?f.unshift(a):p<=0&&f.shift();if(f.length===0)break}if(!u)return null;if(r)return i.getCurrentTokenRange();var t=i.getCurrentTokenRow();return l===-1?new s(t,e.getLine(t).length,h,c):new s(h,c,t,i.getCurrentTokenColumn())}}.call(u.prototype)}),define("ace/mode/basic",["require","exports","module","ace/lib/oop","ace/mode/text","ace/mode/basic_highlight_rules","ace/mode/folding/basic"],function(e,t,n){"use strict";var r=e("../lib/oop"),i=e("./text").Mode,s=e("./basic_highlight_rules").BasicHighlightRules,o=e("./folding/basic").FoldMode,u=function(){this.HighlightRules=s,this.foldingRules=new o,this.$behaviour=this.$defaultBehaviour,this.indentKeywords=this.foldingRules.indentKeywords};r.inherits(u,i),function(){this.lineCommentStart=["REM"],this.getMatching=function(e,t,n,r){if(t==undefined){var i=e.selection.lead;n=i.column,t=i.row}r==undefined&&(r=!0);var s=e.getTokenAt(t,n);if(s){var o=s.value.toLowerCase();if(o in this.indentKeywords)return this.foldingRules.basicBlock(e,t,n,r)}},this.$id="ace/mode/basic"}.call(u.prototype),t.Mode=u}); (function() {
|
||||
window.require(["ace/mode/basic"], function(m) {
|
||||
if (typeof module == "object" && typeof exports == "object" && module) {
|
||||
module.exports = m;
|
||||
}
|
||||
});
|
||||
})();
|
||||
@@ -1,230 +1,7 @@
|
||||
define("ace/mode/batchfile_highlight_rules",["require","exports","module","ace/lib/oop","ace/mode/text_highlight_rules"], function(require, exports, module) {
|
||||
"use strict";
|
||||
|
||||
var oop = require("../lib/oop");
|
||||
var TextHighlightRules = require("./text_highlight_rules").TextHighlightRules;
|
||||
|
||||
var BatchFileHighlightRules = function() {
|
||||
|
||||
this.$rules = { start:
|
||||
[ { token: 'keyword.command.dosbatch',
|
||||
regex: '\\b(?:append|assoc|at|attrib|break|cacls|cd|chcp|chdir|chkdsk|chkntfs|cls|cmd|color|comp|compact|convert|copy|date|del|dir|diskcomp|diskcopy|doskey|echo|endlocal|erase|fc|find|findstr|format|ftype|graftabl|help|keyb|label|md|mkdir|mode|more|move|path|pause|popd|print|prompt|pushd|rd|recover|ren|rename|replace|restore|rmdir|set|setlocal|shift|sort|start|subst|time|title|tree|type|ver|verify|vol|xcopy)\\b',
|
||||
caseInsensitive: true },
|
||||
{ token: 'keyword.control.statement.dosbatch',
|
||||
regex: '\\b(?:goto|call|exit)\\b',
|
||||
caseInsensitive: true },
|
||||
{ token: 'keyword.control.conditional.if.dosbatch',
|
||||
regex: '\\bif\\s+not\\s+(?:exist|defined|errorlevel|cmdextversion)\\b',
|
||||
caseInsensitive: true },
|
||||
{ token: 'keyword.control.conditional.dosbatch',
|
||||
regex: '\\b(?:if|else)\\b',
|
||||
caseInsensitive: true },
|
||||
{ token: 'keyword.control.repeat.dosbatch',
|
||||
regex: '\\bfor\\b',
|
||||
caseInsensitive: true },
|
||||
{ token: 'keyword.operator.dosbatch',
|
||||
regex: '\\b(?:EQU|NEQ|LSS|LEQ|GTR|GEQ)\\b' },
|
||||
{ token: ['doc.comment', 'comment'],
|
||||
regex: '(?:^|\\b)(rem)($|\\s.*$)',
|
||||
caseInsensitive: true },
|
||||
{ token: 'comment.line.colons.dosbatch',
|
||||
regex: '::.*$' },
|
||||
{ include: 'variable' },
|
||||
{ token: 'punctuation.definition.string.begin.shell',
|
||||
regex: '"',
|
||||
push: [
|
||||
{ token: 'punctuation.definition.string.end.shell', regex: '"', next: 'pop' },
|
||||
{ include: 'variable' },
|
||||
{ defaultToken: 'string.quoted.double.dosbatch' } ] },
|
||||
{ token: 'keyword.operator.pipe.dosbatch', regex: '[|]' },
|
||||
{ token: 'keyword.operator.redirect.shell',
|
||||
regex: '&>|\\d*>&\\d*|\\d*(?:>>|>|<)|\\d*<&|\\d*<>' } ],
|
||||
variable: [
|
||||
{ token: 'constant.numeric', regex: '%%\\w+|%[*\\d]|%\\w+%'},
|
||||
{ token: 'constant.numeric', regex: '%~\\d+'},
|
||||
{ token: ['markup.list', 'constant.other', 'markup.list'],
|
||||
regex: '(%)(\\w+)(%?)' }]};
|
||||
|
||||
this.normalizeRules();
|
||||
};
|
||||
|
||||
BatchFileHighlightRules.metaData = { name: 'Batch File',
|
||||
scopeName: 'source.dosbatch',
|
||||
fileTypes: [ 'bat' ] };
|
||||
|
||||
|
||||
oop.inherits(BatchFileHighlightRules, TextHighlightRules);
|
||||
|
||||
exports.BatchFileHighlightRules = BatchFileHighlightRules;
|
||||
});
|
||||
|
||||
define("ace/mode/folding/cstyle",["require","exports","module","ace/lib/oop","ace/range","ace/mode/folding/fold_mode"], function(require, exports, module) {
|
||||
"use strict";
|
||||
|
||||
var oop = require("../../lib/oop");
|
||||
var Range = require("../../range").Range;
|
||||
var BaseFoldMode = require("./fold_mode").FoldMode;
|
||||
|
||||
var FoldMode = exports.FoldMode = function(commentRegex) {
|
||||
if (commentRegex) {
|
||||
this.foldingStartMarker = new RegExp(
|
||||
this.foldingStartMarker.source.replace(/\|[^|]*?$/, "|" + commentRegex.start)
|
||||
);
|
||||
this.foldingStopMarker = new RegExp(
|
||||
this.foldingStopMarker.source.replace(/\|[^|]*?$/, "|" + commentRegex.end)
|
||||
);
|
||||
}
|
||||
};
|
||||
oop.inherits(FoldMode, BaseFoldMode);
|
||||
|
||||
(function() {
|
||||
|
||||
this.foldingStartMarker = /([\{\[\(])[^\}\]\)]*$|^\s*(\/\*)/;
|
||||
this.foldingStopMarker = /^[^\[\{\(]*([\}\]\)])|^[\s\*]*(\*\/)/;
|
||||
this.singleLineBlockCommentRe= /^\s*(\/\*).*\*\/\s*$/;
|
||||
this.tripleStarBlockCommentRe = /^\s*(\/\*\*\*).*\*\/\s*$/;
|
||||
this.startRegionRe = /^\s*(\/\*|\/\/)#?region\b/;
|
||||
this._getFoldWidgetBase = this.getFoldWidget;
|
||||
this.getFoldWidget = function(session, foldStyle, row) {
|
||||
var line = session.getLine(row);
|
||||
|
||||
if (this.singleLineBlockCommentRe.test(line)) {
|
||||
if (!this.startRegionRe.test(line) && !this.tripleStarBlockCommentRe.test(line))
|
||||
return "";
|
||||
}
|
||||
|
||||
var fw = this._getFoldWidgetBase(session, foldStyle, row);
|
||||
|
||||
if (!fw && this.startRegionRe.test(line))
|
||||
return "start"; // lineCommentRegionStart
|
||||
|
||||
return fw;
|
||||
};
|
||||
|
||||
this.getFoldWidgetRange = function(session, foldStyle, row, forceMultiline) {
|
||||
var line = session.getLine(row);
|
||||
|
||||
if (this.startRegionRe.test(line))
|
||||
return this.getCommentRegionBlock(session, line, row);
|
||||
|
||||
var match = line.match(this.foldingStartMarker);
|
||||
if (match) {
|
||||
var i = match.index;
|
||||
|
||||
if (match[1])
|
||||
return this.openingBracketBlock(session, match[1], row, i);
|
||||
|
||||
var range = session.getCommentFoldRange(row, i + match[0].length, 1);
|
||||
|
||||
if (range && !range.isMultiLine()) {
|
||||
if (forceMultiline) {
|
||||
range = this.getSectionRange(session, row);
|
||||
} else if (foldStyle != "all")
|
||||
range = null;
|
||||
}
|
||||
|
||||
return range;
|
||||
}
|
||||
|
||||
if (foldStyle === "markbegin")
|
||||
return;
|
||||
|
||||
var match = line.match(this.foldingStopMarker);
|
||||
if (match) {
|
||||
var i = match.index + match[0].length;
|
||||
|
||||
if (match[1])
|
||||
return this.closingBracketBlock(session, match[1], row, i);
|
||||
|
||||
return session.getCommentFoldRange(row, i, -1);
|
||||
}
|
||||
};
|
||||
|
||||
this.getSectionRange = function(session, row) {
|
||||
var line = session.getLine(row);
|
||||
var startIndent = line.search(/\S/);
|
||||
var startRow = row;
|
||||
var startColumn = line.length;
|
||||
row = row + 1;
|
||||
var endRow = row;
|
||||
var maxRow = session.getLength();
|
||||
while (++row < maxRow) {
|
||||
line = session.getLine(row);
|
||||
var indent = line.search(/\S/);
|
||||
if (indent === -1)
|
||||
continue;
|
||||
if (startIndent > indent)
|
||||
break;
|
||||
var subRange = this.getFoldWidgetRange(session, "all", row);
|
||||
|
||||
if (subRange) {
|
||||
if (subRange.start.row <= startRow) {
|
||||
break;
|
||||
} else if (subRange.isMultiLine()) {
|
||||
row = subRange.end.row;
|
||||
} else if (startIndent == indent) {
|
||||
break;
|
||||
}
|
||||
}
|
||||
endRow = row;
|
||||
}
|
||||
|
||||
return new Range(startRow, startColumn, endRow, session.getLine(endRow).length);
|
||||
};
|
||||
this.getCommentRegionBlock = function(session, line, row) {
|
||||
var startColumn = line.search(/\s*$/);
|
||||
var maxRow = session.getLength();
|
||||
var startRow = row;
|
||||
|
||||
var re = /^\s*(?:\/\*|\/\/|--)#?(end)?region\b/;
|
||||
var depth = 1;
|
||||
while (++row < maxRow) {
|
||||
line = session.getLine(row);
|
||||
var m = re.exec(line);
|
||||
if (!m) continue;
|
||||
if (m[1]) depth--;
|
||||
else depth++;
|
||||
|
||||
if (!depth) break;
|
||||
}
|
||||
|
||||
var endRow = row;
|
||||
if (endRow > startRow) {
|
||||
return new Range(startRow, startColumn, endRow, line.length);
|
||||
}
|
||||
};
|
||||
|
||||
}).call(FoldMode.prototype);
|
||||
|
||||
});
|
||||
|
||||
define("ace/mode/batchfile",["require","exports","module","ace/lib/oop","ace/mode/text","ace/mode/batchfile_highlight_rules","ace/mode/folding/cstyle"], function(require, exports, module) {
|
||||
"use strict";
|
||||
|
||||
var oop = require("../lib/oop");
|
||||
var TextMode = require("./text").Mode;
|
||||
var BatchFileHighlightRules = require("./batchfile_highlight_rules").BatchFileHighlightRules;
|
||||
var FoldMode = require("./folding/cstyle").FoldMode;
|
||||
|
||||
var Mode = function() {
|
||||
this.HighlightRules = BatchFileHighlightRules;
|
||||
this.foldingRules = new FoldMode();
|
||||
this.$behaviour = this.$defaultBehaviour;
|
||||
};
|
||||
oop.inherits(Mode, TextMode);
|
||||
|
||||
(function() {
|
||||
this.lineCommentStart = "::";
|
||||
this.blockComment = "";
|
||||
this.$id = "ace/mode/batchfile";
|
||||
}).call(Mode.prototype);
|
||||
|
||||
exports.Mode = Mode;
|
||||
}); (function() {
|
||||
define("ace/mode/batchfile_highlight_rules",["require","exports","module","ace/lib/oop","ace/mode/text_highlight_rules"],function(e,t,n){"use strict";var r=e("../lib/oop"),i=e("./text_highlight_rules").TextHighlightRules,s=function(){this.$rules={start:[{token:"keyword.command.dosbatch",regex:"\\b(?:append|assoc|at|attrib|break|cacls|cd|chcp|chdir|chkdsk|chkntfs|cls|cmd|color|comp|compact|convert|copy|date|del|dir|diskcomp|diskcopy|doskey|echo|endlocal|erase|fc|find|findstr|format|ftype|graftabl|help|keyb|label|md|mkdir|mode|more|move|path|pause|popd|print|prompt|pushd|rd|recover|ren|rename|replace|restore|rmdir|set|setlocal|shift|sort|start|subst|time|title|tree|type|ver|verify|vol|xcopy)\\b",caseInsensitive:!0},{token:"keyword.control.statement.dosbatch",regex:"\\b(?:goto|call|exit)\\b",caseInsensitive:!0},{token:"keyword.control.conditional.if.dosbatch",regex:"\\bif\\s+not\\s+(?:exist|defined|errorlevel|cmdextversion)\\b",caseInsensitive:!0},{token:"keyword.control.conditional.dosbatch",regex:"\\b(?:if|else)\\b",caseInsensitive:!0},{token:"keyword.control.repeat.dosbatch",regex:"\\bfor\\b",caseInsensitive:!0},{token:"keyword.operator.dosbatch",regex:"\\b(?:EQU|NEQ|LSS|LEQ|GTR|GEQ)\\b"},{token:["doc.comment","comment"],regex:"(?:^|\\b)(rem)($|\\s.*$)",caseInsensitive:!0},{token:"comment.line.colons.dosbatch",regex:"::.*$"},{include:"variable"},{token:"punctuation.definition.string.begin.shell",regex:'"',push:[{token:"punctuation.definition.string.end.shell",regex:'"',next:"pop"},{include:"variable"},{defaultToken:"string.quoted.double.dosbatch"}]},{token:"keyword.operator.pipe.dosbatch",regex:"[|]"},{token:"keyword.operator.redirect.shell",regex:"&>|\\d*>&\\d*|\\d*(?:>>|>|<)|\\d*<&|\\d*<>"}],variable:[{token:"constant.numeric",regex:"%%\\w+|%[*\\d]|%\\w+%"},{token:"constant.numeric",regex:"%~\\d+"},{token:["markup.list","constant.other","markup.list"],regex:"(%)(\\w+)(%?)"}]},this.normalizeRules()};s.metaData={name:"Batch File",scopeName:"source.dosbatch",fileTypes:["bat"]},r.inherits(s,i),t.BatchFileHighlightRules=s}),define("ace/mode/folding/cstyle",["require","exports","module","ace/lib/oop","ace/range","ace/mode/folding/fold_mode"],function(e,t,n){"use strict";var r=e("../../lib/oop"),i=e("../../range").Range,s=e("./fold_mode").FoldMode,o=t.FoldMode=function(e){e&&(this.foldingStartMarker=new RegExp(this.foldingStartMarker.source.replace(/\|[^|]*?$/,"|"+e.start)),this.foldingStopMarker=new RegExp(this.foldingStopMarker.source.replace(/\|[^|]*?$/,"|"+e.end)))};r.inherits(o,s),function(){this.foldingStartMarker=/([\{\[\(])[^\}\]\)]*$|^\s*(\/\*)/,this.foldingStopMarker=/^[^\[\{\(]*([\}\]\)])|^[\s\*]*(\*\/)/,this.singleLineBlockCommentRe=/^\s*(\/\*).*\*\/\s*$/,this.tripleStarBlockCommentRe=/^\s*(\/\*\*\*).*\*\/\s*$/,this.startRegionRe=/^\s*(\/\*|\/\/)#?region\b/,this._getFoldWidgetBase=this.getFoldWidget,this.getFoldWidget=function(e,t,n){var r=e.getLine(n);if(this.singleLineBlockCommentRe.test(r)&&!this.startRegionRe.test(r)&&!this.tripleStarBlockCommentRe.test(r))return"";var i=this._getFoldWidgetBase(e,t,n);return!i&&this.startRegionRe.test(r)?"start":i},this.getFoldWidgetRange=function(e,t,n,r){var i=e.getLine(n);if(this.startRegionRe.test(i))return this.getCommentRegionBlock(e,i,n);var s=i.match(this.foldingStartMarker);if(s){var o=s.index;if(s[1])return this.openingBracketBlock(e,s[1],n,o);var u=e.getCommentFoldRange(n,o+s[0].length,1);return u&&!u.isMultiLine()&&(r?u=this.getSectionRange(e,n):t!="all"&&(u=null)),u}if(t==="markbegin")return;var s=i.match(this.foldingStopMarker);if(s){var o=s.index+s[0].length;return s[1]?this.closingBracketBlock(e,s[1],n,o):e.getCommentFoldRange(n,o,-1)}},this.getSectionRange=function(e,t){var n=e.getLine(t),r=n.search(/\S/),s=t,o=n.length;t+=1;var u=t,a=e.getLength();while(++t<a){n=e.getLine(t);var f=n.search(/\S/);if(f===-1)continue;if(r>f)break;var l=this.getFoldWidgetRange(e,"all",t);if(l){if(l.start.row<=s)break;if(l.isMultiLine())t=l.end.row;else if(r==f)break}u=t}return new i(s,o,u,e.getLine(u).length)},this.getCommentRegionBlock=function(e,t,n){var r=t.search(/\s*$/),s=e.getLength(),o=n,u=/^\s*(?:\/\*|\/\/|--)#?(end)?region\b/,a=1;while(++n<s){t=e.getLine(n);var f=u.exec(t);if(!f)continue;f[1]?a--:a++;if(!a)break}var l=n;if(l>o)return new i(o,r,l,t.length)}}.call(o.prototype)}),define("ace/mode/batchfile",["require","exports","module","ace/lib/oop","ace/mode/text","ace/mode/batchfile_highlight_rules","ace/mode/folding/cstyle"],function(e,t,n){"use strict";var r=e("../lib/oop"),i=e("./text").Mode,s=e("./batchfile_highlight_rules").BatchFileHighlightRules,o=e("./folding/cstyle").FoldMode,u=function(){this.HighlightRules=s,this.foldingRules=new o,this.$behaviour=this.$defaultBehaviour};r.inherits(u,i),function(){this.lineCommentStart="::",this.blockComment="",this.$id="ace/mode/batchfile"}.call(u.prototype),t.Mode=u}); (function() {
|
||||
window.require(["ace/mode/batchfile"], function(m) {
|
||||
if (typeof module == "object" && typeof exports == "object" && module) {
|
||||
module.exports = m;
|
||||
}
|
||||
});
|
||||
})();
|
||||
|
||||
7
htdocs/includes/ace/src/mode-bibtex.js
Normal file
7
htdocs/includes/ace/src/mode-bibtex.js
Normal file
@@ -0,0 +1,7 @@
|
||||
define("ace/mode/bibtex_highlight_rules",["require","exports","module","ace/lib/oop","ace/mode/text_highlight_rules"],function(e,t,n){"use strict";var r=e("../lib/oop"),i=e("./text_highlight_rules").TextHighlightRules,s=function(){this.$rules={start:[{token:"comment",regex:/@Comment\{/,stateName:"bibtexComment",push:[{token:"comment",regex:/}/,next:"pop"},{token:"comment",regex:/\{/,push:"bibtexComment"},{defaultToken:"comment"}]},{token:["keyword","text","paren.lparen","text","variable","text","keyword.operator"],regex:/(@String)(\s*)(\{)(\s*)([a-zA-Z]*)(\s*)(=)/,push:[{token:"paren.rparen",regex:/\}/,next:"pop"},{include:"#misc"},{defaultToken:"text"}]},{token:["keyword","text","paren.lparen","text","variable","text","keyword.operator"],regex:/(@String)(\s*)(\()(\s*)([a-zA-Z]*)(\s*)(=)/,push:[{token:"paren.rparen",regex:/\)/,next:"pop"},{include:"#misc"},{defaultToken:"text"}]},{token:["keyword","text","paren.lparen"],regex:/(@preamble)(\s*)(\()/,push:[{token:"paren.rparen",regex:/\)/,next:"pop"},{include:"#misc"},{defaultToken:"text"}]},{token:["keyword","text","paren.lparen"],regex:/(@preamble)(\s*)(\{)/,push:[{token:"paren.rparen",regex:/\}/,next:"pop"},{include:"#misc"},{defaultToken:"text"}]},{token:["keyword","text","paren.lparen","text","support.class"],regex:/(@[a-zA-Z]+)(\s*)(\{)(\s*)([\w-]+)/,push:[{token:"paren.rparen",regex:/\}/,next:"pop"},{token:["variable","text","keyword.operator"],regex:/([a-zA-Z0-9\!\$\&\*\+\-\.\/\:\;\<\>\?\[\]\^\_\`\|]+)(\s*)(=)/,push:[{token:"text",regex:/(?=[,}])/,next:"pop"},{include:"#misc"},{include:"#integer"},{defaultToken:"text"}]},{token:"punctuation",regex:/,/},{defaultToken:"text"}]},{defaultToken:"comment"}],"#integer":[{token:"constant.numeric.bibtex",regex:/\d+/}],"#misc":[{token:"string",regex:/"/,push:"#string_quotes"},{token:"paren.lparen",regex:/\{/,push:"#string_braces"},{token:"keyword.operator",regex:/#/}],"#string_braces":[{token:"paren.rparen",regex:/\}/,next:"pop"},{token:"invalid.illegal",regex:/@/},{include:"#misc"},{defaultToken:"string"}],"#string_quotes":[{token:"string",regex:/"/,next:"pop"},{include:"#misc"},{defaultToken:"string"}]},this.normalizeRules()};r.inherits(s,i),t.BibTeXHighlightRules=s}),define("ace/mode/folding/cstyle",["require","exports","module","ace/lib/oop","ace/range","ace/mode/folding/fold_mode"],function(e,t,n){"use strict";var r=e("../../lib/oop"),i=e("../../range").Range,s=e("./fold_mode").FoldMode,o=t.FoldMode=function(e){e&&(this.foldingStartMarker=new RegExp(this.foldingStartMarker.source.replace(/\|[^|]*?$/,"|"+e.start)),this.foldingStopMarker=new RegExp(this.foldingStopMarker.source.replace(/\|[^|]*?$/,"|"+e.end)))};r.inherits(o,s),function(){this.foldingStartMarker=/([\{\[\(])[^\}\]\)]*$|^\s*(\/\*)/,this.foldingStopMarker=/^[^\[\{\(]*([\}\]\)])|^[\s\*]*(\*\/)/,this.singleLineBlockCommentRe=/^\s*(\/\*).*\*\/\s*$/,this.tripleStarBlockCommentRe=/^\s*(\/\*\*\*).*\*\/\s*$/,this.startRegionRe=/^\s*(\/\*|\/\/)#?region\b/,this._getFoldWidgetBase=this.getFoldWidget,this.getFoldWidget=function(e,t,n){var r=e.getLine(n);if(this.singleLineBlockCommentRe.test(r)&&!this.startRegionRe.test(r)&&!this.tripleStarBlockCommentRe.test(r))return"";var i=this._getFoldWidgetBase(e,t,n);return!i&&this.startRegionRe.test(r)?"start":i},this.getFoldWidgetRange=function(e,t,n,r){var i=e.getLine(n);if(this.startRegionRe.test(i))return this.getCommentRegionBlock(e,i,n);var s=i.match(this.foldingStartMarker);if(s){var o=s.index;if(s[1])return this.openingBracketBlock(e,s[1],n,o);var u=e.getCommentFoldRange(n,o+s[0].length,1);return u&&!u.isMultiLine()&&(r?u=this.getSectionRange(e,n):t!="all"&&(u=null)),u}if(t==="markbegin")return;var s=i.match(this.foldingStopMarker);if(s){var o=s.index+s[0].length;return s[1]?this.closingBracketBlock(e,s[1],n,o):e.getCommentFoldRange(n,o,-1)}},this.getSectionRange=function(e,t){var n=e.getLine(t),r=n.search(/\S/),s=t,o=n.length;t+=1;var u=t,a=e.getLength();while(++t<a){n=e.getLine(t);var f=n.search(/\S/);if(f===-1)continue;if(r>f)break;var l=this.getFoldWidgetRange(e,"all",t);if(l){if(l.start.row<=s)break;if(l.isMultiLine())t=l.end.row;else if(r==f)break}u=t}return new i(s,o,u,e.getLine(u).length)},this.getCommentRegionBlock=function(e,t,n){var r=t.search(/\s*$/),s=e.getLength(),o=n,u=/^\s*(?:\/\*|\/\/|--)#?(end)?region\b/,a=1;while(++n<s){t=e.getLine(n);var f=u.exec(t);if(!f)continue;f[1]?a--:a++;if(!a)break}var l=n;if(l>o)return new i(o,r,l,t.length)}}.call(o.prototype)}),define("ace/mode/bibtex",["require","exports","module","ace/lib/oop","ace/mode/text","ace/mode/bibtex_highlight_rules","ace/mode/folding/cstyle"],function(e,t,n){"use strict";var r=e("../lib/oop"),i=e("./text").Mode,s=e("./bibtex_highlight_rules").BibTeXHighlightRules,o=e("./folding/cstyle").FoldMode,u=function(){this.HighlightRules=s,this.foldingRules=new o};r.inherits(u,i),function(){this.$id="ace/mode/bibtex"}.call(u.prototype),t.Mode=u}); (function() {
|
||||
window.require(["ace/mode/bibtex"], function(m) {
|
||||
if (typeof module == "object" && typeof exports == "object" && module) {
|
||||
module.exports = m;
|
||||
}
|
||||
});
|
||||
})();
|
||||
@@ -1,293 +1,7 @@
|
||||
define("ace/mode/c9search_highlight_rules",["require","exports","module","ace/lib/oop","ace/lib/lang","ace/mode/text_highlight_rules"], function(require, exports, module) {
|
||||
"use strict";
|
||||
|
||||
var oop = require("../lib/oop");
|
||||
var lang = require("../lib/lang");
|
||||
var TextHighlightRules = require("./text_highlight_rules").TextHighlightRules;
|
||||
|
||||
function safeCreateRegexp(source, flag) {
|
||||
try {
|
||||
return new RegExp(source, flag);
|
||||
} catch(e) {}
|
||||
}
|
||||
|
||||
var C9SearchHighlightRules = function() {
|
||||
this.$rules = {
|
||||
"start" : [
|
||||
{
|
||||
tokenNames : ["c9searchresults.constant.numeric", "c9searchresults.text", "c9searchresults.text", "c9searchresults.keyword"],
|
||||
regex : /(^\s+[0-9]+)(:)(\d*\s?)([^\r\n]+)/,
|
||||
onMatch : function(val, state, stack) {
|
||||
var values = this.splitRegex.exec(val);
|
||||
var types = this.tokenNames;
|
||||
var tokens = [{
|
||||
type: types[0],
|
||||
value: values[1]
|
||||
}, {
|
||||
type: types[1],
|
||||
value: values[2]
|
||||
}];
|
||||
|
||||
if (values[3]) {
|
||||
if (values[3] == " ")
|
||||
tokens[1] = { type: types[1], value: values[2] + " " };
|
||||
else
|
||||
tokens.push({ type: types[1], value: values[3] });
|
||||
}
|
||||
var regex = stack[1];
|
||||
var str = values[4];
|
||||
|
||||
var m;
|
||||
var last = 0;
|
||||
if (regex && regex.exec) {
|
||||
regex.lastIndex = 0;
|
||||
while (m = regex.exec(str)) {
|
||||
var skipped = str.substring(last, m.index);
|
||||
last = regex.lastIndex;
|
||||
if (skipped)
|
||||
tokens.push({type: types[2], value: skipped});
|
||||
if (m[0])
|
||||
tokens.push({type: types[3], value: m[0]});
|
||||
else if (!skipped)
|
||||
break;
|
||||
}
|
||||
}
|
||||
if (last < str.length)
|
||||
tokens.push({type: types[2], value: str.substr(last)});
|
||||
return tokens;
|
||||
}
|
||||
},
|
||||
{
|
||||
regex : "^Searching for [^\\r\\n]*$",
|
||||
onMatch: function(val, state, stack) {
|
||||
var parts = val.split("\x01");
|
||||
if (parts.length < 3)
|
||||
return "text";
|
||||
|
||||
var options, search;
|
||||
|
||||
var i = 0;
|
||||
var tokens = [{
|
||||
value: parts[i++] + "'",
|
||||
type: "text"
|
||||
}, {
|
||||
value: search = parts[i++],
|
||||
type: "text" // "c9searchresults.keyword"
|
||||
}, {
|
||||
value: "'" + parts[i++],
|
||||
type: "text"
|
||||
}];
|
||||
if (parts[2] !== " in") {
|
||||
tokens.push({
|
||||
value: "'" + parts[i++] + "'",
|
||||
type: "text"
|
||||
}, {
|
||||
value: parts[i++],
|
||||
type: "text"
|
||||
});
|
||||
}
|
||||
tokens.push({
|
||||
value: " " + parts[i++] + " ",
|
||||
type: "text"
|
||||
});
|
||||
if (parts[i+1]) {
|
||||
options = parts[i+1];
|
||||
tokens.push({
|
||||
value: "(" + parts[i+1] + ")",
|
||||
type: "text"
|
||||
});
|
||||
i += 1;
|
||||
} else {
|
||||
i -= 1;
|
||||
}
|
||||
while (i++ < parts.length) {
|
||||
parts[i] && tokens.push({
|
||||
value: parts[i],
|
||||
type: "text"
|
||||
});
|
||||
}
|
||||
|
||||
if (search) {
|
||||
if (!/regex/.test(options))
|
||||
search = lang.escapeRegExp(search);
|
||||
if (/whole/.test(options))
|
||||
search = "\\b" + search + "\\b";
|
||||
}
|
||||
|
||||
var regex = search && safeCreateRegexp(
|
||||
"(" + search + ")",
|
||||
/ sensitive/.test(options) ? "g" : "ig"
|
||||
);
|
||||
if (regex) {
|
||||
stack[0] = state;
|
||||
stack[1] = regex;
|
||||
}
|
||||
|
||||
return tokens;
|
||||
}
|
||||
},
|
||||
{
|
||||
regex : "^(?=Found \\d+ matches)",
|
||||
token : "text",
|
||||
next : "numbers"
|
||||
},
|
||||
{
|
||||
token : "string", // single line
|
||||
regex : "^\\S:?[^:]+",
|
||||
next : "numbers"
|
||||
}
|
||||
],
|
||||
numbers:[{
|
||||
regex : "\\d+",
|
||||
token : "constant.numeric"
|
||||
}, {
|
||||
regex : "$",
|
||||
token : "text",
|
||||
next : "start"
|
||||
}]
|
||||
};
|
||||
this.normalizeRules();
|
||||
};
|
||||
|
||||
oop.inherits(C9SearchHighlightRules, TextHighlightRules);
|
||||
|
||||
exports.C9SearchHighlightRules = C9SearchHighlightRules;
|
||||
|
||||
});
|
||||
|
||||
define("ace/mode/matching_brace_outdent",["require","exports","module","ace/range"], function(require, exports, module) {
|
||||
"use strict";
|
||||
|
||||
var Range = require("../range").Range;
|
||||
|
||||
var MatchingBraceOutdent = function() {};
|
||||
|
||||
(function() {
|
||||
|
||||
this.checkOutdent = function(line, input) {
|
||||
if (! /^\s+$/.test(line))
|
||||
return false;
|
||||
|
||||
return /^\s*\}/.test(input);
|
||||
};
|
||||
|
||||
this.autoOutdent = function(doc, row) {
|
||||
var line = doc.getLine(row);
|
||||
var match = line.match(/^(\s*\})/);
|
||||
|
||||
if (!match) return 0;
|
||||
|
||||
var column = match[1].length;
|
||||
var openBracePos = doc.findMatchingBracket({row: row, column: column});
|
||||
|
||||
if (!openBracePos || openBracePos.row == row) return 0;
|
||||
|
||||
var indent = this.$getIndent(doc.getLine(openBracePos.row));
|
||||
doc.replace(new Range(row, 0, row, column-1), indent);
|
||||
};
|
||||
|
||||
this.$getIndent = function(line) {
|
||||
return line.match(/^\s*/)[0];
|
||||
};
|
||||
|
||||
}).call(MatchingBraceOutdent.prototype);
|
||||
|
||||
exports.MatchingBraceOutdent = MatchingBraceOutdent;
|
||||
});
|
||||
|
||||
define("ace/mode/folding/c9search",["require","exports","module","ace/lib/oop","ace/range","ace/mode/folding/fold_mode"], function(require, exports, module) {
|
||||
"use strict";
|
||||
|
||||
var oop = require("../../lib/oop");
|
||||
var Range = require("../../range").Range;
|
||||
var BaseFoldMode = require("./fold_mode").FoldMode;
|
||||
|
||||
var FoldMode = exports.FoldMode = function() {};
|
||||
oop.inherits(FoldMode, BaseFoldMode);
|
||||
|
||||
(function() {
|
||||
|
||||
this.foldingStartMarker = /^(\S.*:|Searching for.*)$/;
|
||||
this.foldingStopMarker = /^(\s+|Found.*)$/;
|
||||
|
||||
this.getFoldWidgetRange = function(session, foldStyle, row) {
|
||||
var lines = session.doc.getAllLines(row);
|
||||
var line = lines[row];
|
||||
var level1 = /^(Found.*|Searching for.*)$/;
|
||||
var level2 = /^(\S.*:|\s*)$/;
|
||||
var re = level1.test(line) ? level1 : level2;
|
||||
|
||||
var startRow = row;
|
||||
var endRow = row;
|
||||
|
||||
if (this.foldingStartMarker.test(line)) {
|
||||
for (var i = row + 1, l = session.getLength(); i < l; i++) {
|
||||
if (re.test(lines[i]))
|
||||
break;
|
||||
}
|
||||
endRow = i;
|
||||
}
|
||||
else if (this.foldingStopMarker.test(line)) {
|
||||
for (var i = row - 1; i >= 0; i--) {
|
||||
line = lines[i];
|
||||
if (re.test(line))
|
||||
break;
|
||||
}
|
||||
startRow = i;
|
||||
}
|
||||
if (startRow != endRow) {
|
||||
var col = line.length;
|
||||
if (re === level1)
|
||||
col = line.search(/\(Found[^)]+\)$|$/);
|
||||
return new Range(startRow, col, endRow, 0);
|
||||
}
|
||||
};
|
||||
|
||||
}).call(FoldMode.prototype);
|
||||
|
||||
});
|
||||
|
||||
define("ace/mode/c9search",["require","exports","module","ace/lib/oop","ace/mode/text","ace/mode/c9search_highlight_rules","ace/mode/matching_brace_outdent","ace/mode/folding/c9search"], function(require, exports, module) {
|
||||
"use strict";
|
||||
|
||||
var oop = require("../lib/oop");
|
||||
var TextMode = require("./text").Mode;
|
||||
var C9SearchHighlightRules = require("./c9search_highlight_rules").C9SearchHighlightRules;
|
||||
var MatchingBraceOutdent = require("./matching_brace_outdent").MatchingBraceOutdent;
|
||||
var C9StyleFoldMode = require("./folding/c9search").FoldMode;
|
||||
|
||||
var Mode = function() {
|
||||
this.HighlightRules = C9SearchHighlightRules;
|
||||
this.$outdent = new MatchingBraceOutdent();
|
||||
this.foldingRules = new C9StyleFoldMode();
|
||||
};
|
||||
oop.inherits(Mode, TextMode);
|
||||
|
||||
(function() {
|
||||
|
||||
this.getNextLineIndent = function(state, line, tab) {
|
||||
var indent = this.$getIndent(line);
|
||||
return indent;
|
||||
};
|
||||
|
||||
this.checkOutdent = function(state, line, input) {
|
||||
return this.$outdent.checkOutdent(line, input);
|
||||
};
|
||||
|
||||
this.autoOutdent = function(state, doc, row) {
|
||||
this.$outdent.autoOutdent(doc, row);
|
||||
};
|
||||
|
||||
this.$id = "ace/mode/c9search";
|
||||
}).call(Mode.prototype);
|
||||
|
||||
exports.Mode = Mode;
|
||||
|
||||
}); (function() {
|
||||
define("ace/mode/c9search_highlight_rules",["require","exports","module","ace/lib/oop","ace/lib/lang","ace/mode/text_highlight_rules"],function(e,t,n){"use strict";function o(e,t){try{return new RegExp(e,t)}catch(n){}}var r=e("../lib/oop"),i=e("../lib/lang"),s=e("./text_highlight_rules").TextHighlightRules,u=function(){this.$rules={start:[{tokenNames:["c9searchresults.constant.numeric","c9searchresults.text","c9searchresults.text","c9searchresults.keyword"],regex:/(^\s+[0-9]+)(:)(\d*\s?)([^\r\n]+)/,onMatch:function(e,t,n){var r=this.splitRegex.exec(e),i=this.tokenNames,s=[{type:i[0],value:r[1]},{type:i[1],value:r[2]}];r[3]&&(r[3]==" "?s[1]={type:i[1],value:r[2]+" "}:s.push({type:i[1],value:r[3]}));var o=n[1],u=r[4],a,f=0;if(o&&o.exec){o.lastIndex=0;while(a=o.exec(u)){var l=u.substring(f,a.index);f=o.lastIndex,l&&s.push({type:i[2],value:l});if(a[0])s.push({type:i[3],value:a[0]});else if(!l)break}}return f<u.length&&s.push({type:i[2],value:u.substr(f)}),s}},{regex:"^Searching for [^\\r\\n]*$",onMatch:function(e,t,n){var r=e.split("\x01");if(r.length<3)return"text";var s,u,a=0,f=[{value:r[a++]+"'",type:"text"},{value:u=r[a++],type:"text"},{value:"'"+r[a++],type:"text"}];r[2]!==" in"&&f.push({value:"'"+r[a++]+"'",type:"text"},{value:r[a++],type:"text"}),f.push({value:" "+r[a++]+" ",type:"text"}),r[a+1]?(s=r[a+1],f.push({value:"("+r[a+1]+")",type:"text"}),a+=1):a-=1;while(a++<r.length)r[a]&&f.push({value:r[a],type:"text"});u&&(/regex/.test(s)||(u=i.escapeRegExp(u)),/whole/.test(s)&&(u="\\b"+u+"\\b"));var l=u&&o("("+u+")",/ sensitive/.test(s)?"g":"ig");return l&&(n[0]=t,n[1]=l),f}},{regex:"^(?=Found \\d+ matches)",token:"text",next:"numbers"},{token:"string",regex:"^\\S:?[^:]+",next:"numbers"}],numbers:[{regex:"\\d+",token:"constant.numeric"},{regex:"$",token:"text",next:"start"}]},this.normalizeRules()};r.inherits(u,s),t.C9SearchHighlightRules=u}),define("ace/mode/matching_brace_outdent",["require","exports","module","ace/range"],function(e,t,n){"use strict";var r=e("../range").Range,i=function(){};(function(){this.checkOutdent=function(e,t){return/^\s+$/.test(e)?/^\s*\}/.test(t):!1},this.autoOutdent=function(e,t){var n=e.getLine(t),i=n.match(/^(\s*\})/);if(!i)return 0;var s=i[1].length,o=e.findMatchingBracket({row:t,column:s});if(!o||o.row==t)return 0;var u=this.$getIndent(e.getLine(o.row));e.replace(new r(t,0,t,s-1),u)},this.$getIndent=function(e){return e.match(/^\s*/)[0]}}).call(i.prototype),t.MatchingBraceOutdent=i}),define("ace/mode/folding/c9search",["require","exports","module","ace/lib/oop","ace/range","ace/mode/folding/fold_mode"],function(e,t,n){"use strict";var r=e("../../lib/oop"),i=e("../../range").Range,s=e("./fold_mode").FoldMode,o=t.FoldMode=function(){};r.inherits(o,s),function(){this.foldingStartMarker=/^(\S.*:|Searching for.*)$/,this.foldingStopMarker=/^(\s+|Found.*)$/,this.getFoldWidgetRange=function(e,t,n){var r=e.doc.getAllLines(n),s=r[n],o=/^(Found.*|Searching for.*)$/,u=/^(\S.*:|\s*)$/,a=o.test(s)?o:u,f=n,l=n;if(this.foldingStartMarker.test(s)){for(var c=n+1,h=e.getLength();c<h;c++)if(a.test(r[c]))break;l=c}else if(this.foldingStopMarker.test(s)){for(var c=n-1;c>=0;c--){s=r[c];if(a.test(s))break}f=c}if(f!=l){var p=s.length;return a===o&&(p=s.search(/\(Found[^)]+\)$|$/)),new i(f,p,l,0)}}}.call(o.prototype)}),define("ace/mode/c9search",["require","exports","module","ace/lib/oop","ace/mode/text","ace/mode/c9search_highlight_rules","ace/mode/matching_brace_outdent","ace/mode/folding/c9search"],function(e,t,n){"use strict";var r=e("../lib/oop"),i=e("./text").Mode,s=e("./c9search_highlight_rules").C9SearchHighlightRules,o=e("./matching_brace_outdent").MatchingBraceOutdent,u=e("./folding/c9search").FoldMode,a=function(){this.HighlightRules=s,this.$outdent=new o,this.foldingRules=new u};r.inherits(a,i),function(){this.getNextLineIndent=function(e,t,n){var r=this.$getIndent(t);return r},this.checkOutdent=function(e,t,n){return this.$outdent.checkOutdent(t,n)},this.autoOutdent=function(e,t,n){this.$outdent.autoOutdent(t,n)},this.$id="ace/mode/c9search"}.call(a.prototype),t.Mode=a}); (function() {
|
||||
window.require(["ace/mode/c9search"], function(m) {
|
||||
if (typeof module == "object" && typeof exports == "object" && module) {
|
||||
module.exports = m;
|
||||
}
|
||||
});
|
||||
})();
|
||||
|
||||
File diff suppressed because one or more lines are too long
@@ -1,210 +1,7 @@
|
||||
define("ace/mode/cirru_highlight_rules",["require","exports","module","ace/lib/oop","ace/mode/text_highlight_rules"], function(require, exports, module) {
|
||||
"use strict";
|
||||
|
||||
var oop = require("../lib/oop");
|
||||
var TextHighlightRules = require("./text_highlight_rules").TextHighlightRules;
|
||||
var CirruHighlightRules = function() {
|
||||
this.$rules = {
|
||||
start: [{
|
||||
token: 'constant.numeric',
|
||||
regex: /[\d\.]+/
|
||||
}, {
|
||||
token: 'comment.line.double-dash',
|
||||
regex: /--/,
|
||||
next: 'comment'
|
||||
}, {
|
||||
token: 'storage.modifier',
|
||||
regex: /\(/
|
||||
}, {
|
||||
token: 'storage.modifier',
|
||||
regex: /,/,
|
||||
next: 'line'
|
||||
}, {
|
||||
token: 'support.function',
|
||||
regex: /[^\(\)"\s{}\[\]]+/,
|
||||
next: 'line'
|
||||
}, {
|
||||
token: 'string.quoted.double',
|
||||
regex: /"/,
|
||||
next: 'string'
|
||||
}, {
|
||||
token: 'storage.modifier',
|
||||
regex: /\)/
|
||||
}],
|
||||
comment: [{
|
||||
token: 'comment.line.double-dash',
|
||||
regex: / +[^\n]+/,
|
||||
next: 'start'
|
||||
}],
|
||||
string: [{
|
||||
token: 'string.quoted.double',
|
||||
regex: /"/,
|
||||
next: 'line'
|
||||
}, {
|
||||
token: 'constant.character.escape',
|
||||
regex: /\\/,
|
||||
next: 'escape'
|
||||
}, {
|
||||
token: 'string.quoted.double',
|
||||
regex: /[^\\"]+/
|
||||
}],
|
||||
escape: [{
|
||||
token: 'constant.character.escape',
|
||||
regex: /./,
|
||||
next: 'string'
|
||||
}],
|
||||
line: [{
|
||||
token: 'constant.numeric',
|
||||
regex: /[\d\.]+/
|
||||
}, {
|
||||
token: 'markup.raw',
|
||||
regex: /^\s*/,
|
||||
next: 'start'
|
||||
}, {
|
||||
token: 'storage.modifier',
|
||||
regex: /\$/,
|
||||
next: 'start'
|
||||
}, {
|
||||
token: 'variable.parameter',
|
||||
regex: /[^\(\)"\s{}\[\]]+/
|
||||
}, {
|
||||
token: 'storage.modifier',
|
||||
regex: /\(/,
|
||||
next: 'start'
|
||||
}, {
|
||||
token: 'storage.modifier',
|
||||
regex: /\)/
|
||||
}, {
|
||||
token: 'markup.raw',
|
||||
regex: /^ */,
|
||||
next: 'start'
|
||||
}, {
|
||||
token: 'string.quoted.double',
|
||||
regex: /"/,
|
||||
next: 'string'
|
||||
}]
|
||||
};
|
||||
|
||||
};
|
||||
|
||||
oop.inherits(CirruHighlightRules, TextHighlightRules);
|
||||
|
||||
exports.CirruHighlightRules = CirruHighlightRules;
|
||||
});
|
||||
|
||||
define("ace/mode/folding/coffee",["require","exports","module","ace/lib/oop","ace/mode/folding/fold_mode","ace/range"], function(require, exports, module) {
|
||||
"use strict";
|
||||
|
||||
var oop = require("../../lib/oop");
|
||||
var BaseFoldMode = require("./fold_mode").FoldMode;
|
||||
var Range = require("../../range").Range;
|
||||
|
||||
var FoldMode = exports.FoldMode = function() {};
|
||||
oop.inherits(FoldMode, BaseFoldMode);
|
||||
|
||||
(function() {
|
||||
|
||||
this.getFoldWidgetRange = function(session, foldStyle, row) {
|
||||
var range = this.indentationBlock(session, row);
|
||||
if (range)
|
||||
return range;
|
||||
|
||||
var re = /\S/;
|
||||
var line = session.getLine(row);
|
||||
var startLevel = line.search(re);
|
||||
if (startLevel == -1 || line[startLevel] != "#")
|
||||
return;
|
||||
|
||||
var startColumn = line.length;
|
||||
var maxRow = session.getLength();
|
||||
var startRow = row;
|
||||
var endRow = row;
|
||||
|
||||
while (++row < maxRow) {
|
||||
line = session.getLine(row);
|
||||
var level = line.search(re);
|
||||
|
||||
if (level == -1)
|
||||
continue;
|
||||
|
||||
if (line[level] != "#")
|
||||
break;
|
||||
|
||||
endRow = row;
|
||||
}
|
||||
|
||||
if (endRow > startRow) {
|
||||
var endColumn = session.getLine(endRow).length;
|
||||
return new Range(startRow, startColumn, endRow, endColumn);
|
||||
}
|
||||
};
|
||||
this.getFoldWidget = function(session, foldStyle, row) {
|
||||
var line = session.getLine(row);
|
||||
var indent = line.search(/\S/);
|
||||
var next = session.getLine(row + 1);
|
||||
var prev = session.getLine(row - 1);
|
||||
var prevIndent = prev.search(/\S/);
|
||||
var nextIndent = next.search(/\S/);
|
||||
|
||||
if (indent == -1) {
|
||||
session.foldWidgets[row - 1] = prevIndent!= -1 && prevIndent < nextIndent ? "start" : "";
|
||||
return "";
|
||||
}
|
||||
if (prevIndent == -1) {
|
||||
if (indent == nextIndent && line[indent] == "#" && next[indent] == "#") {
|
||||
session.foldWidgets[row - 1] = "";
|
||||
session.foldWidgets[row + 1] = "";
|
||||
return "start";
|
||||
}
|
||||
} else if (prevIndent == indent && line[indent] == "#" && prev[indent] == "#") {
|
||||
if (session.getLine(row - 2).search(/\S/) == -1) {
|
||||
session.foldWidgets[row - 1] = "start";
|
||||
session.foldWidgets[row + 1] = "";
|
||||
return "";
|
||||
}
|
||||
}
|
||||
|
||||
if (prevIndent!= -1 && prevIndent < indent)
|
||||
session.foldWidgets[row - 1] = "start";
|
||||
else
|
||||
session.foldWidgets[row - 1] = "";
|
||||
|
||||
if (indent < nextIndent)
|
||||
return "start";
|
||||
else
|
||||
return "";
|
||||
};
|
||||
|
||||
}).call(FoldMode.prototype);
|
||||
|
||||
});
|
||||
|
||||
define("ace/mode/cirru",["require","exports","module","ace/lib/oop","ace/mode/text","ace/mode/cirru_highlight_rules","ace/mode/folding/coffee"], function(require, exports, module) {
|
||||
"use strict";
|
||||
|
||||
var oop = require("../lib/oop");
|
||||
var TextMode = require("./text").Mode;
|
||||
var CirruHighlightRules = require("./cirru_highlight_rules").CirruHighlightRules;
|
||||
var CoffeeFoldMode = require("./folding/coffee").FoldMode;
|
||||
|
||||
var Mode = function() {
|
||||
this.HighlightRules = CirruHighlightRules;
|
||||
this.foldingRules = new CoffeeFoldMode();
|
||||
this.$behaviour = this.$defaultBehaviour;
|
||||
};
|
||||
oop.inherits(Mode, TextMode);
|
||||
|
||||
(function() {
|
||||
this.lineCommentStart = "--";
|
||||
this.$id = "ace/mode/cirru";
|
||||
}).call(Mode.prototype);
|
||||
|
||||
exports.Mode = Mode;
|
||||
}); (function() {
|
||||
define("ace/mode/cirru_highlight_rules",["require","exports","module","ace/lib/oop","ace/mode/text_highlight_rules"],function(e,t,n){"use strict";var r=e("../lib/oop"),i=e("./text_highlight_rules").TextHighlightRules,s=function(){this.$rules={start:[{token:"constant.numeric",regex:/[\d\.]+/},{token:"comment.line.double-dash",regex:/--/,next:"comment"},{token:"storage.modifier",regex:/\(/},{token:"storage.modifier",regex:/,/,next:"line"},{token:"support.function",regex:/[^\(\)"\s{}\[\]]+/,next:"line"},{token:"string.quoted.double",regex:/"/,next:"string"},{token:"storage.modifier",regex:/\)/}],comment:[{token:"comment.line.double-dash",regex:/ +[^\n]+/,next:"start"}],string:[{token:"string.quoted.double",regex:/"/,next:"line"},{token:"constant.character.escape",regex:/\\/,next:"escape"},{token:"string.quoted.double",regex:/[^\\"]+/}],escape:[{token:"constant.character.escape",regex:/./,next:"string"}],line:[{token:"constant.numeric",regex:/[\d\.]+/},{token:"markup.raw",regex:/^\s*/,next:"start"},{token:"storage.modifier",regex:/\$/,next:"start"},{token:"variable.parameter",regex:/[^\(\)"\s{}\[\]]+/},{token:"storage.modifier",regex:/\(/,next:"start"},{token:"storage.modifier",regex:/\)/},{token:"markup.raw",regex:/^ */,next:"start"},{token:"string.quoted.double",regex:/"/,next:"string"}]}};r.inherits(s,i),t.CirruHighlightRules=s}),define("ace/mode/folding/coffee",["require","exports","module","ace/lib/oop","ace/mode/folding/fold_mode","ace/range"],function(e,t,n){"use strict";var r=e("../../lib/oop"),i=e("./fold_mode").FoldMode,s=e("../../range").Range,o=t.FoldMode=function(){};r.inherits(o,i),function(){this.commentBlock=function(e,t){var n=/\S/,r=e.getLine(t),i=r.search(n);if(i==-1||r[i]!="#")return;var o=r.length,u=e.getLength(),a=t,f=t;while(++t<u){r=e.getLine(t);var l=r.search(n);if(l==-1)continue;if(r[l]!="#")break;f=t}if(f>a){var c=e.getLine(f).length;return new s(a,o,f,c)}},this.getFoldWidgetRange=function(e,t,n){var r=this.indentationBlock(e,n);if(r)return r;r=this.commentBlock(e,n);if(r)return r},this.getFoldWidget=function(e,t,n){var r=e.getLine(n),i=r.search(/\S/),s=e.getLine(n+1),o=e.getLine(n-1),u=o.search(/\S/),a=s.search(/\S/);if(i==-1)return e.foldWidgets[n-1]=u!=-1&&u<a?"start":"","";if(u==-1){if(i==a&&r[i]=="#"&&s[i]=="#")return e.foldWidgets[n-1]="",e.foldWidgets[n+1]="","start"}else if(u==i&&r[i]=="#"&&o[i]=="#"&&e.getLine(n-2).search(/\S/)==-1)return e.foldWidgets[n-1]="start",e.foldWidgets[n+1]="","";return u!=-1&&u<i?e.foldWidgets[n-1]="start":e.foldWidgets[n-1]="",i<a?"start":""}}.call(o.prototype)}),define("ace/mode/cirru",["require","exports","module","ace/lib/oop","ace/mode/text","ace/mode/cirru_highlight_rules","ace/mode/folding/coffee"],function(e,t,n){"use strict";var r=e("../lib/oop"),i=e("./text").Mode,s=e("./cirru_highlight_rules").CirruHighlightRules,o=e("./folding/coffee").FoldMode,u=function(){this.HighlightRules=s,this.foldingRules=new o,this.$behaviour=this.$defaultBehaviour};r.inherits(u,i),function(){this.lineCommentStart="--",this.$id="ace/mode/cirru"}.call(u.prototype),t.Mode=u}); (function() {
|
||||
window.require(["ace/mode/cirru"], function(m) {
|
||||
if (typeof module == "object" && typeof exports == "object" && module) {
|
||||
module.exports = m;
|
||||
}
|
||||
});
|
||||
})();
|
||||
|
||||
File diff suppressed because one or more lines are too long
7
htdocs/includes/ace/src/mode-clue.js
Normal file
7
htdocs/includes/ace/src/mode-clue.js
Normal file
File diff suppressed because one or more lines are too long
@@ -1,101 +1,7 @@
|
||||
define("ace/mode/cobol_highlight_rules",["require","exports","module","ace/lib/oop","ace/mode/text_highlight_rules"], function(require, exports, module) {
|
||||
"use strict";
|
||||
|
||||
var oop = require("../lib/oop");
|
||||
var TextHighlightRules = require("./text_highlight_rules").TextHighlightRules;
|
||||
|
||||
var CobolHighlightRules = function() {
|
||||
var keywords = "ACCEPT|MERGE|SUM|ADD||MESSAGE|TABLE|ADVANCING|MODE|TAPE|" +
|
||||
"AFTER|MULTIPLY|TEST|ALL|NEGATIVE|TEXT|ALPHABET|NEXT|THAN|" +
|
||||
"ALSO|NO|THEN|ALTERNATE|NOT|THROUGH|AND|NUMBER|THRU|ANY|OCCURS|" +
|
||||
"TIME|ARE|OF|TO|AREA|OFF|TOP||ASCENDING|OMITTED|TRUE|ASSIGN|ON|TYPE|AT|OPEN|" +
|
||||
"UNIT|AUTHOR|OR|UNTIL|BEFORE|OTHER|UP|BLANK|OUTPUT|USE|BLOCK|PAGE|USING|BOTTOM|" +
|
||||
"PERFORM|VALUE|BY|PIC|VALUES|CALL|PICTURE|WHEN|CANCEL|PLUS|WITH|CD|POINTER|WRITE|" +
|
||||
"CHARACTER|POSITION||ZERO|CLOSE|POSITIVE|ZEROS|COLUMN|PROCEDURE|ZEROES|COMMA|PROGRAM|" +
|
||||
"COMMON|PROGRAM-ID|COMMUNICATION|QUOTE|COMP|RANDOM|COMPUTE|READ|CONTAINS|RECEIVE|CONFIGURATION|" +
|
||||
"RECORD|CONTINUE|REDEFINES|CONTROL|REFERENCE|COPY|REMAINDER|COUNT|REPLACE|DATA|REPORT|DATE|RESERVE|" +
|
||||
"DAY|RESET|DELETE|RETURN|DESTINATION|REWIND|DISABLE|REWRITE|DISPLAY|RIGHT|DIVIDE|RUN|DOWN|SAME|" +
|
||||
"ELSE|SEARCH|ENABLE|SECTION|END|SELECT|ENVIRONMENT|SENTENCE|EQUAL|SET|ERROR|SIGN|EXIT|SEQUENTIAL|" +
|
||||
"EXTERNAL|SIZE|FLASE|SORT|FILE|SOURCE|LENGTH|SPACE|LESS|STANDARD|LIMIT|START|LINE|STOP|LOCK|STRING|LOW-VALUE|SUBTRACT";
|
||||
|
||||
var builtinConstants = (
|
||||
"true|false|null"
|
||||
);
|
||||
|
||||
var builtinFunctions = (
|
||||
"count|min|max|avg|sum|rank|now|coalesce|main"
|
||||
);
|
||||
|
||||
var keywordMapper = this.createKeywordMapper({
|
||||
"support.function": builtinFunctions,
|
||||
"keyword": keywords,
|
||||
"constant.language": builtinConstants
|
||||
}, "identifier", true);
|
||||
|
||||
this.$rules = {
|
||||
"start" : [ {
|
||||
token : "comment",
|
||||
regex : "\\*.*$"
|
||||
}, {
|
||||
token : "string", // " string
|
||||
regex : '".*?"'
|
||||
}, {
|
||||
token : "string", // ' string
|
||||
regex : "'.*?'"
|
||||
}, {
|
||||
token : "constant.numeric", // float
|
||||
regex : "[+-]?\\d+(?:(?:\\.\\d*)?(?:[eE][+-]?\\d+)?)?\\b"
|
||||
}, {
|
||||
token : keywordMapper,
|
||||
regex : "[a-zA-Z_$][a-zA-Z0-9_$]*\\b"
|
||||
}, {
|
||||
token : "keyword.operator",
|
||||
regex : "\\+|\\-|\\/|\\/\\/|%|<@>|@>|<@|&|\\^|~|<|>|<=|=>|==|!=|<>|="
|
||||
}, {
|
||||
token : "paren.lparen",
|
||||
regex : "[\\(]"
|
||||
}, {
|
||||
token : "paren.rparen",
|
||||
regex : "[\\)]"
|
||||
}, {
|
||||
token : "text",
|
||||
regex : "\\s+"
|
||||
} ]
|
||||
};
|
||||
};
|
||||
|
||||
oop.inherits(CobolHighlightRules, TextHighlightRules);
|
||||
|
||||
exports.CobolHighlightRules = CobolHighlightRules;
|
||||
});
|
||||
|
||||
define("ace/mode/cobol",["require","exports","module","ace/lib/oop","ace/mode/text","ace/mode/cobol_highlight_rules"], function(require, exports, module) {
|
||||
"use strict";
|
||||
|
||||
var oop = require("../lib/oop");
|
||||
var TextMode = require("./text").Mode;
|
||||
var CobolHighlightRules = require("./cobol_highlight_rules").CobolHighlightRules;
|
||||
|
||||
var Mode = function() {
|
||||
this.HighlightRules = CobolHighlightRules;
|
||||
this.$behaviour = this.$defaultBehaviour;
|
||||
};
|
||||
oop.inherits(Mode, TextMode);
|
||||
|
||||
(function() {
|
||||
|
||||
this.lineCommentStart = "*";
|
||||
|
||||
this.$id = "ace/mode/cobol";
|
||||
}).call(Mode.prototype);
|
||||
|
||||
exports.Mode = Mode;
|
||||
|
||||
}); (function() {
|
||||
define("ace/mode/cobol_highlight_rules",["require","exports","module","ace/lib/oop","ace/mode/text_highlight_rules"],function(e,t,n){"use strict";var r=e("../lib/oop"),i=e("./text_highlight_rules").TextHighlightRules,s=function(){var e="ACCEPT|MERGE|SUM|ADD||MESSAGE|TABLE|ADVANCING|MODE|TAPE|AFTER|MULTIPLY|TEST|ALL|NEGATIVE|TEXT|ALPHABET|NEXT|THAN|ALSO|NO|THEN|ALTERNATE|NOT|THROUGH|AND|NUMBER|THRU|ANY|OCCURS|TIME|ARE|OF|TO|AREA|OFF|TOP||ASCENDING|OMITTED|TRUE|ASSIGN|ON|TYPE|AT|OPEN|UNIT|AUTHOR|OR|UNTIL|BEFORE|OTHER|UP|BLANK|OUTPUT|USE|BLOCK|PAGE|USING|BOTTOM|PERFORM|VALUE|BY|PIC|VALUES|CALL|PICTURE|WHEN|CANCEL|PLUS|WITH|CD|POINTER|WRITE|CHARACTER|POSITION||ZERO|CLOSE|POSITIVE|ZEROS|COLUMN|PROCEDURE|ZEROES|COMMA|PROGRAM|COMMON|PROGRAM-ID|COMMUNICATION|QUOTE|COMP|RANDOM|COMPUTE|READ|CONTAINS|RECEIVE|CONFIGURATION|RECORD|CONTINUE|REDEFINES|CONTROL|REFERENCE|COPY|REMAINDER|COUNT|REPLACE|DATA|REPORT|DATE|RESERVE|DAY|RESET|DELETE|RETURN|DESTINATION|REWIND|DISABLE|REWRITE|DISPLAY|RIGHT|DIVIDE|RUN|DOWN|SAME|ELSE|SEARCH|ENABLE|SECTION|END|SELECT|ENVIRONMENT|SENTENCE|EQUAL|SET|ERROR|SIGN|EXIT|SEQUENTIAL|EXTERNAL|SIZE|FLASE|SORT|FILE|SOURCE|LENGTH|SPACE|LESS|STANDARD|LIMIT|START|LINE|STOP|LOCK|STRING|LOW-VALUE|SUBTRACT",t="true|false|null",n="count|min|max|avg|sum|rank|now|coalesce|main",r=this.createKeywordMapper({"support.function":n,keyword:e,"constant.language":t},"identifier",!0);this.$rules={start:[{token:"comment",regex:"\\*.*$"},{token:"string",regex:'".*?"'},{token:"string",regex:"'.*?'"},{token:"constant.numeric",regex:"[+-]?\\d+(?:(?:\\.\\d*)?(?:[eE][+-]?\\d+)?)?\\b"},{token:r,regex:"[a-zA-Z_$][a-zA-Z0-9_$]*\\b"},{token:"keyword.operator",regex:"\\+|\\-|\\/|\\/\\/|%|<@>|@>|<@|&|\\^|~|<|>|<=|=>|==|!=|<>|="},{token:"paren.lparen",regex:"[\\(]"},{token:"paren.rparen",regex:"[\\)]"},{token:"text",regex:"\\s+"}]}};r.inherits(s,i),t.CobolHighlightRules=s}),define("ace/mode/cobol",["require","exports","module","ace/lib/oop","ace/mode/text","ace/mode/cobol_highlight_rules"],function(e,t,n){"use strict";var r=e("../lib/oop"),i=e("./text").Mode,s=e("./cobol_highlight_rules").CobolHighlightRules,o=function(){this.HighlightRules=s,this.$behaviour=this.$defaultBehaviour};r.inherits(o,i),function(){this.lineCommentStart="*",this.$id="ace/mode/cobol"}.call(o.prototype),t.Mode=o}); (function() {
|
||||
window.require(["ace/mode/cobol"], function(m) {
|
||||
if (typeof module == "object" && typeof exports == "object" && module) {
|
||||
module.exports = m;
|
||||
}
|
||||
});
|
||||
})();
|
||||
|
||||
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
@@ -1,59 +1,7 @@
|
||||
define("ace/mode/csp_highlight_rules",["require","exports","module","ace/lib/oop","ace/mode/text_highlight_rules"], function(require, exports, module) {
|
||||
"use strict";
|
||||
|
||||
var oop = require("../lib/oop");
|
||||
var TextHighlightRules = require("./text_highlight_rules").TextHighlightRules;
|
||||
|
||||
var CspHighlightRules = function() {
|
||||
var keywordMapper = this.createKeywordMapper({
|
||||
"constant.language": "child-src|connect-src|default-src|font-src|frame-src|img-src|manifest-src|media-src|object-src"
|
||||
+ "|script-src|style-src|worker-src|base-uri|plugin-types|sandbox|disown-opener|form-action|frame-ancestors|report-uri"
|
||||
+ "|report-to|upgrade-insecure-requests|block-all-mixed-content|require-sri-for|reflected-xss|referrer|policy-uri",
|
||||
"variable": "'none'|'self'|'unsafe-inline'|'unsafe-eval'|'strict-dynamic'|'unsafe-hashed-attributes'"
|
||||
}, "identifier", true);
|
||||
|
||||
this.$rules = {
|
||||
start: [{
|
||||
token: "string.link",
|
||||
regex: /https?:[^;\s]*/
|
||||
}, {
|
||||
token: "operator.punctuation",
|
||||
regex: /;/
|
||||
}, {
|
||||
token: keywordMapper,
|
||||
regex: /[^\s;]+/
|
||||
}]
|
||||
};
|
||||
};
|
||||
|
||||
oop.inherits(CspHighlightRules, TextHighlightRules);
|
||||
|
||||
exports.CspHighlightRules = CspHighlightRules;
|
||||
});
|
||||
|
||||
define("ace/mode/csp",["require","exports","module","ace/mode/text","ace/mode/csp_highlight_rules","ace/lib/oop"], function(require, exports, module) {
|
||||
"use strict";
|
||||
|
||||
var TextMode = require("./text").Mode;
|
||||
var CspHighlightRules = require("./csp_highlight_rules").CspHighlightRules;
|
||||
var oop = require("../lib/oop");
|
||||
|
||||
var Mode = function() {
|
||||
this.HighlightRules = CspHighlightRules;
|
||||
};
|
||||
|
||||
oop.inherits(Mode, TextMode);
|
||||
|
||||
(function() {
|
||||
this.$id = "ace/mode/csp";
|
||||
}).call(Mode.prototype);
|
||||
|
||||
exports.Mode = Mode;
|
||||
}); (function() {
|
||||
define("ace/mode/csp_highlight_rules",["require","exports","module","ace/lib/oop","ace/mode/text_highlight_rules"],function(e,t,n){"use strict";var r=e("../lib/oop"),i=e("./text_highlight_rules").TextHighlightRules,s=function(){var e=this.createKeywordMapper({"constant.language":"child-src|connect-src|default-src|font-src|frame-src|img-src|manifest-src|media-src|object-src|script-src|style-src|worker-src|base-uri|plugin-types|sandbox|disown-opener|form-action|frame-ancestors|report-uri|report-to|upgrade-insecure-requests|block-all-mixed-content|require-sri-for|reflected-xss|referrer|policy-uri",variable:"'none'|'self'|'unsafe-inline'|'unsafe-eval'|'strict-dynamic'|'unsafe-hashed-attributes'"},"identifier",!0);this.$rules={start:[{token:"string.link",regex:/https?:[^;\s]*/},{token:"operator.punctuation",regex:/;/},{token:e,regex:/[^\s;]+/}]}};r.inherits(s,i),t.CspHighlightRules=s}),define("ace/mode/csp",["require","exports","module","ace/mode/text","ace/mode/csp_highlight_rules","ace/lib/oop"],function(e,t,n){"use strict";var r=e("./text").Mode,i=e("./csp_highlight_rules").CspHighlightRules,s=e("../lib/oop"),o=function(){this.HighlightRules=i};s.inherits(o,r),function(){this.$id="ace/mode/csp"}.call(o.prototype),t.Mode=o}); (function() {
|
||||
window.require(["ace/mode/csp"], function(m) {
|
||||
if (typeof module == "object" && typeof exports == "object" && module) {
|
||||
module.exports = m;
|
||||
}
|
||||
});
|
||||
})();
|
||||
|
||||
File diff suppressed because one or more lines are too long
7
htdocs/includes/ace/src/mode-csv.js
Normal file
7
htdocs/includes/ace/src/mode-csv.js
Normal file
@@ -0,0 +1,7 @@
|
||||
define("ace/mode/csv_highlight_rules",["require","exports","module","ace/lib/oop","ace/mode/text_highlight_rules"],function(e,t,n){"use strict";var r=e("../lib/oop"),i=e("./text_highlight_rules").TextHighlightRules,s=function(){i.call(this)};r.inherits(s,i),t.CsvHighlightRules=s}),define("ace/mode/csv",["require","exports","module","ace/lib/oop","ace/mode/text","ace/lib/lang","ace/mode/csv_highlight_rules"],function(e,t,n){"use strict";function f(e,t,n){var r=[],i=e.split(n.separatorRegex),s=n.spliter,o=n.quote||'"',u=(t||"start").split("-"),f=parseInt(u[1])||0,l=u[0]=="string",c=!l;for(var h=0;h<i.length;h++){var p=i[h];if(p){var d=!1;p==s&&!l?(f++,c=!0,d=!0):p==o?c?(l=!0,c=!1):l&&(i[h+1]==""&&i[h+2]==o?(p=o+o,h+=2):l=!1):c=!1,r.push({value:p,type:a[f%a.length]+".csv_"+f+(d?".csv_separator":"")})}}return{tokens:r,state:l?"string-"+f:"start"}}var r=e("../lib/oop"),i=e("./text").Mode,s=e("../lib/lang").escapeRegExp,o=e("./csv_highlight_rules").CsvHighlightRules,u=function(e){this.HighlightRules=o,e||(e={});var t=[e.splitter||",",e.quote||'"'].map(s).join("|");this.$tokenizer={getLineTokens:function(e,t,n){return f(e,t,this.options)},options:{quotes:e.quote||'"',separatorRegex:new RegExp("("+t+")"),spliter:e.splitter||","},states:{}},this.$highlightRules=new this.HighlightRules};r.inherits(u,i),function(){this.getTokenizer=function(){return this.$tokenizer},this.$id="ace/mode/csv"}.call(u.prototype),t.Mode=u;var a=["keyword","text","string","string.regex","variable","constant.numeric"]}); (function() {
|
||||
window.require(["ace/mode/csv"], function(m) {
|
||||
if (typeof module == "object" && typeof exports == "object" && module) {
|
||||
module.exports = m;
|
||||
}
|
||||
});
|
||||
})();
|
||||
File diff suppressed because one or more lines are too long
7
htdocs/includes/ace/src/mode-cuttlefish.js
Normal file
7
htdocs/includes/ace/src/mode-cuttlefish.js
Normal file
@@ -0,0 +1,7 @@
|
||||
define("ace/mode/cuttlefish_highlight_rules",["require","exports","module","ace/lib/oop","ace/mode/text_highlight_rules"],function(e,t,n){"use strict";var r=e("../lib/oop"),i=e("./text_highlight_rules").TextHighlightRules,s=function(){this.$rules={start:[{token:["text","comment"],regex:/^([ \t]*)(#.*)$/},{token:["text","keyword","text","string","text","comment"],regex:/^([ \t]*)(include)([ \t]*)([A-Za-z0-9-\_\.\*\/]+)([ \t]*)(#.*)?$/},{token:["text","keyword","text","operator","text","string","text","comment"],regex:/^([ \t]*)([A-Za-z0-9-_]+(?:\.[A-Za-z0-9-_]+)*)([ \t]*)(=)([ \t]*)([^ \t#][^#]*?)([ \t]*)(#.*)?$/},{defaultToken:"invalid"}]},this.normalizeRules()};s.metaData={fileTypes:["conf"],keyEquivalent:"^~C",name:"Cuttlefish",scopeName:"source.conf"},r.inherits(s,i),t.CuttlefishHighlightRules=s}),define("ace/mode/cuttlefish",["require","exports","module","ace/lib/oop","ace/mode/text","ace/mode/cuttlefish_highlight_rules"],function(e,t,n){"use strict";var r=e("../lib/oop"),i=e("./text").Mode,s=e("./cuttlefish_highlight_rules").CuttlefishHighlightRules,o=function(){this.HighlightRules=s,this.foldingRules=null,this.$behaviour=this.$defaultBehaviour};r.inherits(o,i),function(){this.lineCommentStart="#",this.blockComment=null,this.$id="ace/mode/cuttlefish"}.call(o.prototype),t.Mode=o}); (function() {
|
||||
window.require(["ace/mode/cuttlefish"], function(m) {
|
||||
if (typeof module == "object" && typeof exports == "object" && module) {
|
||||
module.exports = m;
|
||||
}
|
||||
});
|
||||
})();
|
||||
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
@@ -1,147 +1,7 @@
|
||||
define("ace/mode/diff_highlight_rules",["require","exports","module","ace/lib/oop","ace/mode/text_highlight_rules"], function(require, exports, module) {
|
||||
"use strict";
|
||||
|
||||
var oop = require("../lib/oop");
|
||||
var TextHighlightRules = require("./text_highlight_rules").TextHighlightRules;
|
||||
|
||||
var DiffHighlightRules = function() {
|
||||
|
||||
this.$rules = {
|
||||
"start" : [{
|
||||
regex: "^(?:\\*{15}|={67}|-{3}|\\+{3})$",
|
||||
token: "punctuation.definition.separator.diff",
|
||||
"name": "keyword"
|
||||
}, { //diff.range.unified
|
||||
regex: "^(@@)(\\s*.+?\\s*)(@@)(.*)$",
|
||||
token: [
|
||||
"constant",
|
||||
"constant.numeric",
|
||||
"constant",
|
||||
"comment.doc.tag"
|
||||
]
|
||||
}, { //diff.range.normal
|
||||
regex: "^(\\d+)([,\\d]+)(a|d|c)(\\d+)([,\\d]+)(.*)$",
|
||||
token: [
|
||||
"constant.numeric",
|
||||
"punctuation.definition.range.diff",
|
||||
"constant.function",
|
||||
"constant.numeric",
|
||||
"punctuation.definition.range.diff",
|
||||
"invalid"
|
||||
],
|
||||
"name": "meta."
|
||||
}, {
|
||||
regex: "^(\\-{3}|\\+{3}|\\*{3})( .+)$",
|
||||
token: [
|
||||
"constant.numeric",
|
||||
"meta.tag"
|
||||
]
|
||||
}, { // added
|
||||
regex: "^([!+>])(.*?)(\\s*)$",
|
||||
token: [
|
||||
"support.constant",
|
||||
"text",
|
||||
"invalid"
|
||||
]
|
||||
}, { // removed
|
||||
regex: "^([<\\-])(.*?)(\\s*)$",
|
||||
token: [
|
||||
"support.function",
|
||||
"string",
|
||||
"invalid"
|
||||
]
|
||||
}, {
|
||||
regex: "^(diff)(\\s+--\\w+)?(.+?)( .+)?$",
|
||||
token: ["variable", "variable", "keyword", "variable"]
|
||||
}, {
|
||||
regex: "^Index.+$",
|
||||
token: "variable"
|
||||
}, {
|
||||
regex: "^\\s+$",
|
||||
token: "text"
|
||||
}, {
|
||||
regex: "\\s*$",
|
||||
token: "invalid"
|
||||
}, {
|
||||
defaultToken: "invisible",
|
||||
caseInsensitive: true
|
||||
}
|
||||
]
|
||||
};
|
||||
};
|
||||
|
||||
oop.inherits(DiffHighlightRules, TextHighlightRules);
|
||||
|
||||
exports.DiffHighlightRules = DiffHighlightRules;
|
||||
});
|
||||
|
||||
define("ace/mode/folding/diff",["require","exports","module","ace/lib/oop","ace/mode/folding/fold_mode","ace/range"], function(require, exports, module) {
|
||||
"use strict";
|
||||
|
||||
var oop = require("../../lib/oop");
|
||||
var BaseFoldMode = require("./fold_mode").FoldMode;
|
||||
var Range = require("../../range").Range;
|
||||
|
||||
var FoldMode = exports.FoldMode = function(levels, flag) {
|
||||
this.regExpList = levels;
|
||||
this.flag = flag;
|
||||
this.foldingStartMarker = RegExp("^(" + levels.join("|") + ")", this.flag);
|
||||
};
|
||||
oop.inherits(FoldMode, BaseFoldMode);
|
||||
|
||||
(function() {
|
||||
this.getFoldWidgetRange = function(session, foldStyle, row) {
|
||||
var line = session.getLine(row);
|
||||
var start = {row: row, column: line.length};
|
||||
|
||||
var regList = this.regExpList;
|
||||
for (var i = 1; i <= regList.length; i++) {
|
||||
var re = RegExp("^(" + regList.slice(0, i).join("|") + ")", this.flag);
|
||||
if (re.test(line))
|
||||
break;
|
||||
}
|
||||
|
||||
for (var l = session.getLength(); ++row < l; ) {
|
||||
line = session.getLine(row);
|
||||
if (re.test(line))
|
||||
break;
|
||||
}
|
||||
if (row == start.row + 1)
|
||||
return;
|
||||
return new Range(start.row, start.column, row - 1, line.length);
|
||||
};
|
||||
|
||||
}).call(FoldMode.prototype);
|
||||
|
||||
});
|
||||
|
||||
define("ace/mode/diff",["require","exports","module","ace/lib/oop","ace/mode/text","ace/mode/diff_highlight_rules","ace/mode/folding/diff"], function(require, exports, module) {
|
||||
"use strict";
|
||||
|
||||
var oop = require("../lib/oop");
|
||||
var TextMode = require("./text").Mode;
|
||||
var HighlightRules = require("./diff_highlight_rules").DiffHighlightRules;
|
||||
var FoldMode = require("./folding/diff").FoldMode;
|
||||
|
||||
var Mode = function() {
|
||||
this.HighlightRules = HighlightRules;
|
||||
this.foldingRules = new FoldMode(["diff", "@@|\\*{5}"], "i");
|
||||
};
|
||||
oop.inherits(Mode, TextMode);
|
||||
|
||||
(function() {
|
||||
|
||||
this.$id = "ace/mode/diff";
|
||||
this.snippetFileId = "ace/snippets/diff";
|
||||
}).call(Mode.prototype);
|
||||
|
||||
exports.Mode = Mode;
|
||||
|
||||
}); (function() {
|
||||
define("ace/mode/diff_highlight_rules",["require","exports","module","ace/lib/oop","ace/mode/text_highlight_rules"],function(e,t,n){"use strict";var r=e("../lib/oop"),i=e("./text_highlight_rules").TextHighlightRules,s=function(){this.$rules={start:[{regex:"^(?:\\*{15}|={67}|-{3}|\\+{3})$",token:"punctuation.definition.separator.diff",name:"keyword"},{regex:"^(@@)(\\s*.+?\\s*)(@@)(.*)$",token:["constant","constant.numeric","constant","comment.doc.tag"]},{regex:"^(\\d+)([,\\d]+)(a|d|c)(\\d+)([,\\d]+)(.*)$",token:["constant.numeric","punctuation.definition.range.diff","constant.function","constant.numeric","punctuation.definition.range.diff","invalid"],name:"meta."},{regex:"^(\\-{3}|\\+{3}|\\*{3})( .+)$",token:["constant.numeric","meta.tag"]},{regex:"^([!+>])(.*?)(\\s*)$",token:["support.constant","text","invalid"]},{regex:"^([<\\-])(.*?)(\\s*)$",token:["support.function","string","invalid"]},{regex:"^(diff)(\\s+--\\w+)?(.+?)( .+)?$",token:["variable","variable","keyword","variable"]},{regex:"^Index.+$",token:"variable"},{regex:"^\\s+$",token:"text"},{regex:"\\s*$",token:"invalid"},{defaultToken:"invisible",caseInsensitive:!0}]}};r.inherits(s,i),t.DiffHighlightRules=s}),define("ace/mode/folding/diff",["require","exports","module","ace/lib/oop","ace/mode/folding/fold_mode","ace/range"],function(e,t,n){"use strict";var r=e("../../lib/oop"),i=e("./fold_mode").FoldMode,s=e("../../range").Range,o=t.FoldMode=function(e,t){this.regExpList=e,this.flag=t,this.foldingStartMarker=RegExp("^("+e.join("|")+")",this.flag)};r.inherits(o,i),function(){this.getFoldWidgetRange=function(e,t,n){var r=e.getLine(n),i={row:n,column:r.length},o=this.regExpList;for(var u=1;u<=o.length;u++){var a=RegExp("^("+o.slice(0,u).join("|")+")",this.flag);if(a.test(r))break}for(var f=e.getLength();++n<f;){r=e.getLine(n);if(a.test(r))break}if(n==i.row+1)return;return new s(i.row,i.column,n-1,r.length)}}.call(o.prototype)}),define("ace/mode/diff",["require","exports","module","ace/lib/oop","ace/mode/text","ace/mode/diff_highlight_rules","ace/mode/folding/diff"],function(e,t,n){"use strict";var r=e("../lib/oop"),i=e("./text").Mode,s=e("./diff_highlight_rules").DiffHighlightRules,o=e("./folding/diff").FoldMode,u=function(){this.HighlightRules=s,this.foldingRules=new o(["diff","@@|\\*{5}"],"i")};r.inherits(u,i),function(){this.$id="ace/mode/diff",this.snippetFileId="ace/snippets/diff"}.call(u.prototype),t.Mode=u}); (function() {
|
||||
window.require(["ace/mode/diff"], function(m) {
|
||||
if (typeof module == "object" && typeof exports == "object" && module) {
|
||||
module.exports = m;
|
||||
}
|
||||
});
|
||||
})();
|
||||
|
||||
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
@@ -1,166 +1,7 @@
|
||||
define("ace/mode/doc_comment_highlight_rules",["require","exports","module","ace/lib/oop","ace/mode/text_highlight_rules"], function(require, exports, module) {
|
||||
"use strict";
|
||||
|
||||
var oop = require("../lib/oop");
|
||||
var TextHighlightRules = require("./text_highlight_rules").TextHighlightRules;
|
||||
|
||||
var DocCommentHighlightRules = function() {
|
||||
this.$rules = {
|
||||
"start" : [ {
|
||||
token : "comment.doc.tag",
|
||||
regex : "@[\\w\\d_]+" // TODO: fix email addresses
|
||||
},
|
||||
DocCommentHighlightRules.getTagRule(),
|
||||
{
|
||||
defaultToken : "comment.doc",
|
||||
caseInsensitive: true
|
||||
}]
|
||||
};
|
||||
};
|
||||
|
||||
oop.inherits(DocCommentHighlightRules, TextHighlightRules);
|
||||
|
||||
DocCommentHighlightRules.getTagRule = function(start) {
|
||||
return {
|
||||
token : "comment.doc.tag.storage.type",
|
||||
regex : "\\b(?:TODO|FIXME|XXX|HACK)\\b"
|
||||
};
|
||||
};
|
||||
|
||||
DocCommentHighlightRules.getStartRule = function(start) {
|
||||
return {
|
||||
token : "comment.doc", // doc comment
|
||||
regex : "\\/\\*(?=\\*)",
|
||||
next : start
|
||||
};
|
||||
};
|
||||
|
||||
DocCommentHighlightRules.getEndRule = function (start) {
|
||||
return {
|
||||
token : "comment.doc", // closing comment
|
||||
regex : "\\*\\/",
|
||||
next : start
|
||||
};
|
||||
};
|
||||
|
||||
|
||||
exports.DocCommentHighlightRules = DocCommentHighlightRules;
|
||||
|
||||
});
|
||||
|
||||
define("ace/mode/edifact_highlight_rules",["require","exports","module","ace/lib/oop","ace/mode/doc_comment_highlight_rules","ace/mode/text_highlight_rules"], function(require, exports, module) {
|
||||
"use strict";
|
||||
|
||||
var oop = require("../lib/oop");
|
||||
var DocCommentHighlightRules = require("./doc_comment_highlight_rules").DocCommentHighlightRules;
|
||||
var TextHighlightRules = require("./text_highlight_rules").TextHighlightRules;
|
||||
|
||||
var EdifactHighlightRules = function() {
|
||||
|
||||
var header = (
|
||||
"UNH"
|
||||
);
|
||||
var segment = (
|
||||
"ADR|AGR|AJT|ALC|ALI|APP|APR|ARD|ARR|ASI|ATT|AUT|"+
|
||||
"BAS|BGM|BII|BUS|"+
|
||||
"CAV|CCD|CCI|CDI|CDS|CDV|CED|CIN|CLA|CLI|CMP|CNI|CNT|COD|COM|COT|CPI|CPS|CPT|CST|CTA|CUX|"+
|
||||
"DAM|DFN|DGS|DII|DIM|DLI|DLM|DMS|DOC|DRD|DSG|DSI|DTM|"+
|
||||
"EDT|EFI|ELM|ELU|ELV|EMP|EQA|EQD|EQN|ERC|ERP|EVE|FCA|FII|FNS|FNT|FOR|FSQ|FTX|"+
|
||||
"GDS|GEI|GID|GIN|GIR|GOR|GPO|GRU|HAN|HYN|ICD|IDE|IFD|IHC|IMD|IND|INP|INV|IRQ|"+
|
||||
"LAN|LIN|LOC|MEA|MEM|MKS|MOA|MSG|MTD|NAD|NAT|"+
|
||||
"PAC|PAI|PAS|PCC|PCD|PCI|PDI|PER|PGI|PIA|PNA|POC|PRC|PRI|PRV|PSD|PTY|PYT|"+
|
||||
"QRS|QTY|QUA|QVR|"+
|
||||
"RCS|REL|RFF|RJL|RNG|ROD|RSL|RTE|"+
|
||||
"SAL|SCC|SCD|SEG|SEL|SEQ|SFI|SGP|SGU|SPR|SPS|STA|STC|STG|STS|"+
|
||||
"TAX|TCC|TDT|TEM|TMD|TMP|TOD|TPL|TRU|TSR|"+
|
||||
"UNB|UNZ|UNT|UGH|UGT|UNS|"+
|
||||
"VLI"
|
||||
);
|
||||
|
||||
var header = (
|
||||
"UNH"
|
||||
);
|
||||
|
||||
var buildinConstants = ("null|Infinity|NaN|undefined");
|
||||
var langClasses = (
|
||||
""
|
||||
);
|
||||
|
||||
var keywords = (
|
||||
"BY|SE|ON|INV|JP|UNOA"
|
||||
);
|
||||
|
||||
var keywordMapper = this.createKeywordMapper({
|
||||
"variable.language": "this",
|
||||
"keyword": keywords,
|
||||
"entity.name.segment":segment,
|
||||
"entity.name.header":header,
|
||||
"constant.language": buildinConstants,
|
||||
"support.function": langClasses
|
||||
}, "identifier");
|
||||
|
||||
this.$rules = {
|
||||
"start" : [
|
||||
{
|
||||
token : "punctuation.operator",
|
||||
regex : "\\+.\\+"
|
||||
}, {
|
||||
token : "constant.language.boolean",
|
||||
regex : "(?:true|false)\\b"
|
||||
}, {
|
||||
token : keywordMapper,
|
||||
regex : "[a-zA-Z_$][a-zA-Z0-9_$]*\\b"
|
||||
}, {
|
||||
token : "keyword.operator",
|
||||
regex : "\\+"
|
||||
}, {
|
||||
token : "punctuation.operator",
|
||||
regex : "\\:|'"
|
||||
},{
|
||||
token : "identifier",
|
||||
regex : "\\:D\\:"
|
||||
}
|
||||
]
|
||||
};
|
||||
|
||||
this.embedRules(DocCommentHighlightRules, "doc-",
|
||||
[ DocCommentHighlightRules.getEndRule("start") ]);
|
||||
};
|
||||
|
||||
EdifactHighlightRules.metaData = { fileTypes: [ 'edi' ],
|
||||
keyEquivalent: '^~E',
|
||||
name: 'Edifact',
|
||||
scopeName: 'source.edifact' };
|
||||
|
||||
oop.inherits(EdifactHighlightRules, TextHighlightRules);
|
||||
|
||||
exports.EdifactHighlightRules = EdifactHighlightRules;
|
||||
});
|
||||
|
||||
define("ace/mode/edifact",["require","exports","module","ace/lib/oop","ace/mode/text","ace/mode/edifact_highlight_rules"], function(require, exports, module) {
|
||||
"use strict";
|
||||
|
||||
var oop = require("../lib/oop");
|
||||
var TextMode = require("./text").Mode;
|
||||
var EdifactHighlightRules = require("./edifact_highlight_rules").EdifactHighlightRules;
|
||||
|
||||
var Mode = function() {
|
||||
|
||||
this.HighlightRules = EdifactHighlightRules;
|
||||
};
|
||||
oop.inherits(Mode, TextMode);
|
||||
|
||||
(function() {
|
||||
this.$id = "ace/mode/edifact";
|
||||
this.snippetFileId = "ace/snippets/edifact";
|
||||
}).call(Mode.prototype);
|
||||
|
||||
exports.Mode = Mode;
|
||||
}); (function() {
|
||||
define("ace/mode/doc_comment_highlight_rules",["require","exports","module","ace/lib/oop","ace/mode/text_highlight_rules"],function(e,t,n){"use strict";var r=e("../lib/oop"),i=e("./text_highlight_rules").TextHighlightRules,s=function(){this.$rules={start:[{token:"comment.doc.tag",regex:"@\\w+(?=\\s|$)"},s.getTagRule(),{defaultToken:"comment.doc.body",caseInsensitive:!0}]}};r.inherits(s,i),s.getTagRule=function(e){return{token:"comment.doc.tag.storage.type",regex:"\\b(?:TODO|FIXME|XXX|HACK)\\b"}},s.getStartRule=function(e){return{token:"comment.doc",regex:/\/\*\*(?!\/)/,next:e}},s.getEndRule=function(e){return{token:"comment.doc",regex:"\\*\\/",next:e}},t.DocCommentHighlightRules=s}),define("ace/mode/edifact_highlight_rules",["require","exports","module","ace/lib/oop","ace/mode/doc_comment_highlight_rules","ace/mode/text_highlight_rules"],function(e,t,n){"use strict";var r=e("../lib/oop"),i=e("./doc_comment_highlight_rules").DocCommentHighlightRules,s=e("./text_highlight_rules").TextHighlightRules,o=function(){var e="UNH",t="ADR|AGR|AJT|ALC|ALI|APP|APR|ARD|ARR|ASI|ATT|AUT|BAS|BGM|BII|BUS|CAV|CCD|CCI|CDI|CDS|CDV|CED|CIN|CLA|CLI|CMP|CNI|CNT|COD|COM|COT|CPI|CPS|CPT|CST|CTA|CUX|DAM|DFN|DGS|DII|DIM|DLI|DLM|DMS|DOC|DRD|DSG|DSI|DTM|EDT|EFI|ELM|ELU|ELV|EMP|EQA|EQD|EQN|ERC|ERP|EVE|FCA|FII|FNS|FNT|FOR|FSQ|FTX|GDS|GEI|GID|GIN|GIR|GOR|GPO|GRU|HAN|HYN|ICD|IDE|IFD|IHC|IMD|IND|INP|INV|IRQ|LAN|LIN|LOC|MEA|MEM|MKS|MOA|MSG|MTD|NAD|NAT|PAC|PAI|PAS|PCC|PCD|PCI|PDI|PER|PGI|PIA|PNA|POC|PRC|PRI|PRV|PSD|PTY|PYT|QRS|QTY|QUA|QVR|RCS|REL|RFF|RJL|RNG|ROD|RSL|RTE|SAL|SCC|SCD|SEG|SEL|SEQ|SFI|SGP|SGU|SPR|SPS|STA|STC|STG|STS|TAX|TCC|TDT|TEM|TMD|TMP|TOD|TPL|TRU|TSR|UNB|UNZ|UNT|UGH|UGT|UNS|VLI",e="UNH",n="null|Infinity|NaN|undefined",r="",s="BY|SE|ON|INV|JP|UNOA",o=this.createKeywordMapper({"variable.language":"this",keyword:s,"entity.name.segment":t,"entity.name.header":e,"constant.language":n,"support.function":r},"identifier");this.$rules={start:[{token:"punctuation.operator",regex:"\\+.\\+"},{token:"constant.language.boolean",regex:"(?:true|false)\\b"},{token:o,regex:"[a-zA-Z_$][a-zA-Z0-9_$]*\\b"},{token:"keyword.operator",regex:"\\+"},{token:"punctuation.operator",regex:"\\:|'"},{token:"identifier",regex:"\\:D\\:"}]},this.embedRules(i,"doc-",[i.getEndRule("start")])};o.metaData={fileTypes:["edi"],keyEquivalent:"^~E",name:"Edifact",scopeName:"source.edifact"},r.inherits(o,s),t.EdifactHighlightRules=o}),define("ace/mode/edifact",["require","exports","module","ace/lib/oop","ace/mode/text","ace/mode/edifact_highlight_rules"],function(e,t,n){"use strict";var r=e("../lib/oop"),i=e("./text").Mode,s=e("./edifact_highlight_rules").EdifactHighlightRules,o=function(){this.HighlightRules=s,this.$behaviour=this.$defaultBehaviour};r.inherits(o,i),function(){this.$id="ace/mode/edifact",this.snippetFileId="ace/snippets/edifact"}.call(o.prototype),t.Mode=o}); (function() {
|
||||
window.require(["ace/mode/edifact"], function(m) {
|
||||
if (typeof module == "object" && typeof exports == "object" && module) {
|
||||
module.exports = m;
|
||||
}
|
||||
});
|
||||
})();
|
||||
|
||||
@@ -1,135 +1,7 @@
|
||||
define("ace/mode/eiffel_highlight_rules",["require","exports","module","ace/lib/oop","ace/mode/text_highlight_rules"], function(require, exports, module) {
|
||||
"use strict";
|
||||
|
||||
var oop = require("../lib/oop");
|
||||
var TextHighlightRules = require("./text_highlight_rules").TextHighlightRules;
|
||||
|
||||
var EiffelHighlightRules = function() {
|
||||
var keywords = "across|agent|alias|all|attached|as|assign|attribute|check|" +
|
||||
"class|convert|create|debug|deferred|detachable|do|else|elseif|end|" +
|
||||
"ensure|expanded|export|external|feature|from|frozen|if|inherit|" +
|
||||
"inspect|invariant|like|local|loop|not|note|obsolete|old|once|" +
|
||||
"Precursor|redefine|rename|require|rescue|retry|select|separate|" +
|
||||
"some|then|undefine|until|variant|when";
|
||||
|
||||
var operatorKeywords = "and|implies|or|xor";
|
||||
|
||||
var languageConstants = "Void";
|
||||
|
||||
var booleanConstants = "True|False";
|
||||
|
||||
var languageVariables = "Current|Result";
|
||||
|
||||
var keywordMapper = this.createKeywordMapper({
|
||||
"constant.language": languageConstants,
|
||||
"constant.language.boolean": booleanConstants,
|
||||
"variable.language": languageVariables,
|
||||
"keyword.operator": operatorKeywords,
|
||||
"keyword": keywords
|
||||
}, "identifier", true);
|
||||
|
||||
var simpleString = /(?:[^"%\b\f\v]|%[A-DFHLNQR-V%'"()<>]|%\/(?:0[xX][\da-fA-F](?:_*[\da-fA-F])*|0[cC][0-7](?:_*[0-7])*|0[bB][01](?:_*[01])*|\d(?:_*\d)*)\/)+?/;
|
||||
|
||||
this.$rules = {
|
||||
"start": [{
|
||||
token : "string.quoted.other", // Aligned-verbatim-strings (verbatim option not supported)
|
||||
regex : /"\[/,
|
||||
next: "aligned_verbatim_string"
|
||||
}, {
|
||||
token : "string.quoted.other", // Non-aligned-verbatim-strings (verbatim option not supported)
|
||||
regex : /"\{/,
|
||||
next: "non-aligned_verbatim_string"
|
||||
}, {
|
||||
token : "string.quoted.double",
|
||||
regex : /"(?:[^%\b\f\n\r\v]|%[A-DFHLNQR-V%'"()<>]|%\/(?:0[xX][\da-fA-F](?:_*[\da-fA-F])*|0[cC][0-7](?:_*[0-7])*|0[bB][01](?:_*[01])*|\d(?:_*\d)*)\/)*?"/
|
||||
}, {
|
||||
token : "comment.line.double-dash",
|
||||
regex : /--.*/
|
||||
}, {
|
||||
token : "constant.character",
|
||||
regex : /'(?:[^%\b\f\n\r\t\v]|%[A-DFHLNQR-V%'"()<>]|%\/(?:0[xX][\da-fA-F](?:_*[\da-fA-F])*|0[cC][0-7](?:_*[0-7])*|0[bB][01](?:_*[01])*|\d(?:_*\d)*)\/)'/
|
||||
}, {
|
||||
token : "constant.numeric", // hexa | octal | bin
|
||||
regex : /\b0(?:[xX][\da-fA-F](?:_*[\da-fA-F])*|[cC][0-7](?:_*[0-7])*|[bB][01](?:_*[01])*)\b/
|
||||
}, {
|
||||
token : "constant.numeric",
|
||||
regex : /(?:\d(?:_*\d)*)?\.(?:(?:\d(?:_*\d)*)?[eE][+-]?)?\d(?:_*\d)*|\d(?:_*\d)*\.?/
|
||||
}, {
|
||||
token : "paren.lparen",
|
||||
regex : /[\[({]|<<|\|\(/
|
||||
}, {
|
||||
token : "paren.rparen",
|
||||
regex : /[\])}]|>>|\|\)/
|
||||
}, {
|
||||
token : "keyword.operator", // punctuation
|
||||
regex : /:=|->|\.(?=\w)|[;,:?]/
|
||||
}, {
|
||||
token : "keyword.operator",
|
||||
regex : /\\\\|\|\.\.\||\.\.|\/[~\/]?|[><\/]=?|[-+*^=~]/
|
||||
}, {
|
||||
token : function (v) {
|
||||
var result = keywordMapper(v);
|
||||
if (result === "identifier" && v === v.toUpperCase()) {
|
||||
result = "entity.name.type";
|
||||
}
|
||||
return result;
|
||||
},
|
||||
regex : /[a-zA-Z][a-zA-Z\d_]*\b/
|
||||
}, {
|
||||
token : "text",
|
||||
regex : /\s+/
|
||||
}
|
||||
],
|
||||
"aligned_verbatim_string" : [{
|
||||
token : "string",
|
||||
regex : /]"/,
|
||||
next : "start"
|
||||
}, {
|
||||
token : "string",
|
||||
regex : simpleString
|
||||
}
|
||||
],
|
||||
"non-aligned_verbatim_string" : [{
|
||||
token : "string.quoted.other",
|
||||
regex : /}"/,
|
||||
next : "start"
|
||||
}, {
|
||||
token : "string.quoted.other",
|
||||
regex : simpleString
|
||||
}
|
||||
]};
|
||||
};
|
||||
|
||||
oop.inherits(EiffelHighlightRules, TextHighlightRules);
|
||||
|
||||
exports.EiffelHighlightRules = EiffelHighlightRules;
|
||||
});
|
||||
|
||||
define("ace/mode/eiffel",["require","exports","module","ace/lib/oop","ace/mode/text","ace/mode/eiffel_highlight_rules"], function(require, exports, module) {
|
||||
"use strict";
|
||||
|
||||
var oop = require("../lib/oop");
|
||||
var TextMode = require("./text").Mode;
|
||||
var EiffelHighlightRules = require("./eiffel_highlight_rules").EiffelHighlightRules;
|
||||
|
||||
var Mode = function() {
|
||||
this.HighlightRules = EiffelHighlightRules;
|
||||
this.$behaviour = this.$defaultBehaviour;
|
||||
};
|
||||
oop.inherits(Mode, TextMode);
|
||||
|
||||
(function() {
|
||||
this.lineCommentStart = "--";
|
||||
this.$id = "ace/mode/eiffel";
|
||||
}).call(Mode.prototype);
|
||||
|
||||
exports.Mode = Mode;
|
||||
|
||||
}); (function() {
|
||||
define("ace/mode/eiffel_highlight_rules",["require","exports","module","ace/lib/oop","ace/mode/text_highlight_rules"],function(e,t,n){"use strict";var r=e("../lib/oop"),i=e("./text_highlight_rules").TextHighlightRules,s=function(){var e="across|agent|alias|all|attached|as|assign|attribute|check|class|convert|create|debug|deferred|detachable|do|else|elseif|end|ensure|expanded|export|external|feature|from|frozen|if|inherit|inspect|invariant|like|local|loop|not|note|obsolete|old|once|Precursor|redefine|rename|require|rescue|retry|select|separate|some|then|undefine|until|variant|when",t="and|implies|or|xor",n="Void",r="True|False",i="Current|Result",s=this.createKeywordMapper({"constant.language":n,"constant.language.boolean":r,"variable.language":i,"keyword.operator":t,keyword:e},"identifier",!0),o=/(?:[^"%\b\f\v]|%[A-DFHLNQR-V%'"()<>]|%\/(?:0[xX][\da-fA-F](?:_*[\da-fA-F])*|0[cC][0-7](?:_*[0-7])*|0[bB][01](?:_*[01])*|\d(?:_*\d)*)\/)+?/;this.$rules={start:[{token:"string.quoted.other",regex:/"\[/,next:"aligned_verbatim_string"},{token:"string.quoted.other",regex:/"\{/,next:"non-aligned_verbatim_string"},{token:"string.quoted.double",regex:/"(?:[^%\b\f\n\r\v]|%[A-DFHLNQR-V%'"()<>]|%\/(?:0[xX][\da-fA-F](?:_*[\da-fA-F])*|0[cC][0-7](?:_*[0-7])*|0[bB][01](?:_*[01])*|\d(?:_*\d)*)\/)*?"/},{token:"comment.line.double-dash",regex:/--.*/},{token:"constant.character",regex:/'(?:[^%\b\f\n\r\t\v]|%[A-DFHLNQR-V%'"()<>]|%\/(?:0[xX][\da-fA-F](?:_*[\da-fA-F])*|0[cC][0-7](?:_*[0-7])*|0[bB][01](?:_*[01])*|\d(?:_*\d)*)\/)'/},{token:"constant.numeric",regex:/\b0(?:[xX][\da-fA-F](?:_*[\da-fA-F])*|[cC][0-7](?:_*[0-7])*|[bB][01](?:_*[01])*)\b/},{token:"constant.numeric",regex:/(?:\d(?:_*\d)*)?\.(?:(?:\d(?:_*\d)*)?[eE][+-]?)?\d(?:_*\d)*|\d(?:_*\d)*\.?/},{token:"paren.lparen",regex:/[\[({]|<<|\|\(/},{token:"paren.rparen",regex:/[\])}]|>>|\|\)/},{token:"keyword.operator",regex:/:=|->|\.(?=\w)|[;,:?]/},{token:"keyword.operator",regex:/\\\\|\|\.\.\||\.\.|\/[~\/]?|[><\/]=?|[-+*^=~]/},{token:function(e){var t=s(e);return t==="identifier"&&e===e.toUpperCase()&&(t="entity.name.type"),t},regex:/[a-zA-Z][a-zA-Z\d_]*\b/},{token:"text",regex:/\s+/}],aligned_verbatim_string:[{token:"string",regex:/]"/,next:"start"},{token:"string",regex:o}],"non-aligned_verbatim_string":[{token:"string.quoted.other",regex:/}"/,next:"start"},{token:"string.quoted.other",regex:o}]}};r.inherits(s,i),t.EiffelHighlightRules=s}),define("ace/mode/eiffel",["require","exports","module","ace/lib/oop","ace/mode/text","ace/mode/eiffel_highlight_rules"],function(e,t,n){"use strict";var r=e("../lib/oop"),i=e("./text").Mode,s=e("./eiffel_highlight_rules").EiffelHighlightRules,o=function(){this.HighlightRules=s,this.$behaviour=this.$defaultBehaviour};r.inherits(o,i),function(){this.lineCommentStart="--",this.$id="ace/mode/eiffel"}.call(o.prototype),t.Mode=o}); (function() {
|
||||
window.require(["ace/mode/eiffel"], function(m) {
|
||||
if (typeof module == "object" && typeof exports == "object" && module) {
|
||||
module.exports = m;
|
||||
}
|
||||
});
|
||||
})();
|
||||
|
||||
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
@@ -1,306 +1,7 @@
|
||||
define("ace/mode/elm_highlight_rules",["require","exports","module","ace/lib/oop","ace/mode/text_highlight_rules"], function(require, exports, module) {
|
||||
"use strict";
|
||||
|
||||
var oop = require("../lib/oop");
|
||||
var TextHighlightRules = require("./text_highlight_rules").TextHighlightRules;
|
||||
|
||||
var ElmHighlightRules = function() {
|
||||
var keywordMapper = this.createKeywordMapper({
|
||||
"keyword": "as|case|class|data|default|deriving|do|else|export|foreign|" +
|
||||
"hiding|jsevent|if|import|in|infix|infixl|infixr|instance|let|" +
|
||||
"module|newtype|of|open|then|type|where|_|port|\u03BB"
|
||||
}, "identifier");
|
||||
|
||||
var escapeRe = /\\(\d+|['"\\&trnbvf])/;
|
||||
|
||||
var smallRe = /[a-z_]/.source;
|
||||
var largeRe = /[A-Z]/.source;
|
||||
var idRe = /[a-z_A-Z0-9']/.source;
|
||||
|
||||
this.$rules = {
|
||||
start: [{
|
||||
token: "string.start",
|
||||
regex: '"',
|
||||
next: "string"
|
||||
}, {
|
||||
token: "string.character",
|
||||
regex: "'(?:" + escapeRe.source + "|.)'?"
|
||||
}, {
|
||||
regex: /0(?:[xX][0-9A-Fa-f]+|[oO][0-7]+)|\d+(\.\d+)?([eE][-+]?\d*)?/,
|
||||
token: "constant.numeric"
|
||||
}, {
|
||||
token: "comment",
|
||||
regex: "--.*"
|
||||
}, {
|
||||
token : "keyword",
|
||||
regex : /\.\.|\||:|=|\\|"|->|<-|\u2192/
|
||||
}, {
|
||||
token : "keyword.operator",
|
||||
regex : /[-!#$%&*+.\/<=>?@\\^|~:\u03BB\u2192]+/
|
||||
}, {
|
||||
token : "operator.punctuation",
|
||||
regex : /[,;`]/
|
||||
}, {
|
||||
regex : largeRe + idRe + "+\\.?",
|
||||
token : function(value) {
|
||||
if (value[value.length - 1] == ".")
|
||||
return "entity.name.function";
|
||||
return "constant.language";
|
||||
}
|
||||
}, {
|
||||
regex : "^" + smallRe + idRe + "+",
|
||||
token : function(value) {
|
||||
return "constant.language";
|
||||
}
|
||||
}, {
|
||||
token : keywordMapper,
|
||||
regex : "[\\w\\xff-\\u218e\\u2455-\\uffff]+\\b"
|
||||
}, {
|
||||
regex: "{-#?",
|
||||
token: "comment.start",
|
||||
onMatch: function(value, currentState, stack) {
|
||||
this.next = value.length == 2 ? "blockComment" : "docComment";
|
||||
return this.token;
|
||||
}
|
||||
}, {
|
||||
token: "variable.language",
|
||||
regex: /\[markdown\|/,
|
||||
next: "markdown"
|
||||
}, {
|
||||
token: "paren.lparen",
|
||||
regex: /[\[({]/
|
||||
}, {
|
||||
token: "paren.rparen",
|
||||
regex: /[\])}]/
|
||||
} ],
|
||||
markdown: [{
|
||||
regex: /\|\]/,
|
||||
next: "start"
|
||||
}, {
|
||||
defaultToken : "string"
|
||||
}],
|
||||
blockComment: [{
|
||||
regex: "{-",
|
||||
token: "comment.start",
|
||||
push: "blockComment"
|
||||
}, {
|
||||
regex: "-}",
|
||||
token: "comment.end",
|
||||
next: "pop"
|
||||
}, {
|
||||
defaultToken: "comment"
|
||||
}],
|
||||
docComment: [{
|
||||
regex: "{-",
|
||||
token: "comment.start",
|
||||
push: "docComment"
|
||||
}, {
|
||||
regex: "-}",
|
||||
token: "comment.end",
|
||||
next: "pop"
|
||||
}, {
|
||||
defaultToken: "doc.comment"
|
||||
}],
|
||||
string: [{
|
||||
token: "constant.language.escape",
|
||||
regex: escapeRe
|
||||
}, {
|
||||
token: "text",
|
||||
regex: /\\(\s|$)/,
|
||||
next: "stringGap"
|
||||
}, {
|
||||
token: "string.end",
|
||||
regex: '"',
|
||||
next: "start"
|
||||
}, {
|
||||
defaultToken: "string"
|
||||
}],
|
||||
stringGap: [{
|
||||
token: "text",
|
||||
regex: /\\/,
|
||||
next: "string"
|
||||
}, {
|
||||
token: "error",
|
||||
regex: "",
|
||||
next: "start"
|
||||
}]
|
||||
};
|
||||
|
||||
this.normalizeRules();
|
||||
};
|
||||
|
||||
oop.inherits(ElmHighlightRules, TextHighlightRules);
|
||||
|
||||
exports.ElmHighlightRules = ElmHighlightRules;
|
||||
});
|
||||
|
||||
define("ace/mode/folding/cstyle",["require","exports","module","ace/lib/oop","ace/range","ace/mode/folding/fold_mode"], function(require, exports, module) {
|
||||
"use strict";
|
||||
|
||||
var oop = require("../../lib/oop");
|
||||
var Range = require("../../range").Range;
|
||||
var BaseFoldMode = require("./fold_mode").FoldMode;
|
||||
|
||||
var FoldMode = exports.FoldMode = function(commentRegex) {
|
||||
if (commentRegex) {
|
||||
this.foldingStartMarker = new RegExp(
|
||||
this.foldingStartMarker.source.replace(/\|[^|]*?$/, "|" + commentRegex.start)
|
||||
);
|
||||
this.foldingStopMarker = new RegExp(
|
||||
this.foldingStopMarker.source.replace(/\|[^|]*?$/, "|" + commentRegex.end)
|
||||
);
|
||||
}
|
||||
};
|
||||
oop.inherits(FoldMode, BaseFoldMode);
|
||||
|
||||
(function() {
|
||||
|
||||
this.foldingStartMarker = /([\{\[\(])[^\}\]\)]*$|^\s*(\/\*)/;
|
||||
this.foldingStopMarker = /^[^\[\{\(]*([\}\]\)])|^[\s\*]*(\*\/)/;
|
||||
this.singleLineBlockCommentRe= /^\s*(\/\*).*\*\/\s*$/;
|
||||
this.tripleStarBlockCommentRe = /^\s*(\/\*\*\*).*\*\/\s*$/;
|
||||
this.startRegionRe = /^\s*(\/\*|\/\/)#?region\b/;
|
||||
this._getFoldWidgetBase = this.getFoldWidget;
|
||||
this.getFoldWidget = function(session, foldStyle, row) {
|
||||
var line = session.getLine(row);
|
||||
|
||||
if (this.singleLineBlockCommentRe.test(line)) {
|
||||
if (!this.startRegionRe.test(line) && !this.tripleStarBlockCommentRe.test(line))
|
||||
return "";
|
||||
}
|
||||
|
||||
var fw = this._getFoldWidgetBase(session, foldStyle, row);
|
||||
|
||||
if (!fw && this.startRegionRe.test(line))
|
||||
return "start"; // lineCommentRegionStart
|
||||
|
||||
return fw;
|
||||
};
|
||||
|
||||
this.getFoldWidgetRange = function(session, foldStyle, row, forceMultiline) {
|
||||
var line = session.getLine(row);
|
||||
|
||||
if (this.startRegionRe.test(line))
|
||||
return this.getCommentRegionBlock(session, line, row);
|
||||
|
||||
var match = line.match(this.foldingStartMarker);
|
||||
if (match) {
|
||||
var i = match.index;
|
||||
|
||||
if (match[1])
|
||||
return this.openingBracketBlock(session, match[1], row, i);
|
||||
|
||||
var range = session.getCommentFoldRange(row, i + match[0].length, 1);
|
||||
|
||||
if (range && !range.isMultiLine()) {
|
||||
if (forceMultiline) {
|
||||
range = this.getSectionRange(session, row);
|
||||
} else if (foldStyle != "all")
|
||||
range = null;
|
||||
}
|
||||
|
||||
return range;
|
||||
}
|
||||
|
||||
if (foldStyle === "markbegin")
|
||||
return;
|
||||
|
||||
var match = line.match(this.foldingStopMarker);
|
||||
if (match) {
|
||||
var i = match.index + match[0].length;
|
||||
|
||||
if (match[1])
|
||||
return this.closingBracketBlock(session, match[1], row, i);
|
||||
|
||||
return session.getCommentFoldRange(row, i, -1);
|
||||
}
|
||||
};
|
||||
|
||||
this.getSectionRange = function(session, row) {
|
||||
var line = session.getLine(row);
|
||||
var startIndent = line.search(/\S/);
|
||||
var startRow = row;
|
||||
var startColumn = line.length;
|
||||
row = row + 1;
|
||||
var endRow = row;
|
||||
var maxRow = session.getLength();
|
||||
while (++row < maxRow) {
|
||||
line = session.getLine(row);
|
||||
var indent = line.search(/\S/);
|
||||
if (indent === -1)
|
||||
continue;
|
||||
if (startIndent > indent)
|
||||
break;
|
||||
var subRange = this.getFoldWidgetRange(session, "all", row);
|
||||
|
||||
if (subRange) {
|
||||
if (subRange.start.row <= startRow) {
|
||||
break;
|
||||
} else if (subRange.isMultiLine()) {
|
||||
row = subRange.end.row;
|
||||
} else if (startIndent == indent) {
|
||||
break;
|
||||
}
|
||||
}
|
||||
endRow = row;
|
||||
}
|
||||
|
||||
return new Range(startRow, startColumn, endRow, session.getLine(endRow).length);
|
||||
};
|
||||
this.getCommentRegionBlock = function(session, line, row) {
|
||||
var startColumn = line.search(/\s*$/);
|
||||
var maxRow = session.getLength();
|
||||
var startRow = row;
|
||||
|
||||
var re = /^\s*(?:\/\*|\/\/|--)#?(end)?region\b/;
|
||||
var depth = 1;
|
||||
while (++row < maxRow) {
|
||||
line = session.getLine(row);
|
||||
var m = re.exec(line);
|
||||
if (!m) continue;
|
||||
if (m[1]) depth--;
|
||||
else depth++;
|
||||
|
||||
if (!depth) break;
|
||||
}
|
||||
|
||||
var endRow = row;
|
||||
if (endRow > startRow) {
|
||||
return new Range(startRow, startColumn, endRow, line.length);
|
||||
}
|
||||
};
|
||||
|
||||
}).call(FoldMode.prototype);
|
||||
|
||||
});
|
||||
|
||||
define("ace/mode/elm",["require","exports","module","ace/lib/oop","ace/mode/text","ace/mode/elm_highlight_rules","ace/mode/folding/cstyle"], function(require, exports, module) {
|
||||
"use strict";
|
||||
|
||||
var oop = require("../lib/oop");
|
||||
var TextMode = require("./text").Mode;
|
||||
var HighlightRules = require("./elm_highlight_rules").ElmHighlightRules;
|
||||
var FoldMode = require("./folding/cstyle").FoldMode;
|
||||
|
||||
var Mode = function() {
|
||||
this.HighlightRules = HighlightRules;
|
||||
this.foldingRules = new FoldMode();
|
||||
this.$behaviour = this.$defaultBehaviour;
|
||||
};
|
||||
oop.inherits(Mode, TextMode);
|
||||
|
||||
(function() {
|
||||
this.lineCommentStart = "--";
|
||||
this.blockComment = {start: "{-", end: "-}", nestable: true};
|
||||
this.$id = "ace/mode/elm";
|
||||
}).call(Mode.prototype);
|
||||
|
||||
exports.Mode = Mode;
|
||||
}); (function() {
|
||||
define("ace/mode/elm_highlight_rules",["require","exports","module","ace/lib/oop","ace/mode/text_highlight_rules"],function(e,t,n){"use strict";var r=e("../lib/oop"),i=e("./text_highlight_rules").TextHighlightRules,s=function(){var e=this.createKeywordMapper({keyword:"as|case|class|data|default|deriving|do|else|export|foreign|hiding|jsevent|if|import|in|infix|infixl|infixr|instance|let|module|newtype|of|open|then|type|where|_|port|\u03bb"},"identifier"),t=/\\(\d+|['"\\&trnbvf])/,n=/[a-z_]/.source,r=/[A-Z]/.source,i=/[a-z_A-Z0-9']/.source;this.$rules={start:[{token:"string.start",regex:'"',next:"string"},{token:"string.character",regex:"'(?:"+t.source+"|.)'?"},{regex:/0(?:[xX][0-9A-Fa-f]+|[oO][0-7]+)|\d+(\.\d+)?([eE][-+]?\d*)?/,token:"constant.numeric"},{token:"comment",regex:"--.*"},{token:"keyword",regex:/\.\.|\||:|=|\\|"|->|<-|\u2192/},{token:"keyword.operator",regex:/[-!#$%&*+.\/<=>?@\\^|~:\u03BB\u2192]+/},{token:"operator.punctuation",regex:/[,;`]/},{regex:r+i+"+\\.?",token:function(e){return e[e.length-1]=="."?"entity.name.function":"constant.language"}},{regex:"^"+n+i+"+",token:function(e){return"constant.language"}},{token:e,regex:"[\\w\\xff-\\u218e\\u2455-\\uffff]+\\b"},{regex:"{-#?",token:"comment.start",onMatch:function(e,t,n){return this.next=e.length==2?"blockComment":"docComment",this.token}},{token:"variable.language",regex:/\[markdown\|/,next:"markdown"},{token:"paren.lparen",regex:/[\[({]/},{token:"paren.rparen",regex:/[\])}]/}],markdown:[{regex:/\|\]/,next:"start"},{defaultToken:"string"}],blockComment:[{regex:"{-",token:"comment.start",push:"blockComment"},{regex:"-}",token:"comment.end",next:"pop"},{defaultToken:"comment"}],docComment:[{regex:"{-",token:"comment.start",push:"docComment"},{regex:"-}",token:"comment.end",next:"pop"},{defaultToken:"doc.comment"}],string:[{token:"constant.language.escape",regex:t},{token:"text",regex:/\\(\s|$)/,next:"stringGap"},{token:"string.end",regex:'"',next:"start"},{defaultToken:"string"}],stringGap:[{token:"text",regex:/\\/,next:"string"},{token:"error",regex:"",next:"start"}]},this.normalizeRules()};r.inherits(s,i),t.ElmHighlightRules=s}),define("ace/mode/folding/cstyle",["require","exports","module","ace/lib/oop","ace/range","ace/mode/folding/fold_mode"],function(e,t,n){"use strict";var r=e("../../lib/oop"),i=e("../../range").Range,s=e("./fold_mode").FoldMode,o=t.FoldMode=function(e){e&&(this.foldingStartMarker=new RegExp(this.foldingStartMarker.source.replace(/\|[^|]*?$/,"|"+e.start)),this.foldingStopMarker=new RegExp(this.foldingStopMarker.source.replace(/\|[^|]*?$/,"|"+e.end)))};r.inherits(o,s),function(){this.foldingStartMarker=/([\{\[\(])[^\}\]\)]*$|^\s*(\/\*)/,this.foldingStopMarker=/^[^\[\{\(]*([\}\]\)])|^[\s\*]*(\*\/)/,this.singleLineBlockCommentRe=/^\s*(\/\*).*\*\/\s*$/,this.tripleStarBlockCommentRe=/^\s*(\/\*\*\*).*\*\/\s*$/,this.startRegionRe=/^\s*(\/\*|\/\/)#?region\b/,this._getFoldWidgetBase=this.getFoldWidget,this.getFoldWidget=function(e,t,n){var r=e.getLine(n);if(this.singleLineBlockCommentRe.test(r)&&!this.startRegionRe.test(r)&&!this.tripleStarBlockCommentRe.test(r))return"";var i=this._getFoldWidgetBase(e,t,n);return!i&&this.startRegionRe.test(r)?"start":i},this.getFoldWidgetRange=function(e,t,n,r){var i=e.getLine(n);if(this.startRegionRe.test(i))return this.getCommentRegionBlock(e,i,n);var s=i.match(this.foldingStartMarker);if(s){var o=s.index;if(s[1])return this.openingBracketBlock(e,s[1],n,o);var u=e.getCommentFoldRange(n,o+s[0].length,1);return u&&!u.isMultiLine()&&(r?u=this.getSectionRange(e,n):t!="all"&&(u=null)),u}if(t==="markbegin")return;var s=i.match(this.foldingStopMarker);if(s){var o=s.index+s[0].length;return s[1]?this.closingBracketBlock(e,s[1],n,o):e.getCommentFoldRange(n,o,-1)}},this.getSectionRange=function(e,t){var n=e.getLine(t),r=n.search(/\S/),s=t,o=n.length;t+=1;var u=t,a=e.getLength();while(++t<a){n=e.getLine(t);var f=n.search(/\S/);if(f===-1)continue;if(r>f)break;var l=this.getFoldWidgetRange(e,"all",t);if(l){if(l.start.row<=s)break;if(l.isMultiLine())t=l.end.row;else if(r==f)break}u=t}return new i(s,o,u,e.getLine(u).length)},this.getCommentRegionBlock=function(e,t,n){var r=t.search(/\s*$/),s=e.getLength(),o=n,u=/^\s*(?:\/\*|\/\/|--)#?(end)?region\b/,a=1;while(++n<s){t=e.getLine(n);var f=u.exec(t);if(!f)continue;f[1]?a--:a++;if(!a)break}var l=n;if(l>o)return new i(o,r,l,t.length)}}.call(o.prototype)}),define("ace/mode/elm",["require","exports","module","ace/lib/oop","ace/mode/text","ace/mode/elm_highlight_rules","ace/mode/folding/cstyle"],function(e,t,n){"use strict";var r=e("../lib/oop"),i=e("./text").Mode,s=e("./elm_highlight_rules").ElmHighlightRules,o=e("./folding/cstyle").FoldMode,u=function(){this.HighlightRules=s,this.foldingRules=new o,this.$behaviour=this.$defaultBehaviour};r.inherits(u,i),function(){this.lineCommentStart="--",this.blockComment={start:"{-",end:"-}",nestable:!0},this.$id="ace/mode/elm"}.call(u.prototype),t.Mode=u}); (function() {
|
||||
window.require(["ace/mode/elm"], function(m) {
|
||||
if (typeof module == "object" && typeof exports == "object" && module) {
|
||||
module.exports = m;
|
||||
}
|
||||
});
|
||||
})();
|
||||
|
||||
File diff suppressed because one or more lines are too long
7
htdocs/includes/ace/src/mode-flix.js
Normal file
7
htdocs/includes/ace/src/mode-flix.js
Normal file
@@ -0,0 +1,7 @@
|
||||
define("ace/mode/flix_highlight_rules",["require","exports","module","ace/lib/oop","ace/mode/text_highlight_rules"],function(e,t,n){"use strict";var r=e("../lib/oop"),i=e("./text_highlight_rules").TextHighlightRules,s=function(){var e="use|checked_cast|checked_ecast|unchecked_cast|masked_cast|as|discard|from|into|inject|project|solve|query|where|select|force|import|region|red|deref",t="choose|debug|do|for|forA|forM|foreach|yield|if|else|case|match|typematch|try|catch|resume|spawn|par|branch|jumpto",n="not|and|or|fix",r="eff|def|law|enum|case|type|alias|class|instance|mod|let",i="with|without|opaque|lazy|lawful|pub|override|sealed|static",s="Unit|Bool|Char|Float32|Float64|Int8|Int16|Int32|Int64|BigInt|String",o=this.createKeywordMapper({keyword:e,"keyword.control":t,"keyword.operator":n,"storage.type":r,"storage.modifier":i,"support.type":s},"identifier");this.$rules={start:[{token:"comment.line",regex:"\\/\\/.*$"},{token:"comment.block",regex:"\\/\\*",next:"comment"},{token:"string",regex:'"',next:"string"},{token:"string.regexp",regex:'regex"',next:"regex"},{token:"constant.character",regex:"'",next:"char"},{token:"constant.numeric",regex:"0x[a-fA-F0-9](_*[a-fA-F0-9])*(i8|i16|i32|i64|ii)?\\b"},{token:"constant.numeric",regex:"[0-9](_*[0-9])*\\.[0-9](_*[0-9])*(f32|f64)?\\b"},{token:"constant.numeric",regex:"[0-9](_*[0-9])*(i8|i16|i32|i64|ii)?\\b"},{token:"constant.language.boolean",regex:"(true|false)\\b"},{token:"constant.language",regex:"null\\b"},{token:"keyword.operator",regex:"\\->|~>|<\\-|=>"},{token:"storage.modifier",regex:"@(Deprecated|Experimental|Internal|ParallelWhenPure|Parallel|LazyWhenPure|Lazy|Skip|Test)\\b"},{token:"keyword",regex:"(\\?\\?\\?|\\?[a-zA-Z0-9]+)"},{token:o,regex:"[a-zA-Z_$][a-zA-Z0-9_$]*\\b"},{token:"paren.lparen",regex:"[[({]"},{token:"paren.rparen",regex:"[\\])}]"},{token:"text",regex:"\\s+"}],comment:[{token:"comment.block",regex:"\\*\\/",next:"start"},{defaultToken:"comment.block"}],string:[{token:"constant.character.escape",regex:"\\\\(u[0-9a-fA-F]{4})"},{token:"constant.character.escape",regex:"\\\\."},{token:"string",regex:'"',next:"start"},{token:"string",regex:'[^"\\\\]+'}],regex:[{token:"constant.character.escape",regex:"\\\\(u[0-9a-fA-F]{4})"},{token:"constant.character.escape",regex:"\\\\."},{token:"string.regexp",regex:'"',next:"start"},{token:"string.regexp",regex:'[^"\\\\]+'}],"char":[{token:"constant.character.escape",regex:"\\\\(u[0-9a-fA-F]{4})"},{token:"constant.character.escape",regex:"\\\\."},{token:"constant.character",regex:"'",next:"start"},{token:"constant.character",regex:"[^'\\\\]+"}]}};r.inherits(s,i),t.FlixHighlightRules=s}),define("ace/mode/flix",["require","exports","module","ace/lib/oop","ace/mode/text","ace/mode/flix_highlight_rules"],function(e,t,n){"use strict";var r=e("../lib/oop"),i=e("./text").Mode,s=e("./flix_highlight_rules").FlixHighlightRules,o=function(){this.HighlightRules=s};r.inherits(o,i),function(){this.$id="ace/mode/flix"}.call(o.prototype),t.Mode=o}); (function() {
|
||||
window.require(["ace/mode/flix"], function(m) {
|
||||
if (typeof module == "object" && typeof exports == "object" && module) {
|
||||
module.exports = m;
|
||||
}
|
||||
});
|
||||
})();
|
||||
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
@@ -1,259 +1,7 @@
|
||||
define("ace/mode/fsl_highlight_rules",["require","exports","module","ace/lib/oop","ace/mode/text_highlight_rules"], function(require, exports, module) {
|
||||
"use strict";
|
||||
|
||||
var oop = require("../lib/oop");
|
||||
var TextHighlightRules = require("./text_highlight_rules").TextHighlightRules;
|
||||
|
||||
var FSLHighlightRules = function() {
|
||||
|
||||
this.$rules = {
|
||||
start: [{
|
||||
token: "punctuation.definition.comment.mn",
|
||||
regex: /\/\*/,
|
||||
push: [{
|
||||
token: "punctuation.definition.comment.mn",
|
||||
regex: /\*\//,
|
||||
next: "pop"
|
||||
}, {
|
||||
defaultToken: "comment.block.fsl"
|
||||
}]
|
||||
}, {
|
||||
token: "comment.line.fsl",
|
||||
regex: /\/\//,
|
||||
push: [{
|
||||
token: "comment.line.fsl",
|
||||
regex: /$/,
|
||||
next: "pop"
|
||||
}, {
|
||||
defaultToken: "comment.line.fsl"
|
||||
}]
|
||||
}, {
|
||||
token: "entity.name.function",
|
||||
regex: /\${/,
|
||||
push: [{
|
||||
token: "entity.name.function",
|
||||
regex: /}/,
|
||||
next: "pop"
|
||||
}, {
|
||||
defaultToken: "keyword.other"
|
||||
}],
|
||||
comment: "js outcalls"
|
||||
}, {
|
||||
token: "constant.numeric",
|
||||
regex: /[0-9]*\.[0-9]*\.[0-9]*/,
|
||||
comment: "semver"
|
||||
}, {
|
||||
token: "constant.language.fslLanguage",
|
||||
regex: "(?:"
|
||||
+ "graph_layout|machine_name|machine_author|machine_license|machine_comment|machine_language"
|
||||
+ "|machine_version|machine_reference|npm_name|graph_layout|on_init|on_halt|on_end|on_terminate|on_finalize|on_transition"
|
||||
+ "|on_action|on_stochastic_action|on_legal|on_main|on_forced|on_validation|on_validation_failure|on_transition_refused|on_forced_transition_refused"
|
||||
+ "|on_action_refused|on_enter|on_exit|start_states|end_states|terminal_states|final_states|fsl_version"
|
||||
+ ")\\s*:"
|
||||
}, {
|
||||
token: "keyword.control.transition.fslArrow",
|
||||
regex: /<->|<-|->|<=>|=>|<=|<~>|~>|<~|<-=>|<=->|<-~>|<~->|<=~>|<~=>/
|
||||
}, {
|
||||
token: "constant.numeric.fslProbability",
|
||||
regex: /[0-9]+%/,
|
||||
comment: "edge probability annotation"
|
||||
}, {
|
||||
token: "constant.character.fslAction",
|
||||
regex: /\'[^']*\'/,
|
||||
comment: "action annotation"
|
||||
}, {
|
||||
token: "string.quoted.double.fslLabel.doublequoted",
|
||||
regex: /\"[^"]*\"/,
|
||||
comment: "fsl label annotation"
|
||||
}, {
|
||||
token: "entity.name.tag.fslLabel.atom",
|
||||
regex: /[a-zA-Z0-9_.+&()#@!?,]/,
|
||||
comment: "fsl label annotation"
|
||||
}]
|
||||
};
|
||||
|
||||
this.normalizeRules();
|
||||
};
|
||||
|
||||
FSLHighlightRules.metaData = {
|
||||
fileTypes: ["fsl", "fsl_state"],
|
||||
name: "FSL",
|
||||
scopeName: "source.fsl"
|
||||
};
|
||||
|
||||
|
||||
oop.inherits(FSLHighlightRules, TextHighlightRules);
|
||||
|
||||
exports.FSLHighlightRules = FSLHighlightRules;
|
||||
});
|
||||
|
||||
define("ace/mode/folding/cstyle",["require","exports","module","ace/lib/oop","ace/range","ace/mode/folding/fold_mode"], function(require, exports, module) {
|
||||
"use strict";
|
||||
|
||||
var oop = require("../../lib/oop");
|
||||
var Range = require("../../range").Range;
|
||||
var BaseFoldMode = require("./fold_mode").FoldMode;
|
||||
|
||||
var FoldMode = exports.FoldMode = function(commentRegex) {
|
||||
if (commentRegex) {
|
||||
this.foldingStartMarker = new RegExp(
|
||||
this.foldingStartMarker.source.replace(/\|[^|]*?$/, "|" + commentRegex.start)
|
||||
);
|
||||
this.foldingStopMarker = new RegExp(
|
||||
this.foldingStopMarker.source.replace(/\|[^|]*?$/, "|" + commentRegex.end)
|
||||
);
|
||||
}
|
||||
};
|
||||
oop.inherits(FoldMode, BaseFoldMode);
|
||||
|
||||
(function() {
|
||||
|
||||
this.foldingStartMarker = /([\{\[\(])[^\}\]\)]*$|^\s*(\/\*)/;
|
||||
this.foldingStopMarker = /^[^\[\{\(]*([\}\]\)])|^[\s\*]*(\*\/)/;
|
||||
this.singleLineBlockCommentRe= /^\s*(\/\*).*\*\/\s*$/;
|
||||
this.tripleStarBlockCommentRe = /^\s*(\/\*\*\*).*\*\/\s*$/;
|
||||
this.startRegionRe = /^\s*(\/\*|\/\/)#?region\b/;
|
||||
this._getFoldWidgetBase = this.getFoldWidget;
|
||||
this.getFoldWidget = function(session, foldStyle, row) {
|
||||
var line = session.getLine(row);
|
||||
|
||||
if (this.singleLineBlockCommentRe.test(line)) {
|
||||
if (!this.startRegionRe.test(line) && !this.tripleStarBlockCommentRe.test(line))
|
||||
return "";
|
||||
}
|
||||
|
||||
var fw = this._getFoldWidgetBase(session, foldStyle, row);
|
||||
|
||||
if (!fw && this.startRegionRe.test(line))
|
||||
return "start"; // lineCommentRegionStart
|
||||
|
||||
return fw;
|
||||
};
|
||||
|
||||
this.getFoldWidgetRange = function(session, foldStyle, row, forceMultiline) {
|
||||
var line = session.getLine(row);
|
||||
|
||||
if (this.startRegionRe.test(line))
|
||||
return this.getCommentRegionBlock(session, line, row);
|
||||
|
||||
var match = line.match(this.foldingStartMarker);
|
||||
if (match) {
|
||||
var i = match.index;
|
||||
|
||||
if (match[1])
|
||||
return this.openingBracketBlock(session, match[1], row, i);
|
||||
|
||||
var range = session.getCommentFoldRange(row, i + match[0].length, 1);
|
||||
|
||||
if (range && !range.isMultiLine()) {
|
||||
if (forceMultiline) {
|
||||
range = this.getSectionRange(session, row);
|
||||
} else if (foldStyle != "all")
|
||||
range = null;
|
||||
}
|
||||
|
||||
return range;
|
||||
}
|
||||
|
||||
if (foldStyle === "markbegin")
|
||||
return;
|
||||
|
||||
var match = line.match(this.foldingStopMarker);
|
||||
if (match) {
|
||||
var i = match.index + match[0].length;
|
||||
|
||||
if (match[1])
|
||||
return this.closingBracketBlock(session, match[1], row, i);
|
||||
|
||||
return session.getCommentFoldRange(row, i, -1);
|
||||
}
|
||||
};
|
||||
|
||||
this.getSectionRange = function(session, row) {
|
||||
var line = session.getLine(row);
|
||||
var startIndent = line.search(/\S/);
|
||||
var startRow = row;
|
||||
var startColumn = line.length;
|
||||
row = row + 1;
|
||||
var endRow = row;
|
||||
var maxRow = session.getLength();
|
||||
while (++row < maxRow) {
|
||||
line = session.getLine(row);
|
||||
var indent = line.search(/\S/);
|
||||
if (indent === -1)
|
||||
continue;
|
||||
if (startIndent > indent)
|
||||
break;
|
||||
var subRange = this.getFoldWidgetRange(session, "all", row);
|
||||
|
||||
if (subRange) {
|
||||
if (subRange.start.row <= startRow) {
|
||||
break;
|
||||
} else if (subRange.isMultiLine()) {
|
||||
row = subRange.end.row;
|
||||
} else if (startIndent == indent) {
|
||||
break;
|
||||
}
|
||||
}
|
||||
endRow = row;
|
||||
}
|
||||
|
||||
return new Range(startRow, startColumn, endRow, session.getLine(endRow).length);
|
||||
};
|
||||
this.getCommentRegionBlock = function(session, line, row) {
|
||||
var startColumn = line.search(/\s*$/);
|
||||
var maxRow = session.getLength();
|
||||
var startRow = row;
|
||||
|
||||
var re = /^\s*(?:\/\*|\/\/|--)#?(end)?region\b/;
|
||||
var depth = 1;
|
||||
while (++row < maxRow) {
|
||||
line = session.getLine(row);
|
||||
var m = re.exec(line);
|
||||
if (!m) continue;
|
||||
if (m[1]) depth--;
|
||||
else depth++;
|
||||
|
||||
if (!depth) break;
|
||||
}
|
||||
|
||||
var endRow = row;
|
||||
if (endRow > startRow) {
|
||||
return new Range(startRow, startColumn, endRow, line.length);
|
||||
}
|
||||
};
|
||||
|
||||
}).call(FoldMode.prototype);
|
||||
|
||||
});
|
||||
|
||||
define("ace/mode/fsl",["require","exports","module","ace/lib/oop","ace/mode/text","ace/mode/fsl_highlight_rules","ace/mode/folding/cstyle"], function(require, exports, module) {
|
||||
"use strict";
|
||||
|
||||
var oop = require("../lib/oop");
|
||||
var TextMode = require("./text").Mode;
|
||||
var FSLHighlightRules = require("./fsl_highlight_rules").FSLHighlightRules;
|
||||
var FoldMode = require("./folding/cstyle").FoldMode;
|
||||
|
||||
var Mode = function() {
|
||||
this.HighlightRules = FSLHighlightRules;
|
||||
this.foldingRules = new FoldMode();
|
||||
};
|
||||
oop.inherits(Mode, TextMode);
|
||||
|
||||
(function() {
|
||||
this.lineCommentStart = "//";
|
||||
this.blockComment = {start: "/*", end: "*/"};
|
||||
this.$id = "ace/mode/fsl";
|
||||
this.snippetFileId = "ace/snippets/fsl";
|
||||
}).call(Mode.prototype);
|
||||
|
||||
exports.Mode = Mode;
|
||||
}); (function() {
|
||||
define("ace/mode/fsl_highlight_rules",["require","exports","module","ace/lib/oop","ace/mode/text_highlight_rules"],function(e,t,n){"use strict";var r=e("../lib/oop"),i=e("./text_highlight_rules").TextHighlightRules,s=function(){this.$rules={start:[{token:"punctuation.definition.comment.mn",regex:/\/\*/,push:[{token:"punctuation.definition.comment.mn",regex:/\*\//,next:"pop"},{defaultToken:"comment.block.fsl"}]},{token:"comment.line.fsl",regex:/\/\//,push:[{token:"comment.line.fsl",regex:/$/,next:"pop"},{defaultToken:"comment.line.fsl"}]},{token:"entity.name.function",regex:/\${/,push:[{token:"entity.name.function",regex:/}/,next:"pop"},{defaultToken:"keyword.other"}],comment:"js outcalls"},{token:"constant.numeric",regex:/[0-9]*\.[0-9]*\.[0-9]*/,comment:"semver"},{token:"constant.language.fslLanguage",regex:"(?:graph_layout|machine_name|machine_author|machine_license|machine_comment|machine_language|machine_version|machine_reference|npm_name|graph_layout|on_init|on_halt|on_end|on_terminate|on_finalize|on_transition|on_action|on_stochastic_action|on_legal|on_main|on_forced|on_validation|on_validation_failure|on_transition_refused|on_forced_transition_refused|on_action_refused|on_enter|on_exit|start_states|end_states|terminal_states|final_states|fsl_version)\\s*:"},{token:"keyword.control.transition.fslArrow",regex:/<->|<-|->|<=>|=>|<=|<~>|~>|<~|<-=>|<=->|<-~>|<~->|<=~>|<~=>/},{token:"constant.numeric.fslProbability",regex:/[0-9]+%/,comment:"edge probability annotation"},{token:"constant.character.fslAction",regex:/\'[^']*\'/,comment:"action annotation"},{token:"string.quoted.double.fslLabel.doublequoted",regex:/\"[^"]*\"/,comment:"fsl label annotation"},{token:"entity.name.tag.fslLabel.atom",regex:/[a-zA-Z0-9_.+&()#@!?,]/,comment:"fsl label annotation"}]},this.normalizeRules()};s.metaData={fileTypes:["fsl","fsl_state"],name:"FSL",scopeName:"source.fsl"},r.inherits(s,i),t.FSLHighlightRules=s}),define("ace/mode/folding/cstyle",["require","exports","module","ace/lib/oop","ace/range","ace/mode/folding/fold_mode"],function(e,t,n){"use strict";var r=e("../../lib/oop"),i=e("../../range").Range,s=e("./fold_mode").FoldMode,o=t.FoldMode=function(e){e&&(this.foldingStartMarker=new RegExp(this.foldingStartMarker.source.replace(/\|[^|]*?$/,"|"+e.start)),this.foldingStopMarker=new RegExp(this.foldingStopMarker.source.replace(/\|[^|]*?$/,"|"+e.end)))};r.inherits(o,s),function(){this.foldingStartMarker=/([\{\[\(])[^\}\]\)]*$|^\s*(\/\*)/,this.foldingStopMarker=/^[^\[\{\(]*([\}\]\)])|^[\s\*]*(\*\/)/,this.singleLineBlockCommentRe=/^\s*(\/\*).*\*\/\s*$/,this.tripleStarBlockCommentRe=/^\s*(\/\*\*\*).*\*\/\s*$/,this.startRegionRe=/^\s*(\/\*|\/\/)#?region\b/,this._getFoldWidgetBase=this.getFoldWidget,this.getFoldWidget=function(e,t,n){var r=e.getLine(n);if(this.singleLineBlockCommentRe.test(r)&&!this.startRegionRe.test(r)&&!this.tripleStarBlockCommentRe.test(r))return"";var i=this._getFoldWidgetBase(e,t,n);return!i&&this.startRegionRe.test(r)?"start":i},this.getFoldWidgetRange=function(e,t,n,r){var i=e.getLine(n);if(this.startRegionRe.test(i))return this.getCommentRegionBlock(e,i,n);var s=i.match(this.foldingStartMarker);if(s){var o=s.index;if(s[1])return this.openingBracketBlock(e,s[1],n,o);var u=e.getCommentFoldRange(n,o+s[0].length,1);return u&&!u.isMultiLine()&&(r?u=this.getSectionRange(e,n):t!="all"&&(u=null)),u}if(t==="markbegin")return;var s=i.match(this.foldingStopMarker);if(s){var o=s.index+s[0].length;return s[1]?this.closingBracketBlock(e,s[1],n,o):e.getCommentFoldRange(n,o,-1)}},this.getSectionRange=function(e,t){var n=e.getLine(t),r=n.search(/\S/),s=t,o=n.length;t+=1;var u=t,a=e.getLength();while(++t<a){n=e.getLine(t);var f=n.search(/\S/);if(f===-1)continue;if(r>f)break;var l=this.getFoldWidgetRange(e,"all",t);if(l){if(l.start.row<=s)break;if(l.isMultiLine())t=l.end.row;else if(r==f)break}u=t}return new i(s,o,u,e.getLine(u).length)},this.getCommentRegionBlock=function(e,t,n){var r=t.search(/\s*$/),s=e.getLength(),o=n,u=/^\s*(?:\/\*|\/\/|--)#?(end)?region\b/,a=1;while(++n<s){t=e.getLine(n);var f=u.exec(t);if(!f)continue;f[1]?a--:a++;if(!a)break}var l=n;if(l>o)return new i(o,r,l,t.length)}}.call(o.prototype)}),define("ace/mode/fsl",["require","exports","module","ace/lib/oop","ace/mode/text","ace/mode/fsl_highlight_rules","ace/mode/folding/cstyle"],function(e,t,n){"use strict";var r=e("../lib/oop"),i=e("./text").Mode,s=e("./fsl_highlight_rules").FSLHighlightRules,o=e("./folding/cstyle").FoldMode,u=function(){this.HighlightRules=s,this.foldingRules=new o};r.inherits(u,i),function(){this.lineCommentStart="//",this.blockComment={start:"/*",end:"*/"},this.$id="ace/mode/fsl",this.snippetFileId="ace/snippets/fsl"}.call(u.prototype),t.Mode=u}); (function() {
|
||||
window.require(["ace/mode/fsl"], function(m) {
|
||||
if (typeof module == "object" && typeof exports == "object" && module) {
|
||||
module.exports = m;
|
||||
}
|
||||
});
|
||||
})();
|
||||
|
||||
File diff suppressed because one or more lines are too long
@@ -1,93 +1,7 @@
|
||||
define("ace/mode/gcode_highlight_rules",["require","exports","module","ace/lib/oop","ace/mode/text_highlight_rules"], function(require, exports, module) {
|
||||
"use strict";
|
||||
|
||||
var oop = require("../lib/oop");
|
||||
var TextHighlightRules = require("./text_highlight_rules").TextHighlightRules;
|
||||
|
||||
var GcodeHighlightRules = function() {
|
||||
|
||||
var keywords = (
|
||||
"IF|DO|WHILE|ENDWHILE|CALL|ENDIF|SUB|ENDSUB|GOTO|REPEAT|ENDREPEAT|CALL"
|
||||
);
|
||||
|
||||
var builtinConstants = (
|
||||
"PI"
|
||||
);
|
||||
|
||||
var builtinFunctions = (
|
||||
"ATAN|ABS|ACOS|ASIN|SIN|COS|EXP|FIX|FUP|ROUND|LN|TAN"
|
||||
);
|
||||
var keywordMapper = this.createKeywordMapper({
|
||||
"support.function": builtinFunctions,
|
||||
"keyword": keywords,
|
||||
"constant.language": builtinConstants
|
||||
}, "identifier", true);
|
||||
|
||||
this.$rules = {
|
||||
"start" : [ {
|
||||
token : "comment",
|
||||
regex : "\\(.*\\)"
|
||||
}, {
|
||||
token : "comment", // block number
|
||||
regex : "([N])([0-9]+)"
|
||||
}, {
|
||||
token : "string", // " string
|
||||
regex : "([G])([0-9]+\\.?[0-9]?)"
|
||||
}, {
|
||||
token : "string", // ' string
|
||||
regex : "([M])([0-9]+\\.?[0-9]?)"
|
||||
}, {
|
||||
token : "constant.numeric", // float
|
||||
regex : "([-+]?([0-9]*\\.?[0-9]+\\.?))|(\\b0[xX][a-fA-F0-9]+|(\\b\\d+(\\.\\d*)?|\\.\\d+)([eE][-+]?\\d+)?)"
|
||||
}, {
|
||||
token : keywordMapper,
|
||||
regex : "[A-Z]"
|
||||
}, {
|
||||
token : "keyword.operator",
|
||||
regex : "EQ|LT|GT|NE|GE|LE|OR|XOR"
|
||||
}, {
|
||||
token : "paren.lparen",
|
||||
regex : "[\\[]"
|
||||
}, {
|
||||
token : "paren.rparen",
|
||||
regex : "[\\]]"
|
||||
}, {
|
||||
token : "text",
|
||||
regex : "\\s+"
|
||||
} ]
|
||||
};
|
||||
};
|
||||
|
||||
oop.inherits(GcodeHighlightRules, TextHighlightRules);
|
||||
|
||||
exports.GcodeHighlightRules = GcodeHighlightRules;
|
||||
});
|
||||
|
||||
define("ace/mode/gcode",["require","exports","module","ace/lib/oop","ace/mode/text","ace/mode/gcode_highlight_rules","ace/range"], function(require, exports, module) {
|
||||
"use strict";
|
||||
|
||||
var oop = require("../lib/oop");
|
||||
var TextMode = require("./text").Mode;
|
||||
var GcodeHighlightRules = require("./gcode_highlight_rules").GcodeHighlightRules;
|
||||
var Range = require("../range").Range;
|
||||
|
||||
var Mode = function() {
|
||||
this.HighlightRules = GcodeHighlightRules;
|
||||
this.$behaviour = this.$defaultBehaviour;
|
||||
};
|
||||
oop.inherits(Mode, TextMode);
|
||||
|
||||
(function() {
|
||||
this.$id = "ace/mode/gcode";
|
||||
}).call(Mode.prototype);
|
||||
|
||||
exports.Mode = Mode;
|
||||
|
||||
}); (function() {
|
||||
define("ace/mode/gcode_highlight_rules",["require","exports","module","ace/lib/oop","ace/mode/text_highlight_rules"],function(e,t,n){"use strict";var r=e("../lib/oop"),i=e("./text_highlight_rules").TextHighlightRules,s=function(){var e="IF|DO|WHILE|ENDWHILE|CALL|ENDIF|SUB|ENDSUB|GOTO|REPEAT|ENDREPEAT|CALL",t="PI",n="ATAN|ABS|ACOS|ASIN|SIN|COS|EXP|FIX|FUP|ROUND|LN|TAN",r=this.createKeywordMapper({"support.function":n,keyword:e,"constant.language":t},"identifier",!0);this.$rules={start:[{token:"comment",regex:"\\(.*\\)"},{token:"comment",regex:"([N])([0-9]+)"},{token:"string",regex:"([G])([0-9]+\\.?[0-9]?)"},{token:"string",regex:"([M])([0-9]+\\.?[0-9]?)"},{token:"constant.numeric",regex:"([-+]?([0-9]*\\.?[0-9]+\\.?))|(\\b0[xX][a-fA-F0-9]+|(\\b\\d+(\\.\\d*)?|\\.\\d+)([eE][-+]?\\d+)?)"},{token:r,regex:"[A-Z]"},{token:"keyword.operator",regex:"EQ|LT|GT|NE|GE|LE|OR|XOR"},{token:"paren.lparen",regex:"[\\[]"},{token:"paren.rparen",regex:"[\\]]"},{token:"text",regex:"\\s+"}]}};r.inherits(s,i),t.GcodeHighlightRules=s}),define("ace/mode/gcode",["require","exports","module","ace/lib/oop","ace/mode/text","ace/mode/gcode_highlight_rules","ace/range"],function(e,t,n){"use strict";var r=e("../lib/oop"),i=e("./text").Mode,s=e("./gcode_highlight_rules").GcodeHighlightRules,o=e("../range").Range,u=function(){this.HighlightRules=s,this.$behaviour=this.$defaultBehaviour};r.inherits(u,i),function(){this.$id="ace/mode/gcode"}.call(u.prototype),t.Mode=u}); (function() {
|
||||
window.require(["ace/mode/gcode"], function(m) {
|
||||
if (typeof module == "object" && typeof exports == "object" && module) {
|
||||
module.exports = m;
|
||||
}
|
||||
});
|
||||
})();
|
||||
|
||||
@@ -1,168 +1,7 @@
|
||||
define("ace/mode/gherkin_highlight_rules",["require","exports","module","ace/lib/oop","ace/mode/text_highlight_rules"], function(require, exports, module) {
|
||||
|
||||
var oop = require("../lib/oop");
|
||||
var TextHighlightRules = require("./text_highlight_rules").TextHighlightRules;
|
||||
var stringEscape = "\\\\(x[0-9A-Fa-f]{2}|[0-7]{3}|[\\\\abfnrtv'\"]|U[0-9A-Fa-f]{8}|u[0-9A-Fa-f]{4})";
|
||||
|
||||
var GherkinHighlightRules = function() {
|
||||
var languages = [{
|
||||
name: "en",
|
||||
labels: "Feature|Background|Scenario(?: Outline)?|Examples",
|
||||
keywords: "Given|When|Then|And|But"
|
||||
}];
|
||||
|
||||
var labels = languages.map(function(l) {
|
||||
return l.labels;
|
||||
}).join("|");
|
||||
var keywords = languages.map(function(l) {
|
||||
return l.keywords;
|
||||
}).join("|");
|
||||
this.$rules = {
|
||||
start : [{
|
||||
token: "constant.numeric",
|
||||
regex: "(?:(?:[1-9]\\d*)|(?:0))"
|
||||
}, {
|
||||
token : "comment",
|
||||
regex : "#.*$"
|
||||
}, {
|
||||
token : "keyword",
|
||||
regex : "(?:" + labels + "):|(?:" + keywords + ")\\b"
|
||||
}, {
|
||||
token : "keyword",
|
||||
regex : "\\*"
|
||||
}, {
|
||||
token : "string", // multi line """ string start
|
||||
regex : '"{3}',
|
||||
next : "qqstring3"
|
||||
}, {
|
||||
token : "string", // " string
|
||||
regex : '"',
|
||||
next : "qqstring"
|
||||
}, {
|
||||
token : "text",
|
||||
regex : "^\\s*(?=@[\\w])",
|
||||
next : [{
|
||||
token : "text",
|
||||
regex : "\\s+"
|
||||
}, {
|
||||
token : "variable.parameter",
|
||||
regex : "@[\\w]+"
|
||||
}, {
|
||||
token : "empty",
|
||||
regex : "",
|
||||
next : "start"
|
||||
}]
|
||||
}, {
|
||||
token : "comment",
|
||||
regex : "<[^>]+>"
|
||||
}, {
|
||||
token : "comment",
|
||||
regex : "\\|(?=.)",
|
||||
next : "table-item"
|
||||
}, {
|
||||
token : "comment",
|
||||
regex : "\\|$",
|
||||
next : "start"
|
||||
}],
|
||||
"qqstring3" : [ {
|
||||
token : "constant.language.escape",
|
||||
regex : stringEscape
|
||||
}, {
|
||||
token : "string", // multi line """ string end
|
||||
regex : '"{3}',
|
||||
next : "start"
|
||||
}, {
|
||||
defaultToken : "string"
|
||||
}],
|
||||
"qqstring" : [{
|
||||
token : "constant.language.escape",
|
||||
regex : stringEscape
|
||||
}, {
|
||||
token : "string",
|
||||
regex : "\\\\$",
|
||||
next : "qqstring"
|
||||
}, {
|
||||
token : "string",
|
||||
regex : '"|$',
|
||||
next : "start"
|
||||
}, {
|
||||
defaultToken: "string"
|
||||
}],
|
||||
"table-item" : [{
|
||||
token : "comment",
|
||||
regex : /$/,
|
||||
next : "start"
|
||||
}, {
|
||||
token : "comment",
|
||||
regex : /\|/
|
||||
}, {
|
||||
token : "string",
|
||||
regex : /\\./
|
||||
}, {
|
||||
defaultToken : "string"
|
||||
}]
|
||||
};
|
||||
this.normalizeRules();
|
||||
};
|
||||
|
||||
oop.inherits(GherkinHighlightRules, TextHighlightRules);
|
||||
|
||||
exports.GherkinHighlightRules = GherkinHighlightRules;
|
||||
});
|
||||
|
||||
define("ace/mode/gherkin",["require","exports","module","ace/lib/oop","ace/mode/text","ace/mode/gherkin_highlight_rules"], function(require, exports, module) {
|
||||
|
||||
var oop = require("../lib/oop");
|
||||
var TextMode = require("./text").Mode;
|
||||
var GherkinHighlightRules = require("./gherkin_highlight_rules").GherkinHighlightRules;
|
||||
|
||||
var Mode = function() {
|
||||
this.HighlightRules = GherkinHighlightRules;
|
||||
this.$behaviour = this.$defaultBehaviour;
|
||||
};
|
||||
oop.inherits(Mode, TextMode);
|
||||
|
||||
(function() {
|
||||
this.lineCommentStart = "#";
|
||||
this.$id = "ace/mode/gherkin";
|
||||
|
||||
this.getNextLineIndent = function(state, line, tab) {
|
||||
var indent = this.$getIndent(line);
|
||||
var space2 = " ";
|
||||
|
||||
var tokenizedLine = this.getTokenizer().getLineTokens(line, state);
|
||||
var tokens = tokenizedLine.tokens;
|
||||
|
||||
if(line.match("[ ]*\\|")) {
|
||||
indent += "| ";
|
||||
}
|
||||
|
||||
if (tokens.length && tokens[tokens.length-1].type == "comment") {
|
||||
return indent;
|
||||
}
|
||||
|
||||
|
||||
if (state == "start") {
|
||||
if (line.match("Scenario:|Feature:|Scenario Outline:|Background:")) {
|
||||
indent += space2;
|
||||
} else if(line.match("(Given|Then).+(:)$|Examples:")) {
|
||||
indent += space2;
|
||||
} else if(line.match("\\*.+")) {
|
||||
indent += "* ";
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
return indent;
|
||||
};
|
||||
}).call(Mode.prototype);
|
||||
|
||||
exports.Mode = Mode;
|
||||
}); (function() {
|
||||
define("ace/mode/gherkin_highlight_rules",["require","exports","module","ace/lib/oop","ace/mode/text_highlight_rules"],function(e,t,n){var r=e("../lib/oop"),i=e("./text_highlight_rules").TextHighlightRules,s="\\\\(x[0-9A-Fa-f]{2}|[0-7]{3}|[\\\\abfnrtv'\"]|U[0-9A-Fa-f]{8}|u[0-9A-Fa-f]{4})",o=function(){var e=[{name:"en",labels:"Feature|Background|Scenario(?: Outline)?|Examples",keywords:"Given|When|Then|And|But"}],t=e.map(function(e){return e.labels}).join("|"),n=e.map(function(e){return e.keywords}).join("|");this.$rules={start:[{token:"constant.numeric",regex:"(?:(?:[1-9]\\d*)|(?:0))"},{token:"comment",regex:"#.*$"},{token:"keyword",regex:"(?:"+t+"):|(?:"+n+")\\b"},{token:"keyword",regex:"\\*"},{token:"string",regex:'"{3}',next:"qqstring3"},{token:"string",regex:'"',next:"qqstring"},{token:"text",regex:"^\\s*(?=@[\\w])",next:[{token:"text",regex:"\\s+"},{token:"variable.parameter",regex:"@[\\w]+"},{token:"empty",regex:"",next:"start"}]},{token:"comment",regex:"<[^>]+>"},{token:"comment",regex:"\\|(?=.)",next:"table-item"},{token:"comment",regex:"\\|$",next:"start"}],qqstring3:[{token:"constant.language.escape",regex:s},{token:"string",regex:'"{3}',next:"start"},{defaultToken:"string"}],qqstring:[{token:"constant.language.escape",regex:s},{token:"string",regex:"\\\\$",next:"qqstring"},{token:"string",regex:'"|$',next:"start"},{defaultToken:"string"}],"table-item":[{token:"comment",regex:/$/,next:"start"},{token:"comment",regex:/\|/},{token:"string",regex:/\\./},{defaultToken:"string"}]},this.normalizeRules()};r.inherits(o,i),t.GherkinHighlightRules=o}),define("ace/mode/gherkin",["require","exports","module","ace/lib/oop","ace/mode/text","ace/mode/gherkin_highlight_rules"],function(e,t,n){var r=e("../lib/oop"),i=e("./text").Mode,s=e("./gherkin_highlight_rules").GherkinHighlightRules,o=function(){this.HighlightRules=s,this.$behaviour=this.$defaultBehaviour};r.inherits(o,i),function(){this.lineCommentStart="#",this.$id="ace/mode/gherkin",this.getNextLineIndent=function(e,t,n){var r=this.$getIndent(t),i=" ",s=this.getTokenizer().getLineTokens(t,e),o=s.tokens;return t.match("[ ]*\\|")&&(r+="| "),o.length&&o[o.length-1].type=="comment"?r:(e=="start"&&(t.match("Scenario:|Feature:|Scenario Outline:|Background:")?r+=i:t.match("(Given|Then).+(:)$|Examples:")?r+=i:t.match("\\*.+")&&(r+="* ")),r)}}.call(o.prototype),t.Mode=o}); (function() {
|
||||
window.require(["ace/mode/gherkin"], function(m) {
|
||||
if (typeof module == "object" && typeof exports == "object" && module) {
|
||||
module.exports = m;
|
||||
}
|
||||
});
|
||||
})();
|
||||
|
||||
Some files were not shown because too many files have changed in this diff Show More
Reference in New Issue
Block a user