Update ACE Editor to version 1.2.0
Previously, we were at an ACE editor published between 1.1.8 and 1.1.9. This caused multiple issues and was especially a problem for the upcoming pair programming feature. Further, updating ace is a long-time priority, see https://github.com/openHPI/codeocean/issues/250. Now, we are not yet updating to the latest version, but rather to the next minor version. This already contains breaking changes, and we are currently interested to keep the number of changes as low as possible. Further updating ACE might be still a future task. The new ACE version 1.2.0 is taken from this tag: https://github.com/ajaxorg/ace-builds/releases/tag/v1.2.0. We are using the src build (not minified, not in the noconflict version), since the same was used before as well. Further, we need to change our migration for storing editor events. Since the table is not yet used (in production), we also update the enum.
This commit is contained in:
@ -64,7 +64,7 @@ $(document).on('turbolinks:load', function () {
|
|||||||
},
|
},
|
||||||
|
|
||||||
editor_change(delta, active_file) {
|
editor_change(delta, active_file) {
|
||||||
const message = {session_id: session_id, active_file: active_file, delta: delta.data}
|
const message = {session_id: session_id, active_file: active_file, delta: delta}
|
||||||
this.perform('editor_change', message);
|
this.perform('editor_change', message);
|
||||||
},
|
},
|
||||||
|
|
||||||
|
@ -356,26 +356,49 @@ var CodeOceanEditor = {
|
|||||||
},
|
},
|
||||||
|
|
||||||
handleUTF16Surrogates: function (AceDeltaObject, AceSession) {
|
handleUTF16Surrogates: function (AceDeltaObject, AceSession) {
|
||||||
if (AceDeltaObject.data === undefined || AceDeltaObject.data.action !== "removeText") {
|
if (_.isEmpty(AceDeltaObject.lines) || AceDeltaObject.action !== "remove") {
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
const codePoint = AceDeltaObject.data.text.codePointAt(0);
|
const firstCodePoint = AceDeltaObject.lines[0].codePointAt(0);
|
||||||
if (0xDC00 <= codePoint && codePoint <= 0xDFFF) {
|
if (0xDC00 <= firstCodePoint && firstCodePoint <= 0xDFFF) {
|
||||||
// The text contains a UTF-16 surrogate pair, and the only the lower part is removed.
|
// The text contains a UTF-16 surrogate pair, and the only the lower part is removed.
|
||||||
// We need to remove the high surrogate pair as well.
|
// We need to remove the high surrogate pair as well.
|
||||||
const currentCharacter = AceDeltaObject.data.range
|
|
||||||
const previousCharacter = {
|
const previousCharacter = {
|
||||||
start: {
|
start: {
|
||||||
row: currentCharacter.start.row,
|
row: AceDeltaObject.start.row,
|
||||||
column: currentCharacter.start.column - 1
|
column: AceDeltaObject.start.column - 1
|
||||||
},
|
},
|
||||||
end: {
|
end: {
|
||||||
row: currentCharacter.start.row,
|
row: AceDeltaObject.start.row,
|
||||||
column: currentCharacter.start.column
|
column: AceDeltaObject.start.column
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
AceSession.remove(previousCharacter);
|
const previousCharacterCodePoint = AceSession.getTextRange(previousCharacter).codePointAt(0);
|
||||||
|
if (0xD800 <= previousCharacterCodePoint && previousCharacterCodePoint <= 0xDBFF) {
|
||||||
|
AceSession.remove(previousCharacter);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
const lastLine = AceDeltaObject.lines.slice(-1)[0];
|
||||||
|
const lastCodePoint = lastLine.codePointAt(lastLine.length - 1);
|
||||||
|
if (0xD800 <= lastCodePoint && lastCodePoint <= 0xDBFF) {
|
||||||
|
// The text contains a UTF-16 surrogate pair, and the only the higher part is removed.
|
||||||
|
// We need to remove the high surrogate pair as well.
|
||||||
|
const nextCharacter = {
|
||||||
|
start: {
|
||||||
|
row: AceDeltaObject.end.row,
|
||||||
|
column: AceDeltaObject.end.column - 1
|
||||||
|
},
|
||||||
|
end: {
|
||||||
|
row: AceDeltaObject.end.row,
|
||||||
|
column: AceDeltaObject.end.column
|
||||||
|
}
|
||||||
|
}
|
||||||
|
const nextCharacterCodePoint = AceSession.getTextRange(nextCharacter).codePointAt(0);
|
||||||
|
if (0xDC00 <= nextCharacterCodePoint && nextCharacterCodePoint <= 0xDFFF) {
|
||||||
|
AceSession.remove(nextCharacter);
|
||||||
|
}
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
|
|
||||||
|
@ -21,12 +21,8 @@ class Event::SynchronizedEditor < ApplicationRecord
|
|||||||
}, _prefix: true
|
}, _prefix: true
|
||||||
|
|
||||||
enum editor_action: {
|
enum editor_action: {
|
||||||
insertText: 0,
|
insert: 0,
|
||||||
insertLines: 1,
|
remove: 1,
|
||||||
removeText: 2,
|
|
||||||
removeLines: 3,
|
|
||||||
changeFold: 4,
|
|
||||||
removeFold: 5,
|
|
||||||
}, _prefix: true
|
}, _prefix: true
|
||||||
|
|
||||||
validates :status, presence: true, if: -> { action_connection_change? }
|
validates :status, presence: true, if: -> { action_connection_change? }
|
||||||
@ -37,15 +33,14 @@ class Event::SynchronizedEditor < ApplicationRecord
|
|||||||
validates :range_start_column, numericality: {only_integer: true, greater_than_or_equal_to: 0}, if: -> { action_editor_change? }
|
validates :range_start_column, numericality: {only_integer: true, greater_than_or_equal_to: 0}, if: -> { action_editor_change? }
|
||||||
validates :range_end_row, numericality: {only_integer: true, greater_than_or_equal_to: 0}, if: -> { action_editor_change? }
|
validates :range_end_row, numericality: {only_integer: true, greater_than_or_equal_to: 0}, if: -> { action_editor_change? }
|
||||||
validates :range_end_column, numericality: {only_integer: true, greater_than_or_equal_to: 0}, if: -> { action_editor_change? }
|
validates :range_end_column, numericality: {only_integer: true, greater_than_or_equal_to: 0}, if: -> { action_editor_change? }
|
||||||
validates :nl, inclusion: {in: %W[\n \r\n]}, if: -> { editor_action_removeLines? }
|
validates :lines, presence: true, if: -> { action_editor_change? }
|
||||||
|
|
||||||
validate :either_lines_or_text
|
|
||||||
|
|
||||||
def self.create_for_editor_change(event, user, programming_group)
|
def self.create_for_editor_change(event, user, programming_group)
|
||||||
event_copy = event.deep_dup
|
event_copy = event.deep_dup
|
||||||
file = event_copy.delete(:active_file)
|
file = event_copy.delete(:active_file)
|
||||||
delta = event_copy.delete(:delta)
|
delta = event_copy.delete(:delta)
|
||||||
range = delta.delete(:range)
|
start_range = delta.delete(:start)
|
||||||
|
end_range = delta.delete(:end)
|
||||||
|
|
||||||
create!(
|
create!(
|
||||||
user:,
|
user:,
|
||||||
@ -55,12 +50,10 @@ class Event::SynchronizedEditor < ApplicationRecord
|
|||||||
editor_action: delta.delete(:action),
|
editor_action: delta.delete(:action),
|
||||||
file_id: file[:id],
|
file_id: file[:id],
|
||||||
session_id: event_copy.delete(:session_id),
|
session_id: event_copy.delete(:session_id),
|
||||||
range_start_row: range[:start][:row],
|
range_start_row: start_range[:row],
|
||||||
range_start_column: range[:start][:column],
|
range_start_column: start_range[:column],
|
||||||
range_end_row: range[:end][:row],
|
range_end_row: end_range[:row],
|
||||||
range_end_column: range[:end][:column],
|
range_end_column: end_range[:column],
|
||||||
text: delta.delete(:text),
|
|
||||||
nl: delta.delete(:nl),
|
|
||||||
lines: delta.delete(:lines),
|
lines: delta.delete(:lines),
|
||||||
data: data_attribute(event_copy, delta)
|
data: data_attribute(event_copy, delta)
|
||||||
)
|
)
|
||||||
@ -81,22 +74,4 @@ class Event::SynchronizedEditor < ApplicationRecord
|
|||||||
event.presence if event.present? # TODO: As of now, we are storing the `session_id` most of the times. Intended?
|
event.presence if event.present? # TODO: As of now, we are storing the `session_id` most of the times. Intended?
|
||||||
end
|
end
|
||||||
private_class_method :data_attribute
|
private_class_method :data_attribute
|
||||||
|
|
||||||
private
|
|
||||||
|
|
||||||
def strip_strings
|
|
||||||
# trim whitespace from beginning and end of string attributes
|
|
||||||
# except the `text` and `nl` of Event::SynchronizedEditor
|
|
||||||
attribute_names.without('text', 'nl').each do |name|
|
|
||||||
if send(name.to_sym).respond_to?(:strip)
|
|
||||||
send("#{name}=".to_sym, send(name).strip)
|
|
||||||
end
|
|
||||||
end
|
|
||||||
end
|
|
||||||
|
|
||||||
def either_lines_or_text
|
|
||||||
if [lines, text].count(&:present?) > 1
|
|
||||||
errors.add(:text, "can't be present if lines is also present")
|
|
||||||
end
|
|
||||||
end
|
|
||||||
end
|
end
|
||||||
|
@ -0,0 +1,10 @@
|
|||||||
|
# frozen_string_literal: true
|
||||||
|
|
||||||
|
class RemoveOutdatedColumnsFromEventsSynchronizedEditor < ActiveRecord::Migration[7.0]
|
||||||
|
def change
|
||||||
|
change_table :events_synchronized_editor do |t|
|
||||||
|
t.remove :nl
|
||||||
|
t.remove :text
|
||||||
|
end
|
||||||
|
end
|
||||||
|
end
|
@ -10,7 +10,7 @@
|
|||||||
#
|
#
|
||||||
# It's strongly recommended that you check this file into your version control system.
|
# It's strongly recommended that you check this file into your version control system.
|
||||||
|
|
||||||
ActiveRecord::Schema[7.0].define(version: 2023_09_08_091810) do
|
ActiveRecord::Schema[7.0].define(version: 2023_09_12_142620) do
|
||||||
# These are extensions that must be enabled in order to support this database
|
# These are extensions that must be enabled in order to support this database
|
||||||
enable_extension "pg_trgm"
|
enable_extension "pg_trgm"
|
||||||
enable_extension "pgcrypto"
|
enable_extension "pgcrypto"
|
||||||
@ -162,9 +162,7 @@ ActiveRecord::Schema[7.0].define(version: 2023_09_08_091810) do
|
|||||||
t.integer "range_start_column"
|
t.integer "range_start_column"
|
||||||
t.integer "range_end_row"
|
t.integer "range_end_row"
|
||||||
t.integer "range_end_column"
|
t.integer "range_end_column"
|
||||||
t.text "text"
|
|
||||||
t.text "lines", array: true
|
t.text "lines", array: true
|
||||||
t.string "nl", limit: 2, comment: "Identifies the line break type (i.e., \\r\\n or \\n)"
|
|
||||||
t.jsonb "data"
|
t.jsonb "data"
|
||||||
t.datetime "created_at", null: false
|
t.datetime "created_at", null: false
|
||||||
t.datetime "updated_at", null: false
|
t.datetime "updated_at", null: false
|
||||||
|
1594
vendor/assets/javascripts/ace/ace.js
vendored
Executable file → Normal file
1594
vendor/assets/javascripts/ace/ace.js
vendored
Executable file → Normal file
File diff suppressed because it is too large
Load Diff
331
vendor/assets/javascripts/ace/ext-beautify.js
vendored
Executable file → Normal file
331
vendor/assets/javascripts/ace/ext-beautify.js
vendored
Executable file → Normal file
@ -1,4 +1,333 @@
|
|||||||
define("ace/ext/beautify/php_rules",["require","exports","module","ace/token_iterator"],function(e,t,n){"use strict";var r=e("ace/token_iterator").TokenIterator;t.newLines=[{type:"support.php_tag",value:"<?php"},{type:"support.php_tag",value:"<?"},{type:"support.php_tag",value:"?>"},{type:"paren.lparen",value:"{",indent:!0},{type:"paren.rparen",breakBefore:!0,value:"}",indent:!1},{type:"paren.rparen",breakBefore:!0,value:"})",indent:!1,dontBreak:!0},{type:"comment"},{type:"text",value:";"},{type:"text",value:":",context:"php"},{type:"keyword",value:"case",indent:!0,dontBreak:!0},{type:"keyword",value:"default",indent:!0,dontBreak:!0},{type:"keyword",value:"break",indent:!1,dontBreak:!0},{type:"punctuation.doctype.end",value:">"},{type:"meta.tag.punctuation.end",value:">"},{type:"meta.tag.punctuation.begin",value:"<",blockTag:!0,indent:!0,dontBreak:!0},{type:"meta.tag.punctuation.begin",value:"</",indent:!1,breakBefore:!0,dontBreak:!0},{type:"punctuation.operator",value:";"}],t.spaces=[{type:"xml-pe",prepend:!0},{type:"entity.other.attribute-name",prepend:!0},{type:"storage.type",value:"var",append:!0},{type:"storage.type",value:"function",append:!0},{type:"keyword.operator",value:"="},{type:"keyword",value:"as",prepend:!0,append:!0},{type:"keyword",value:"function",append:!0},{type:"support.function",next:/[^\(]/,append:!0},{type:"keyword",value:"or",append:!0,prepend:!0},{type:"keyword",value:"and",append:!0,prepend:!0},{type:"keyword",value:"case",append:!0},{type:"keyword.operator",value:"||",append:!0,prepend:!0},{type:"keyword.operator",value:"&&",append:!0,prepend:!0}],t.singleTags=["!doctype","area","base","br","hr","input","img","link","meta"],t.transform=function(e,n,r){var i=e.getCurrentToken(),s=t.newLines,o=t.spaces,u=t.singleTags,a="",f=0,l=!1,c,h,p={},d,v={},m=!1,g="";while(i!==null){console.log(i);if(!i){i=e.stepForward();continue}i.type=="support.php_tag"&&i.value!="?>"?r="php":i.type=="support.php_tag"&&i.value=="?>"?r="html":i.type=="meta.tag.name.style"&&r!="css"?r="css":i.type=="meta.tag.name.style"&&r=="css"?r="html":i.type=="meta.tag.name.script"&&r!="js"?r="js":i.type=="meta.tag.name.script"&&r=="js"&&(r="html"),v=e.stepForward(),v&&v.type.indexOf("meta.tag.name")==0&&(d=v.value),p.type=="support.php_tag"&&p.value=="<?="&&(l=!0),i.type=="meta.tag.name"&&(i.value=i.value.toLowerCase()),i.type=="text"&&(i.value=i.value.trim());if(!i.value){i=v;continue}g=i.value;for(var y in o)i.type==o[y].type&&(!o[y].value||i.value==o[y].value)&&v&&(!o[y].next||o[y].next.test(v.value))&&(o[y].prepend&&(g=" "+i.value),o[y].append&&(g+=" "));i.type.indexOf("meta.tag.name")==0&&(c=i.value),m=!1;for(y in s)if(i.type==s[y].type&&(!s[y].value||i.value==s[y].value)&&(!s[y].blockTag||u.indexOf(d)===-1)&&(!s[y].context||s[y].context===r)){s[y].indent===!1&&f--;if(s[y].breakBefore&&(!s[y].prev||s[y].prev.test(p.value))){a+="\n",m=!0;for(y=0;y<f;y++)a+=" "}break}if(l===!1)for(y in s)if(p.type==s[y].type&&(!s[y].value||p.value==s[y].value)&&(!s[y].blockTag||u.indexOf(c)===-1)&&(!s[y].context||s[y].context===r)){s[y].indent===!0&&f++;if(!s[y].dontBreak&&!m){a+="\n";for(y=0;y<f;y++)a+=" "}break}a+=g,p.type=="support.php_tag"&&p.value=="?>"&&(l=!1),h=c,p=i,i=v;if(i===null)break}return a}}),define("ace/ext/beautify",["require","exports","module","ace/token_iterator","ace/ext/beautify/php_rules"],function(e,t,n){"use strict";var r=e("ace/token_iterator").TokenIterator,i=e("./beautify/php_rules").transform;t.beautify=function(e){var t=new r(e,0,0),n=t.getCurrentToken(),s=e.$modeId.split("/").pop(),o=i(t,s);e.doc.setValue(o)},t.commands=[{name:"beautify",exec:function(e){t.beautify(e.session)},bindKey:"Ctrl-Shift-B"}]});
|
define("ace/ext/beautify/php_rules",["require","exports","module","ace/token_iterator"], function(require, exports, module) {
|
||||||
|
"use strict";
|
||||||
|
var TokenIterator = require("ace/token_iterator").TokenIterator;
|
||||||
|
exports.newLines = [{
|
||||||
|
type: 'support.php_tag',
|
||||||
|
value: '<?php'
|
||||||
|
}, {
|
||||||
|
type: 'support.php_tag',
|
||||||
|
value: '<?'
|
||||||
|
}, {
|
||||||
|
type: 'support.php_tag',
|
||||||
|
value: '?>'
|
||||||
|
}, {
|
||||||
|
type: 'paren.lparen',
|
||||||
|
value: '{',
|
||||||
|
indent: true
|
||||||
|
}, {
|
||||||
|
type: 'paren.rparen',
|
||||||
|
breakBefore: true,
|
||||||
|
value: '}',
|
||||||
|
indent: false
|
||||||
|
}, {
|
||||||
|
type: 'paren.rparen',
|
||||||
|
breakBefore: true,
|
||||||
|
value: '})',
|
||||||
|
indent: false,
|
||||||
|
dontBreak: true
|
||||||
|
}, {
|
||||||
|
type: 'comment'
|
||||||
|
}, {
|
||||||
|
type: 'text',
|
||||||
|
value: ';'
|
||||||
|
}, {
|
||||||
|
type: 'text',
|
||||||
|
value: ':',
|
||||||
|
context: 'php'
|
||||||
|
}, {
|
||||||
|
type: 'keyword',
|
||||||
|
value: 'case',
|
||||||
|
indent: true,
|
||||||
|
dontBreak: true
|
||||||
|
}, {
|
||||||
|
type: 'keyword',
|
||||||
|
value: 'default',
|
||||||
|
indent: true,
|
||||||
|
dontBreak: true
|
||||||
|
}, {
|
||||||
|
type: 'keyword',
|
||||||
|
value: 'break',
|
||||||
|
indent: false,
|
||||||
|
dontBreak: true
|
||||||
|
}, {
|
||||||
|
type: 'punctuation.doctype.end',
|
||||||
|
value: '>'
|
||||||
|
}, {
|
||||||
|
type: 'meta.tag.punctuation.end',
|
||||||
|
value: '>'
|
||||||
|
}, {
|
||||||
|
type: 'meta.tag.punctuation.begin',
|
||||||
|
value: '<',
|
||||||
|
blockTag: true,
|
||||||
|
indent: true,
|
||||||
|
dontBreak: true
|
||||||
|
}, {
|
||||||
|
type: 'meta.tag.punctuation.begin',
|
||||||
|
value: '</',
|
||||||
|
indent: false,
|
||||||
|
breakBefore: true,
|
||||||
|
dontBreak: true
|
||||||
|
}, {
|
||||||
|
type: 'punctuation.operator',
|
||||||
|
value: ';'
|
||||||
|
}];
|
||||||
|
|
||||||
|
exports.spaces = [{
|
||||||
|
type: 'xml-pe',
|
||||||
|
prepend: true
|
||||||
|
},{
|
||||||
|
type: 'entity.other.attribute-name',
|
||||||
|
prepend: true
|
||||||
|
}, {
|
||||||
|
type: 'storage.type',
|
||||||
|
value: 'var',
|
||||||
|
append: true
|
||||||
|
}, {
|
||||||
|
type: 'storage.type',
|
||||||
|
value: 'function',
|
||||||
|
append: true
|
||||||
|
}, {
|
||||||
|
type: 'keyword.operator',
|
||||||
|
value: '='
|
||||||
|
}, {
|
||||||
|
type: 'keyword',
|
||||||
|
value: 'as',
|
||||||
|
prepend: true,
|
||||||
|
append: true
|
||||||
|
}, {
|
||||||
|
type: 'keyword',
|
||||||
|
value: 'function',
|
||||||
|
append: true
|
||||||
|
}, {
|
||||||
|
type: 'support.function',
|
||||||
|
next: /[^\(]/,
|
||||||
|
append: true
|
||||||
|
}, {
|
||||||
|
type: 'keyword',
|
||||||
|
value: 'or',
|
||||||
|
append: true,
|
||||||
|
prepend: true
|
||||||
|
}, {
|
||||||
|
type: 'keyword',
|
||||||
|
value: 'and',
|
||||||
|
append: true,
|
||||||
|
prepend: true
|
||||||
|
}, {
|
||||||
|
type: 'keyword',
|
||||||
|
value: 'case',
|
||||||
|
append: true
|
||||||
|
}, {
|
||||||
|
type: 'keyword.operator',
|
||||||
|
value: '||',
|
||||||
|
append: true,
|
||||||
|
prepend: true
|
||||||
|
}, {
|
||||||
|
type: 'keyword.operator',
|
||||||
|
value: '&&',
|
||||||
|
append: true,
|
||||||
|
prepend: true
|
||||||
|
}];
|
||||||
|
exports.singleTags = ['!doctype','area','base','br','hr','input','img','link','meta'];
|
||||||
|
|
||||||
|
exports.transform = function(iterator, maxPos, context) {
|
||||||
|
var token = iterator.getCurrentToken();
|
||||||
|
|
||||||
|
var newLines = exports.newLines;
|
||||||
|
var spaces = exports.spaces;
|
||||||
|
var singleTags = exports.singleTags;
|
||||||
|
|
||||||
|
var code = '';
|
||||||
|
|
||||||
|
var indentation = 0;
|
||||||
|
var dontBreak = false;
|
||||||
|
var tag;
|
||||||
|
var lastTag;
|
||||||
|
var lastToken = {};
|
||||||
|
var nextTag;
|
||||||
|
var nextToken = {};
|
||||||
|
var breakAdded = false;
|
||||||
|
var value = '';
|
||||||
|
|
||||||
|
while (token!==null) {
|
||||||
|
console.log(token);
|
||||||
|
|
||||||
|
if( !token ){
|
||||||
|
token = iterator.stepForward();
|
||||||
|
continue;
|
||||||
|
}
|
||||||
|
if( token.type == 'support.php_tag' && token.value != '?>' ){
|
||||||
|
context = 'php';
|
||||||
|
}
|
||||||
|
else if( token.type == 'support.php_tag' && token.value == '?>' ){
|
||||||
|
context = 'html';
|
||||||
|
}
|
||||||
|
else if( token.type == 'meta.tag.name.style' && context != 'css' ){
|
||||||
|
context = 'css';
|
||||||
|
}
|
||||||
|
else if( token.type == 'meta.tag.name.style' && context == 'css' ){
|
||||||
|
context = 'html';
|
||||||
|
}
|
||||||
|
else if( token.type == 'meta.tag.name.script' && context != 'js' ){
|
||||||
|
context = 'js';
|
||||||
|
}
|
||||||
|
else if( token.type == 'meta.tag.name.script' && context == 'js' ){
|
||||||
|
context = 'html';
|
||||||
|
}
|
||||||
|
|
||||||
|
nextToken = iterator.stepForward();
|
||||||
|
if (nextToken && nextToken.type.indexOf('meta.tag.name') == 0) {
|
||||||
|
nextTag = nextToken.value;
|
||||||
|
}
|
||||||
|
if ( lastToken.type == 'support.php_tag' && lastToken.value == '<?=') {
|
||||||
|
dontBreak = true;
|
||||||
|
}
|
||||||
|
if (token.type == 'meta.tag.name') {
|
||||||
|
token.value = token.value.toLowerCase();
|
||||||
|
}
|
||||||
|
if (token.type == 'text') {
|
||||||
|
token.value = token.value.trim();
|
||||||
|
}
|
||||||
|
if (!token.value) {
|
||||||
|
token = nextToken;
|
||||||
|
continue;
|
||||||
|
}
|
||||||
|
value = token.value;
|
||||||
|
for (var i in spaces) {
|
||||||
|
if (
|
||||||
|
token.type == spaces[i].type &&
|
||||||
|
(!spaces[i].value || token.value == spaces[i].value) &&
|
||||||
|
(
|
||||||
|
nextToken &&
|
||||||
|
(!spaces[i].next || spaces[i].next.test(nextToken.value))
|
||||||
|
)
|
||||||
|
) {
|
||||||
|
if (spaces[i].prepend) {
|
||||||
|
value = ' ' + token.value;
|
||||||
|
}
|
||||||
|
|
||||||
|
if (spaces[i].append) {
|
||||||
|
value += ' ';
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
if (token.type.indexOf('meta.tag.name') == 0) {
|
||||||
|
tag = token.value;
|
||||||
|
}
|
||||||
|
breakAdded = false;
|
||||||
|
for (i in newLines) {
|
||||||
|
if (
|
||||||
|
token.type == newLines[i].type &&
|
||||||
|
(
|
||||||
|
!newLines[i].value ||
|
||||||
|
token.value == newLines[i].value
|
||||||
|
) &&
|
||||||
|
(
|
||||||
|
!newLines[i].blockTag ||
|
||||||
|
singleTags.indexOf(nextTag) === -1
|
||||||
|
) &&
|
||||||
|
(
|
||||||
|
!newLines[i].context ||
|
||||||
|
newLines[i].context === context
|
||||||
|
)
|
||||||
|
) {
|
||||||
|
if (newLines[i].indent === false) {
|
||||||
|
indentation--;
|
||||||
|
}
|
||||||
|
|
||||||
|
if (
|
||||||
|
newLines[i].breakBefore &&
|
||||||
|
( !newLines[i].prev || newLines[i].prev.test(lastToken.value) )
|
||||||
|
) {
|
||||||
|
code += "\n";
|
||||||
|
breakAdded = true;
|
||||||
|
for (i = 0; i < indentation; i++) {
|
||||||
|
code += "\t";
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
break;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
if (dontBreak===false) {
|
||||||
|
for (i in newLines) {
|
||||||
|
if (
|
||||||
|
lastToken.type == newLines[i].type &&
|
||||||
|
(
|
||||||
|
!newLines[i].value || lastToken.value == newLines[i].value
|
||||||
|
) &&
|
||||||
|
(
|
||||||
|
!newLines[i].blockTag ||
|
||||||
|
singleTags.indexOf(tag) === -1
|
||||||
|
) &&
|
||||||
|
(
|
||||||
|
!newLines[i].context ||
|
||||||
|
newLines[i].context === context
|
||||||
|
)
|
||||||
|
) {
|
||||||
|
if (newLines[i].indent === true) {
|
||||||
|
indentation++;
|
||||||
|
}
|
||||||
|
|
||||||
|
if (!newLines[i].dontBreak && !breakAdded) {
|
||||||
|
code += "\n";
|
||||||
|
for (i = 0; i < indentation; i++) {
|
||||||
|
code += "\t";
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
break;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
code += value;
|
||||||
|
if ( lastToken.type == 'support.php_tag' && lastToken.value == '?>' ) {
|
||||||
|
dontBreak = false;
|
||||||
|
}
|
||||||
|
lastTag = tag;
|
||||||
|
|
||||||
|
lastToken = token;
|
||||||
|
|
||||||
|
token = nextToken;
|
||||||
|
|
||||||
|
if (token===null) {
|
||||||
|
break;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
return code;
|
||||||
|
};
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
});
|
||||||
|
|
||||||
|
define("ace/ext/beautify",["require","exports","module","ace/token_iterator","ace/ext/beautify/php_rules"], function(require, exports, module) {
|
||||||
|
"use strict";
|
||||||
|
var TokenIterator = require("ace/token_iterator").TokenIterator;
|
||||||
|
|
||||||
|
var phpTransform = require("./beautify/php_rules").transform;
|
||||||
|
|
||||||
|
exports.beautify = function(session) {
|
||||||
|
var iterator = new TokenIterator(session, 0, 0);
|
||||||
|
var token = iterator.getCurrentToken();
|
||||||
|
|
||||||
|
var context = session.$modeId.split("/").pop();
|
||||||
|
|
||||||
|
var code = phpTransform(iterator, context);
|
||||||
|
session.doc.setValue(code);
|
||||||
|
};
|
||||||
|
|
||||||
|
exports.commands = [{
|
||||||
|
name: "beautify",
|
||||||
|
exec: function(editor) {
|
||||||
|
exports.beautify(editor.session);
|
||||||
|
},
|
||||||
|
bindKey: "Ctrl-Shift-B"
|
||||||
|
}]
|
||||||
|
|
||||||
|
});
|
||||||
(function() {
|
(function() {
|
||||||
window.require(["ace/ext/beautify"], function() {});
|
window.require(["ace/ext/beautify"], function() {});
|
||||||
})();
|
})();
|
||||||
|
537
vendor/assets/javascripts/ace/ext-chromevox.js
vendored
Executable file → Normal file
537
vendor/assets/javascripts/ace/ext-chromevox.js
vendored
Executable file → Normal file
File diff suppressed because one or more lines are too long
271
vendor/assets/javascripts/ace/ext-elastic_tabstops_lite.js
vendored
Executable file → Normal file
271
vendor/assets/javascripts/ace/ext-elastic_tabstops_lite.js
vendored
Executable file → Normal file
@ -1,4 +1,273 @@
|
|||||||
define("ace/ext/elastic_tabstops_lite",["require","exports","module","ace/editor","ace/config"],function(e,t,n){"use strict";var r=function(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){var t=e.data.range;r&&(n.indexOf(t.start.row)==-1&&n.push(t.start.row),t.end.row!=t.start.row&&n.push(t.end.row))}};(function(){this.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},this.$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}},this.$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},this.$selectionColumnsForRow=function(e){var t=[],n=this.$editor.getCursorPosition();return this.$editor.session.getSelection().isEmpty()&&e==n.row&&t.push(n.column),t},this.$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},this.$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},this.$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},this.$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)}},this.$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},this.$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}}).call(r.prototype),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))}}})});
|
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() {
|
(function() {
|
||||||
window.require(["ace/ext/elastic_tabstops_lite"], function() {});
|
window.require(["ace/ext/elastic_tabstops_lite"], function() {});
|
||||||
})();
|
})();
|
||||||
|
1187
vendor/assets/javascripts/ace/ext-emmet.js
vendored
Executable file → Normal file
1187
vendor/assets/javascripts/ace/ext-emmet.js
vendored
Executable file → Normal file
File diff suppressed because one or more lines are too long
1
vendor/assets/javascripts/ace/ext-error_marker.js
vendored
Executable file → Normal file
1
vendor/assets/javascripts/ace/ext-error_marker.js
vendored
Executable file → Normal file
@ -1,3 +1,4 @@
|
|||||||
|
|
||||||
;
|
;
|
||||||
(function() {
|
(function() {
|
||||||
window.require(["ace/ext/error_marker"], function() {});
|
window.require(["ace/ext/error_marker"], function() {});
|
||||||
|
167
vendor/assets/javascripts/ace/ext-keybinding_menu.js
vendored
Executable file → Normal file
167
vendor/assets/javascripts/ace/ext-keybinding_menu.js
vendored
Executable file → Normal file
@ -1,4 +1,169 @@
|
|||||||
define("ace/ext/menu_tools/overlay_page",["require","exports","module","ace/lib/dom"],function(e,t,n){"use strict";var r=e("../../lib/dom"),i="#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);-webkit-transition: all 0.5s;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: 1000;}.ace_closeButton{background: rgba(245, 146, 146, 0.9);}.ace_optionsMenuKey {color: darkslateblue;font-weight: bold;}.ace_optionsMenuCommand {color: darkcyan;font-weight: normal;}";r.importCssString(i),n.exports.overlayPage=function(t,n,i,s,o,u){function l(e){e.keyCode===27&&a.click()}i=i?"top: "+i+";":"",o=o?"bottom: "+o+";":"",s=s?"right: "+s+";":"",u=u?"left: "+u+";":"";var a=document.createElement("div"),f=document.createElement("div");a.style.cssText="margin: 0; padding: 0; position: fixed; top:0; bottom:0; left:0; right:0;z-index: 9990; background-color: rgba(0, 0, 0, 0.3);",a.addEventListener("click",function(){document.removeEventListener("keydown",l),a.parentNode.removeChild(a),t.focus(),a=null}),document.addEventListener("keydown",l),f.style.cssText=i+s+o+u,f.addEventListener("click",function(e){e.stopPropagation()});var c=r.createElement("div");c.style.position="relative";var h=r.createElement("div");h.className="ace_closeButton",h.addEventListener("click",function(){a.click()}),c.appendChild(h),f.appendChild(c),f.appendChild(n),a.appendChild(f),document.body.appendChild(a),t.blur()}}),define("ace/ext/menu_tools/get_editor_keyboard_shortcuts",["require","exports","module","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,"0","0","0",null)}}var r=e("ace/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()}}])}});
|
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);\
|
||||||
|
-webkit-transition: all 0.5s;\
|
||||||
|
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: 1000;\
|
||||||
|
}\
|
||||||
|
.ace_closeButton{\
|
||||||
|
background: rgba(245, 146, 146, 0.9);\
|
||||||
|
}\
|
||||||
|
.ace_optionsMenuKey {\
|
||||||
|
color: darkslateblue;\
|
||||||
|
font-weight: bold;\
|
||||||
|
}\
|
||||||
|
.ace_optionsMenuCommand {\
|
||||||
|
color: darkcyan;\
|
||||||
|
font-weight: normal;\
|
||||||
|
}";
|
||||||
|
dom.importCssString(cssText);
|
||||||
|
module.exports.overlayPage = function overlayPage(editor, contentElement, top, right, bottom, left) {
|
||||||
|
top = top ? 'top: ' + top + ';' : '';
|
||||||
|
bottom = bottom ? 'bottom: ' + bottom + ';' : '';
|
||||||
|
right = right ? 'right: ' + right + ';' : '';
|
||||||
|
left = left ? 'left: ' + left + ';' : '';
|
||||||
|
|
||||||
|
var closer = document.createElement('div');
|
||||||
|
var contentContainer = document.createElement('div');
|
||||||
|
|
||||||
|
function documentEscListener(e) {
|
||||||
|
if (e.keyCode === 27) {
|
||||||
|
closer.click();
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
closer.style.cssText = 'margin: 0; padding: 0; ' +
|
||||||
|
'position: fixed; top:0; bottom:0; left:0; right:0;' +
|
||||||
|
'z-index: 9990; ' +
|
||||||
|
'background-color: rgba(0, 0, 0, 0.3);';
|
||||||
|
closer.addEventListener('click', function() {
|
||||||
|
document.removeEventListener('keydown', documentEscListener);
|
||||||
|
closer.parentNode.removeChild(closer);
|
||||||
|
editor.focus();
|
||||||
|
closer = null;
|
||||||
|
});
|
||||||
|
document.addEventListener('keydown', documentEscListener);
|
||||||
|
|
||||||
|
contentContainer.style.cssText = top + right + bottom + left;
|
||||||
|
contentContainer.addEventListener('click', function(e) {
|
||||||
|
e.stopPropagation();
|
||||||
|
});
|
||||||
|
|
||||||
|
var wrapper = dom.createElement("div");
|
||||||
|
wrapper.style.position = "relative";
|
||||||
|
|
||||||
|
var closeButton = dom.createElement("div");
|
||||||
|
closeButton.className = "ace_closeButton";
|
||||||
|
closeButton.addEventListener('click', function() {
|
||||||
|
closer.click();
|
||||||
|
});
|
||||||
|
|
||||||
|
wrapper.appendChild(closeButton);
|
||||||
|
contentContainer.appendChild(wrapper);
|
||||||
|
|
||||||
|
contentContainer.appendChild(contentElement);
|
||||||
|
closer.appendChild(contentContainer);
|
||||||
|
document.body.appendChild(closer);
|
||||||
|
editor.blur();
|
||||||
|
};
|
||||||
|
|
||||||
|
});
|
||||||
|
|
||||||
|
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("ace/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, '0', '0', '0', null);
|
||||||
|
}
|
||||||
|
};
|
||||||
|
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() {
|
(function() {
|
||||||
window.require(["ace/ext/keybinding_menu"], function() {});
|
window.require(["ace/ext/keybinding_menu"], function() {});
|
||||||
})();
|
})();
|
||||||
|
1931
vendor/assets/javascripts/ace/ext-language_tools.js
vendored
Executable file → Normal file
1931
vendor/assets/javascripts/ace/ext-language_tools.js
vendored
Executable file → Normal file
File diff suppressed because one or more lines are too long
49
vendor/assets/javascripts/ace/ext-linking.js
vendored
Executable file → Normal file
49
vendor/assets/javascripts/ace/ext-linking.js
vendored
Executable file → Normal file
@ -1,4 +1,51 @@
|
|||||||
define("ace/ext/linking",["require","exports","module","ace/editor","ace/config"],function(e,t,n){function i(e){var t=e.editor,n=e.getAccelKey();if(n){var t=e.editor,r=e.getDocumentPosition(),i=t.session,s=i.getTokenAt(r.row,r.column);t._emit("linkHover",{position:r,token:s})}}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("ace/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}})});
|
define("ace/ext/linking",["require","exports","module","ace/editor","ace/config"], function(require, exports, module) {
|
||||||
|
|
||||||
|
var Editor = require("ace/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
|
||||||
|
}
|
||||||
|
})
|
||||||
|
|
||||||
|
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);
|
||||||
|
|
||||||
|
editor._emit("linkHover", {position: docPos, token: token});
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
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() {
|
(function() {
|
||||||
window.require(["ace/ext/linking"], function() {});
|
window.require(["ace/ext/linking"], function() {});
|
||||||
})();
|
})();
|
||||||
|
189
vendor/assets/javascripts/ace/ext-modelist.js
vendored
Executable file → Normal file
189
vendor/assets/javascripts/ace/ext-modelist.js
vendored
Executable file → Normal file
@ -1,4 +1,191 @@
|
|||||||
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(e,t,n){this.name=e,this.caption=t,this.mode="ace/mode/"+e,this.extensions=n;if(/\^/.test(n))var r=n.replace(/\|(\^)?/g,function(e,t){return"$|"+(t?"^":"^.*\\.")})+"$";else var r="^.*\\.("+n+")$";this.extRe=new RegExp(r,"gi")};s.prototype.supportsFile=function(e){return e.match(this.extRe)};var o={ABAP:["abap"],ABC:["abc"],ActionScript:["as"],ADA:["ada|adb"],Apache_Conf:["^htaccess|^htgroups|^htpasswd|^conf|htaccess|htgroups|htpasswd"],AsciiDoc:["asciidoc"],Assembly_x86:["asm"],AutoHotKey:["ahk"],BatchFile:["bat|cmd"],C9Search:["c9search_results"],C_Cpp:["cpp|c|cc|cxx|h|hh|hpp"],Cirru:["cirru|cr"],Clojure:["clj|cljs"],Cobol:["CBL|COB"],coffee:["coffee|cf|cson|^Cakefile"],ColdFusion:["cfm"],CSharp:["cs"],CSS:["css"],Curly:["curly"],D:["d|di"],Dart:["dart"],Diff:["diff|patch"],Dockerfile:["^Dockerfile"],Dot:["dot"],Dummy:["dummy"],DummySyntax:["dummy"],Eiffel:["e"],EJS:["ejs"],Elixir:["ex|exs"],Elm:["elm"],Erlang:["erl|hrl"],Forth:["frt|fs|ldr"],FTL:["ftl"],Gcode:["gcode"],Gherkin:["feature"],Gitignore:["^.gitignore"],Glsl:["glsl|frag|vert"],golang:["go"],Groovy:["groovy"],HAML:["haml"],Handlebars:["hbs|handlebars|tpl|mustache"],Haskell:["hs"],haXe:["hx"],HTML:["html|htm|xhtml"],HTML_Ruby:["erb|rhtml|html.erb"],INI:["ini|conf|cfg|prefs"],Io:["io"],Jack:["jack"],Jade:["jade"],Java:["java"],JavaScript:["js|jsm"],JSON:["json"],JSONiq:["jq"],JSP:["jsp"],JSX:["jsx"],Julia:["jl"],LaTeX:["tex|latex|ltx|bib"],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"],MEL:["mel"],MUSHCode:["mc|mush"],MySQL:["mysql"],Nix:["nix"],ObjectiveC:["m|mm"],OCaml:["ml|mli"],Pascal:["pas|p"],Perl:["pl|pm"],pgSQL:["pgsql"],PHP:["php|phtml"],Powershell:["ps1"],Praat:["praat|praatscript|psc|proc"],Prolog:["plg|prolog"],Properties:["properties"],Protobuf:["proto"],Python:["py"],R:["r"],RDoc:["Rd"],RHTML:["Rhtml"],Ruby:["rb|ru|gemspec|rake|^Guardfile|^Rakefile|^Gemfile"],Rust:["rs"],SASS:["sass"],SCAD:["scad"],Scala:["scala"],Scheme:["scm|rkt"],SCSS:["scss"],SH:["sh|bash|^.bashrc"],SJS:["sjs"],Smarty:["smarty|tpl"],snippets:["snippets"],Soy_Template:["soy"],Space:["space"],SQL:["sql"],Stylus:["styl|stylus"],SVG:["svg"],Tcl:["tcl"],Tex:["tex"],Text:["txt"],Textile:["textile"],Toml:["toml"],Twig:["twig"],Typescript:["ts|typescript|str"],Vala:["vala"],VBScript:["vbs|vb"],Velocity:["vm"],Verilog:["v|vh|sv|svh"],VHDL:["vhd|vhdl"],XML:["xml|rdf|rss|wsdl|xslt|atom|mathml|mml|xul|xbl|xaml"],XQuery:["xq"],YAML:["yaml|yml"],Django:["html"]},u={ObjectiveC:"Objective-C",CSharp:"C#",golang:"Go",C_Cpp:"C and C++",coffee:"CoffeeScript",HTML_Ruby:"HTML (Ruby)",FTL:"FreeMarker"},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)}n.exports={getModeForPath:i,modes:r,modesByName:a}});
|
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;
|
||||||
|
if (/\^/.test(extensions)) {
|
||||||
|
var re = extensions.replace(/\|(\^)?/g, function(a, b){
|
||||||
|
return "$|" + (b ? "^" : "^.*\\.");
|
||||||
|
}) + "$";
|
||||||
|
} else {
|
||||||
|
var 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"],
|
||||||
|
Apache_Conf: ["^htaccess|^htgroups|^htpasswd|^conf|htaccess|htgroups|htpasswd"],
|
||||||
|
AsciiDoc: ["asciidoc|adoc"],
|
||||||
|
Assembly_x86:["asm"],
|
||||||
|
AutoHotKey: ["ahk"],
|
||||||
|
BatchFile: ["bat|cmd"],
|
||||||
|
C_Cpp: ["cpp|c|cc|cxx|h|hh|hpp"],
|
||||||
|
C9Search: ["c9search_results"],
|
||||||
|
Cirru: ["cirru|cr"],
|
||||||
|
Clojure: ["clj|cljs"],
|
||||||
|
Cobol: ["CBL|COB"],
|
||||||
|
coffee: ["coffee|cf|cson|^Cakefile"],
|
||||||
|
ColdFusion: ["cfm"],
|
||||||
|
CSharp: ["cs"],
|
||||||
|
CSS: ["css"],
|
||||||
|
Curly: ["curly"],
|
||||||
|
D: ["d|di"],
|
||||||
|
Dart: ["dart"],
|
||||||
|
Diff: ["diff|patch"],
|
||||||
|
Dockerfile: ["^Dockerfile"],
|
||||||
|
Dot: ["dot"],
|
||||||
|
Dummy: ["dummy"],
|
||||||
|
DummySyntax: ["dummy"],
|
||||||
|
Eiffel: ["e"],
|
||||||
|
EJS: ["ejs"],
|
||||||
|
Elixir: ["ex|exs"],
|
||||||
|
Elm: ["elm"],
|
||||||
|
Erlang: ["erl|hrl"],
|
||||||
|
Forth: ["frt|fs|ldr"],
|
||||||
|
FTL: ["ftl"],
|
||||||
|
Gcode: ["gcode"],
|
||||||
|
Gherkin: ["feature"],
|
||||||
|
Gitignore: ["^.gitignore"],
|
||||||
|
Glsl: ["glsl|frag|vert"],
|
||||||
|
golang: ["go"],
|
||||||
|
Groovy: ["groovy"],
|
||||||
|
HAML: ["haml"],
|
||||||
|
Handlebars: ["hbs|handlebars|tpl|mustache"],
|
||||||
|
Haskell: ["hs"],
|
||||||
|
haXe: ["hx"],
|
||||||
|
HTML: ["html|htm|xhtml"],
|
||||||
|
HTML_Ruby: ["erb|rhtml|html.erb"],
|
||||||
|
INI: ["ini|conf|cfg|prefs"],
|
||||||
|
Io: ["io"],
|
||||||
|
Jack: ["jack"],
|
||||||
|
Jade: ["jade"],
|
||||||
|
Java: ["java"],
|
||||||
|
JavaScript: ["js|jsm"],
|
||||||
|
JSON: ["json"],
|
||||||
|
JSONiq: ["jq"],
|
||||||
|
JSP: ["jsp"],
|
||||||
|
JSX: ["jsx"],
|
||||||
|
Julia: ["jl"],
|
||||||
|
LaTeX: ["tex|latex|ltx|bib"],
|
||||||
|
Lean: ["lean|hlean"],
|
||||||
|
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"],
|
||||||
|
MEL: ["mel"],
|
||||||
|
MUSHCode: ["mc|mush"],
|
||||||
|
MySQL: ["mysql"],
|
||||||
|
Nix: ["nix"],
|
||||||
|
ObjectiveC: ["m|mm"],
|
||||||
|
OCaml: ["ml|mli"],
|
||||||
|
Pascal: ["pas|p"],
|
||||||
|
Perl: ["pl|pm"],
|
||||||
|
pgSQL: ["pgsql"],
|
||||||
|
PHP: ["php|phtml|shtml|php3|php4|php5|phps|phpt|aw|ctp"],
|
||||||
|
Powershell: ["ps1"],
|
||||||
|
Praat: ["praat|praatscript|psc|proc"],
|
||||||
|
Prolog: ["plg|prolog"],
|
||||||
|
Properties: ["properties"],
|
||||||
|
Protobuf: ["proto"],
|
||||||
|
Python: ["py"],
|
||||||
|
R: ["r"],
|
||||||
|
RDoc: ["Rd"],
|
||||||
|
RHTML: ["Rhtml"],
|
||||||
|
Ruby: ["rb|ru|gemspec|rake|^Guardfile|^Rakefile|^Gemfile"],
|
||||||
|
Rust: ["rs"],
|
||||||
|
SASS: ["sass"],
|
||||||
|
SCAD: ["scad"],
|
||||||
|
Scala: ["scala"],
|
||||||
|
Scheme: ["scm|rkt"],
|
||||||
|
SCSS: ["scss"],
|
||||||
|
SH: ["sh|bash|^.bashrc"],
|
||||||
|
SJS: ["sjs"],
|
||||||
|
Smarty: ["smarty|tpl"],
|
||||||
|
snippets: ["snippets"],
|
||||||
|
Soy_Template:["soy"],
|
||||||
|
Space: ["space"],
|
||||||
|
SQL: ["sql"],
|
||||||
|
SQLServer: ["sqlserver"],
|
||||||
|
Stylus: ["styl|stylus"],
|
||||||
|
SVG: ["svg"],
|
||||||
|
Tcl: ["tcl"],
|
||||||
|
Tex: ["tex"],
|
||||||
|
Text: ["txt"],
|
||||||
|
Textile: ["textile"],
|
||||||
|
Toml: ["toml"],
|
||||||
|
Twig: ["twig"],
|
||||||
|
Typescript: ["ts|typescript|str"],
|
||||||
|
Vala: ["vala"],
|
||||||
|
VBScript: ["vbs|vb"],
|
||||||
|
Velocity: ["vm"],
|
||||||
|
Verilog: ["v|vh|sv|svh"],
|
||||||
|
VHDL: ["vhd|vhdl"],
|
||||||
|
XML: ["xml|rdf|rss|wsdl|xslt|atom|mathml|mml|xul|xbl|xaml"],
|
||||||
|
XQuery: ["xq"],
|
||||||
|
YAML: ["yaml|yml"],
|
||||||
|
Django: ["html"]
|
||||||
|
};
|
||||||
|
|
||||||
|
var nameOverrides = {
|
||||||
|
ObjectiveC: "Objective-C",
|
||||||
|
CSharp: "C#",
|
||||||
|
golang: "Go",
|
||||||
|
C_Cpp: "C and C++",
|
||||||
|
coffee: "CoffeeScript",
|
||||||
|
HTML_Ruby: "HTML (Ruby)",
|
||||||
|
FTL: "FreeMarker"
|
||||||
|
};
|
||||||
|
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() {
|
(function() {
|
||||||
window.require(["ace/ext/modelist"], function() {});
|
window.require(["ace/ext/modelist"], function() {});
|
||||||
})();
|
})();
|
||||||
|
491
vendor/assets/javascripts/ace/ext-old_ie.js
vendored
Executable file → Normal file
491
vendor/assets/javascripts/ace/ext-old_ie.js
vendored
Executable file → Normal file
File diff suppressed because one or more lines are too long
406
vendor/assets/javascripts/ace/ext-searchbox.js
vendored
Executable file → Normal file
406
vendor/assets/javascripts/ace/ext-searchbox.js
vendored
Executable file → Normal file
File diff suppressed because one or more lines are too long
641
vendor/assets/javascripts/ace/ext-settings_menu.js
vendored
Executable file → Normal file
641
vendor/assets/javascripts/ace/ext-settings_menu.js
vendored
Executable file → Normal file
File diff suppressed because one or more lines are too long
68
vendor/assets/javascripts/ace/ext-spellcheck.js
vendored
Executable file → Normal file
68
vendor/assets/javascripts/ace/ext-spellcheck.js
vendored
Executable file → Normal file
@ -1,4 +1,70 @@
|
|||||||
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="",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){console.log(e,a,n.selectionStart,n.selectionEnd);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}})});
|
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) {
|
||||||
|
console.log(newVal , value, text.selectionStart, text.selectionEnd)
|
||||||
|
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() {
|
(function() {
|
||||||
window.require(["ace/ext/spellcheck"], function() {});
|
window.require(["ace/ext/spellcheck"], function() {});
|
||||||
})();
|
})();
|
||||||
|
243
vendor/assets/javascripts/ace/ext-split.js
vendored
Executable file → Normal file
243
vendor/assets/javascripts/ace/ext-split.js
vendored
Executable file → Normal file
@ -1,4 +1,245 @@
|
|||||||
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";function l(e,t){this.$u=e,this.$doc=t}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=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();if(n){var r=new l(n,t);t.setUndoManager(r)}return t.$informUndoManager=i.delayedCall(function(){t.$deltas=[]}),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),function(){this.execute=function(e){this.$u.execute(e)},this.undo=function(){var e=this.$u.undo(!0);e&&this.$doc.selection.setSelectionRange(e)},this.redo=function(){var e=this.$u.redo(!0);e&&this.$doc.selection.setSelectionRange(e)},this.reset=function(){this.$u.reset()},this.hasUndo=function(){return this.$u.hasUndo()},this.hasRedo=function(){return this.$u.hasRedo()}}.call(l.prototype),t.Split=f}),define("ace/ext/split",["require","exports","module","ace/split"],function(e,t,n){"use strict";n.exports=e("../split")});
|
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();
|
||||||
|
if (undoManager) {
|
||||||
|
var undoManagerProxy = new UndoManagerProxy(undoManager, s);
|
||||||
|
s.setUndoManager(undoManagerProxy);
|
||||||
|
}
|
||||||
|
s.$informUndoManager = lang.delayedCall(function() { s.$deltas = []; });
|
||||||
|
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);
|
||||||
|
|
||||||
|
|
||||||
|
function UndoManagerProxy(undoManager, session) {
|
||||||
|
this.$u = undoManager;
|
||||||
|
this.$doc = session;
|
||||||
|
}
|
||||||
|
|
||||||
|
(function() {
|
||||||
|
this.execute = function(options) {
|
||||||
|
this.$u.execute(options);
|
||||||
|
};
|
||||||
|
|
||||||
|
this.undo = function() {
|
||||||
|
var selectionRange = this.$u.undo(true);
|
||||||
|
if (selectionRange) {
|
||||||
|
this.$doc.selection.setSelectionRange(selectionRange);
|
||||||
|
}
|
||||||
|
};
|
||||||
|
|
||||||
|
this.redo = function() {
|
||||||
|
var selectionRange = this.$u.redo(true);
|
||||||
|
if (selectionRange) {
|
||||||
|
this.$doc.selection.setSelectionRange(selectionRange);
|
||||||
|
}
|
||||||
|
};
|
||||||
|
|
||||||
|
this.reset = function() {
|
||||||
|
this.$u.reset();
|
||||||
|
};
|
||||||
|
|
||||||
|
this.hasUndo = function() {
|
||||||
|
return this.$u.hasUndo();
|
||||||
|
};
|
||||||
|
|
||||||
|
this.hasRedo = function() {
|
||||||
|
return this.$u.hasRedo();
|
||||||
|
};
|
||||||
|
}).call(UndoManagerProxy.prototype);
|
||||||
|
|
||||||
|
exports.Split = Split;
|
||||||
|
});
|
||||||
|
|
||||||
|
define("ace/ext/split",["require","exports","module","ace/split"], function(require, exports, module) {
|
||||||
|
"use strict";
|
||||||
|
module.exports = require("../split");
|
||||||
|
|
||||||
|
});
|
||||||
(function() {
|
(function() {
|
||||||
window.require(["ace/ext/split"], function() {});
|
window.require(["ace/ext/split"], function() {});
|
||||||
})();
|
})();
|
||||||
|
158
vendor/assets/javascripts/ace/ext-static_highlight.js
vendored
Executable file → Normal file
158
vendor/assets/javascripts/ace/ext-static_highlight.js
vendored
Executable file → Normal file
@ -1,4 +1,160 @@
|
|||||||
define("ace/ext/static_highlight",["require","exports","module","ace/edit_session","ace/layer/text","ace/config","ace/lib/dom"],function(e,t,n){"use strict";var r=e("../edit_session").EditSession,i=e("../layer/text").Text,s=".ace_static_highlight {font-family: 'Monaco', 'Menlo', 'Ubuntu Mono', 'Consolas', 'source-code-pro', 'Droid Sans Mono', monospace;font-size: 12px;}.ace_static_highlight .ace_gutter {width: 25px !important;float: left;text-align: right;padding: 0 3px 0 0;margin-right: 3px;position: static !important;}.ace_static_highlight .ace_line { clear: both; }.ace_static_highlight .ace_gutter-cell {-moz-user-select: -moz-none;-khtml-user-select: none;-webkit-user-select: none;user-select: none;}.ace_static_highlight .ace_gutter-cell:before {content: counter(ace_line, decimal);counter-increment: ace_line;}.ace_static_highlight {counter-reset: ace_line;}",o=e("../config"),u=e("../lib/dom"),a=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="",f=[];if(e.firstElementChild){var l=0;for(var c=0;c<e.childNodes.length;c++){var h=e.childNodes[c];h.nodeType==3?(l+=h.data.length,o+=h.data):f.push(l,h)}}else o=u.getInnerText(e),t.trim&&(o=o.trim());a.render(o,i,s,t.firstLineNumber,!t.showGutter,function(t){u.importCssString(t.css,"ace_highlight"),e.innerHTML=t.html;var r=e.firstChild.firstChild;for(var i=0;i<f.length;i+=2){var s=t.session.doc.indexToPosition(f[i]),o=f[i+1],a=r.children[s.row];a&&a.appendChild(o)}n&&n()})};a.render=function(e,t,n,i,s,u){function h(){var r=a.renderSync(e,t,n,i,s);return u?u(r):r}var f=1,l=r.prototype.$modes;typeof n=="string"&&(f++,o.loadModule(["theme",n],function(e){n=e,--f||h()}));var c;return t&&typeof t=="object"&&!t.getTokenizer&&(c=t,t=c.path),typeof t=="string"&&(f++,o.loadModule(["mode",t],function(e){if(!l[t]||c)l[t]=new e.Mode(c);t=l[t],--f||h()})),--f||h()},a.renderSync=function(e,t,n,o,u){o=parseInt(o||1,10);var a=new r("");a.setUseWorker(!1),a.setMode(t);var f=new i(document.createElement("div"));f.setSession(a),f.config={characterWidth:10,lineHeight:20},a.setValue(e);var l=[],c=a.getLength();for(var h=0;h<c;h++)l.push("<div class='ace_line'>"),u||l.push("<span class='ace_gutter ace_gutter-cell' unselectable='on'></span>"),f.$renderLine(l,h,!0,!1),l.push("\n</div>");var p="<div class='"+n.cssClass+"'>"+"<div class='ace_static_highlight' style='counter-reset:ace_line "+(o-1)+"'>"+l.join("")+"</div>"+"</div>";return f.destroy(),{css:s+n.cssText,html:p,session:a}},n.exports=a,n.exports.highlight=a});
|
define("ace/ext/static_highlight",["require","exports","module","ace/edit_session","ace/layer/text","ace/config","ace/lib/dom"], 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;\
|
||||||
|
}\
|
||||||
|
.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 SimpleTextLayer = function() {
|
||||||
|
this.config = {};
|
||||||
|
};
|
||||||
|
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 = dom.getInnerText(el);
|
||||||
|
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);
|
||||||
|
|
||||||
|
session.setValue(input);
|
||||||
|
|
||||||
|
var stringBuilder = [];
|
||||||
|
var length = session.getLength();
|
||||||
|
|
||||||
|
for(var ix = 0; ix < length; ix++) {
|
||||||
|
stringBuilder.push("<div class='ace_line'>");
|
||||||
|
if (!disableGutter)
|
||||||
|
stringBuilder.push("<span class='ace_gutter ace_gutter-cell' unselectable='on'>" + /*(ix + lineStart) + */ "</span>");
|
||||||
|
textLayer.$renderLine(stringBuilder, ix, true, false);
|
||||||
|
stringBuilder.push("\n</div>");
|
||||||
|
}
|
||||||
|
var html = "<div class='" + theme.cssClass + "'>" +
|
||||||
|
"<div class='ace_static_highlight" + (disableGutter ? "" : " ace_show_gutter") +
|
||||||
|
"' style='counter-reset:ace_line " + (lineStart - 1) + "'>" +
|
||||||
|
stringBuilder.join("") +
|
||||||
|
"</div>" +
|
||||||
|
"</div>";
|
||||||
|
|
||||||
|
textLayer.destroy();
|
||||||
|
|
||||||
|
return {
|
||||||
|
css: baseStyles + theme.cssText,
|
||||||
|
html: html,
|
||||||
|
session: session
|
||||||
|
};
|
||||||
|
};
|
||||||
|
|
||||||
|
module.exports = highlight;
|
||||||
|
module.exports.highlight =highlight;
|
||||||
|
});
|
||||||
(function() {
|
(function() {
|
||||||
window.require(["ace/ext/static_highlight"], function() {});
|
window.require(["ace/ext/static_highlight"], function() {});
|
||||||
})();
|
})();
|
||||||
|
48
vendor/assets/javascripts/ace/ext-statusbar.js
vendored
Executable file → Normal file
48
vendor/assets/javascripts/ace/ext-statusbar.js
vendored
Executable file → Normal file
@ -1,4 +1,50 @@
|
|||||||
define("ace/ext/statusbar",["require","exports","module","ace/lib/dom","ace/lib/lang"],function(e,t,n){"use strict";var r=e("ace/lib/dom"),i=e("ace/lib/lang"),s=function(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));e.on("changeStatus",function(){n.schedule(100)}),e.on("changeSelection",function(){n.schedule(100)})};(function(){this.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.lead;n(r.row+":"+r.column," ");if(!e.selection.isEmpty()){var i=e.getSelectionRange();n("("+(i.end.row-i.start.row)+":"+(i.end.column-i.start.column)+")")}t.pop(),this.element.textContent=t.join("")}}).call(s.prototype),t.StatusBar=s});
|
define("ace/ext/statusbar",["require","exports","module","ace/lib/dom","ace/lib/lang"], function(require, exports, module) {
|
||||||
|
"use strict";
|
||||||
|
var dom = require("ace/lib/dom");
|
||||||
|
var lang = require("ace/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));
|
||||||
|
editor.on("changeStatus", function() {
|
||||||
|
statusUpdate.schedule(100);
|
||||||
|
});
|
||||||
|
editor.on("changeSelection", function() {
|
||||||
|
statusUpdate.schedule(100);
|
||||||
|
});
|
||||||
|
};
|
||||||
|
|
||||||
|
(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 c = editor.selection.lead;
|
||||||
|
add(c.row + ":" + c.column, " ");
|
||||||
|
if (!editor.selection.isEmpty()) {
|
||||||
|
var r = editor.getSelectionRange();
|
||||||
|
add("(" + (r.end.row - r.start.row) + ":" +(r.end.column - r.start.column) + ")");
|
||||||
|
}
|
||||||
|
status.pop();
|
||||||
|
this.element.textContent = status.join("");
|
||||||
|
};
|
||||||
|
}).call(StatusBar.prototype);
|
||||||
|
|
||||||
|
exports.StatusBar = StatusBar;
|
||||||
|
|
||||||
|
});
|
||||||
(function() {
|
(function() {
|
||||||
window.require(["ace/ext/statusbar"], function() {});
|
window.require(["ace/ext/statusbar"], function() {});
|
||||||
})();
|
})();
|
||||||
|
628
vendor/assets/javascripts/ace/ext-textarea.js
vendored
Executable file → Normal file
628
vendor/assets/javascripts/ace/ext-textarea.js
vendored
Executable file → Normal file
File diff suppressed because one or more lines are too long
57
vendor/assets/javascripts/ace/ext-themelist.js
vendored
Executable file → Normal file
57
vendor/assets/javascripts/ace/ext-themelist.js
vendored
Executable file → Normal file
@ -1,4 +1,59 @@
|
|||||||
define("ace/ext/themelist",["require","exports","module","ace/lib/fixoldbrowsers"],function(e,t,n){"use strict";e("ace/lib/fixoldbrowsers");var r=[["Chrome"],["Clouds"],["Crimson Editor"],["Dawn"],["Dreamweaver"],["Eclipse"],["GitHub"],["Solarized Light"],["TextMate"],["Tomorrow"],["XCode"],["Kuroir"],["KatzenMilch"],["Ambiance","ambiance","dark"],["Chaos","chaos","dark"],["Clouds Midnight","clouds_midnight","dark"],["Cobalt","cobalt","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"],["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"]];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})});
|
define("ace/ext/themelist",["require","exports","module","ace/lib/fixoldbrowsers"], function(require, exports, module) {
|
||||||
|
"use strict";
|
||||||
|
require("ace/lib/fixoldbrowsers");
|
||||||
|
|
||||||
|
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"],
|
||||||
|
["Cobalt" ,"cobalt" , "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"],
|
||||||
|
["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() {
|
(function() {
|
||||||
window.require(["ace/ext/themelist"], function() {});
|
window.require(["ace/ext/themelist"], function() {});
|
||||||
})();
|
})();
|
||||||
|
182
vendor/assets/javascripts/ace/ext-whitespace.js
vendored
Executable file → Normal file
182
vendor/assets/javascripts/ace/ext-whitespace.js
vendored
Executable file → Normal file
@ -1,4 +1,184 @@
|
|||||||
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;a[0]==" "&&i++;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)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?-1:0;for(var s=0,o=r.length;s<o;s++){var u=r[s],a=u.search(/\s+$/);a>i&&n.removeInLine(s,a,u.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",exec:function(e){t.detectIndentation(e.session)}},{name:"trimTrailingSpace",exec:function(e){t.trimTrailingSpace(e.session)}},{name:"convertIndentation",exec:function(e,n){var r=t.$parseArg(n);t.convertIndentation(e.session,r.ch,r.length)}},{name:"setIndentation",exec:function(e,n){var r=t.$parseArg(n);r.length&&e.session.setTabSize(r.length),r.ch&&e.session.setUseSoftTabs(r.ch==" ")}}]});
|
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, trimEmpty) {
|
||||||
|
var doc = session.getDocument();
|
||||||
|
var lines = doc.getAllLines();
|
||||||
|
|
||||||
|
var min = trimEmpty ? -1 : 0;
|
||||||
|
|
||||||
|
for (var i = 0, l=lines.length; i < l; i++) {
|
||||||
|
var line = lines[i];
|
||||||
|
var index = line.search(/\s+$/);
|
||||||
|
|
||||||
|
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",
|
||||||
|
exec: function(editor) {
|
||||||
|
exports.detectIndentation(editor.session);
|
||||||
|
}
|
||||||
|
}, {
|
||||||
|
name: "trimTrailingSpace",
|
||||||
|
exec: function(editor) {
|
||||||
|
exports.trimTrailingSpace(editor.session);
|
||||||
|
}
|
||||||
|
}, {
|
||||||
|
name: "convertIndentation",
|
||||||
|
exec: function(editor, arg) {
|
||||||
|
var indent = exports.$parseArg(arg);
|
||||||
|
exports.convertIndentation(editor.session, indent.ch, indent.length);
|
||||||
|
}
|
||||||
|
}, {
|
||||||
|
name: "setIndentation",
|
||||||
|
exec: function(editor, arg) {
|
||||||
|
var indent = exports.$parseArg(arg);
|
||||||
|
indent.length && editor.session.setTabSize(indent.length);
|
||||||
|
indent.ch && editor.session.setUseSoftTabs(indent.ch == " ");
|
||||||
|
}
|
||||||
|
}];
|
||||||
|
|
||||||
|
});
|
||||||
(function() {
|
(function() {
|
||||||
window.require(["ace/ext/whitespace"], function() {});
|
window.require(["ace/ext/whitespace"], function() {});
|
||||||
})();
|
})();
|
||||||
|
1164
vendor/assets/javascripts/ace/keybinding-emacs.js
vendored
Executable file → Normal file
1164
vendor/assets/javascripts/ace/keybinding-emacs.js
vendored
Executable file → Normal file
File diff suppressed because one or more lines are too long
5565
vendor/assets/javascripts/ace/keybinding-vim.js
vendored
Executable file → Normal file
5565
vendor/assets/javascripts/ace/keybinding-vim.js
vendored
Executable file → Normal file
File diff suppressed because one or more lines are too long
231
vendor/assets/javascripts/ace/mode-abap.js
vendored
Executable file → Normal file
231
vendor/assets/javascripts/ace/mode-abap.js
vendored
Executable file → Normal file
File diff suppressed because one or more lines are too long
261
vendor/assets/javascripts/ace/mode-abc.js
vendored
Executable file → Normal file
261
vendor/assets/javascripts/ace/mode-abc.js
vendored
Executable file → Normal file
@ -1 +1,260 @@
|
|||||||
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};r.inherits(u,i),function(){this.$id="ace/mode/abc"}.call(u.prototype),t.Mode=u})
|
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();
|
||||||
|
};
|
||||||
|
oop.inherits(Mode, TextMode);
|
||||||
|
|
||||||
|
(function () {
|
||||||
|
this.$id = "ace/mode/abc"
|
||||||
|
}).call(Mode.prototype);
|
||||||
|
|
||||||
|
exports.Mode = Mode;
|
||||||
|
});
|
||||||
|
267
vendor/assets/javascripts/ace/mode-actionscript.js
vendored
Executable file → Normal file
267
vendor/assets/javascripts/ace/mode-actionscript.js
vendored
Executable file → Normal file
File diff suppressed because one or more lines are too long
88
vendor/assets/javascripts/ace/mode-ada.js
vendored
Executable file → Normal file
88
vendor/assets/javascripts/ace/mode-ada.js
vendored
Executable file → Normal file
@ -1 +1,87 @@
|
|||||||
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};r.inherits(u,i),function(){this.lineCommentStart="--",this.$id="ace/mode/ada"}.call(u.prototype),t.Mode=u})
|
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", // ' 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(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;
|
||||||
|
};
|
||||||
|
oop.inherits(Mode, TextMode);
|
||||||
|
|
||||||
|
(function() {
|
||||||
|
|
||||||
|
this.lineCommentStart = "--";
|
||||||
|
|
||||||
|
this.$id = "ace/mode/ada";
|
||||||
|
}).call(Mode.prototype);
|
||||||
|
|
||||||
|
exports.Mode = Mode;
|
||||||
|
|
||||||
|
});
|
||||||
|
356
vendor/assets/javascripts/ace/mode-apache_conf.js
vendored
Executable file → Normal file
356
vendor/assets/javascripts/ace/mode-apache_conf.js
vendored
Executable file → Normal file
File diff suppressed because one or more lines are too long
272
vendor/assets/javascripts/ace/mode-applescript.js
vendored
Executable file → Normal file
272
vendor/assets/javascripts/ace/mode-applescript.js
vendored
Executable file → Normal file
File diff suppressed because one or more lines are too long
343
vendor/assets/javascripts/ace/mode-asciidoc.js
vendored
Executable file → Normal file
343
vendor/assets/javascripts/ace/mode-asciidoc.js
vendored
Executable file → Normal file
File diff suppressed because one or more lines are too long
186
vendor/assets/javascripts/ace/mode-assembly_x86.js
vendored
Executable file → Normal file
186
vendor/assets/javascripts/ace/mode-assembly_x86.js
vendored
Executable file → Normal file
File diff suppressed because one or more lines are too long
235
vendor/assets/javascripts/ace/mode-autohotkey.js
vendored
Executable file → Normal file
235
vendor/assets/javascripts/ace/mode-autohotkey.js
vendored
Executable file → Normal file
File diff suppressed because one or more lines are too long
223
vendor/assets/javascripts/ace/mode-batchfile.js
vendored
Executable file → Normal file
223
vendor/assets/javascripts/ace/mode-batchfile.js
vendored
Executable file → Normal file
@ -1 +1,222 @@
|
|||||||
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};r.inherits(u,i),function(){this.lineCommentStart="::",this.blockComment="",this.$id="ace/mode/batchfile"}.call(u.prototype),t.Mode=u})
|
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();
|
||||||
|
};
|
||||||
|
oop.inherits(Mode, TextMode);
|
||||||
|
|
||||||
|
(function() {
|
||||||
|
this.lineCommentStart = "::";
|
||||||
|
this.blockComment = "";
|
||||||
|
this.$id = "ace/mode/batchfile";
|
||||||
|
}).call(Mode.prototype);
|
||||||
|
|
||||||
|
exports.Mode = Mode;
|
||||||
|
});
|
||||||
|
276
vendor/assets/javascripts/ace/mode-c9search.js
vendored
Executable file → Normal file
276
vendor/assets/javascripts/ace/mode-c9search.js
vendored
Executable file → Normal file
@ -1 +1,275 @@
|
|||||||
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]+)(:\\s)(.+)",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]}],o=n[1],u=r[3],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}},{token:["string","text"],regex:"(\\S.*)(:$)"},{regex:"Searching for .*$",onMatch:function(e,t,n){var r=e.split("");if(r.length<3)return"text";var s,u,a,f=0,l=[{value:r[f++]+"'",type:"text"},{value:u=r[f++],type:"text"},{value:"'"+r[f++],type:"text"}];r[2]!==" in"&&(a=r[f],l.push({value:"'"+r[f++]+"'",type:"text"},{value:r[f++],type:"text"})),l.push({value:" "+r[f++]+" ",type:"text"}),r[f+1]?(s=r[f+1],l.push({value:"("+r[f+1]+")",type:"text"}),f+=1):f-=1;while(f++<r.length)r[f]&&l.push({value:r[f],type:"text"});a&&(u=a,s=""),u&&(/regex/.test(s)||(u=i.escapeRegExp(u)),/whole/.test(s)&&(u="\\b"+u+"\\b"));var c=u&&o("("+u+")",/ sensitive/.test(s)?"g":"ig");return c&&(n[0]=t,n[1]=c),l}},{regex:"\\d+",token:"constant.numeric"}]}};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})
|
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]+)(:\\s)(.+)",
|
||||||
|
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]
|
||||||
|
}];
|
||||||
|
|
||||||
|
var regex = stack[1];
|
||||||
|
var str = values[3];
|
||||||
|
|
||||||
|
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;
|
||||||
|
}
|
||||||
|
},
|
||||||
|
{
|
||||||
|
token : ["string", "text"], // single line
|
||||||
|
regex : "(\\S.*)(:$)"
|
||||||
|
},
|
||||||
|
{
|
||||||
|
regex : "Searching for .*$",
|
||||||
|
onMatch: function(val, state, stack) {
|
||||||
|
var parts = val.split("\x01");
|
||||||
|
if (parts.length < 3)
|
||||||
|
return "text";
|
||||||
|
|
||||||
|
var options, search, replace;
|
||||||
|
|
||||||
|
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") {
|
||||||
|
replace = parts[i];
|
||||||
|
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 (replace) {
|
||||||
|
search = replace;
|
||||||
|
options = "";
|
||||||
|
}
|
||||||
|
|
||||||
|
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 : "\\d+",
|
||||||
|
token: "constant.numeric"
|
||||||
|
}
|
||||||
|
]
|
||||||
|
};
|
||||||
|
};
|
||||||
|
|
||||||
|
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;
|
||||||
|
|
||||||
|
});
|
||||||
|
854
vendor/assets/javascripts/ace/mode-c_cpp.js
vendored
Executable file → Normal file
854
vendor/assets/javascripts/ace/mode-c_cpp.js
vendored
Executable file → Normal file
File diff suppressed because one or more lines are too long
203
vendor/assets/javascripts/ace/mode-cirru.js
vendored
Executable file → Normal file
203
vendor/assets/javascripts/ace/mode-cirru.js
vendored
Executable file → Normal file
@ -1 +1,202 @@
|
|||||||
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.getFoldWidgetRange=function(e,t,n){var r=this.indentationBlock(e,n);if(r)return r;var i=/\S/,o=e.getLine(n),u=o.search(i);if(u==-1||o[u]!="#")return;var a=o.length,f=e.getLength(),l=n,c=n;while(++n<f){o=e.getLine(n);var h=o.search(i);if(h==-1)continue;if(o[h]!="#")break;c=n}if(c>l){var p=e.getLine(c).length;return new s(l,a,c,p)}},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};r.inherits(u,i),function(){this.lineCommentStart="--",this.$id="ace/mode/cirru"}.call(u.prototype),t.Mode=u})
|
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();
|
||||||
|
};
|
||||||
|
oop.inherits(Mode, TextMode);
|
||||||
|
|
||||||
|
(function() {
|
||||||
|
this.lineCommentStart = "--";
|
||||||
|
this.$id = "ace/mode/cirru";
|
||||||
|
}).call(Mode.prototype);
|
||||||
|
|
||||||
|
exports.Mode = Mode;
|
||||||
|
});
|
||||||
|
307
vendor/assets/javascripts/ace/mode-clojure.js
vendored
Executable file → Normal file
307
vendor/assets/javascripts/ace/mode-clojure.js
vendored
Executable file → Normal file
File diff suppressed because one or more lines are too long
95
vendor/assets/javascripts/ace/mode-cobol.js
vendored
Executable file → Normal file
95
vendor/assets/javascripts/ace/mode-cobol.js
vendored
Executable file → Normal file
@ -1 +1,94 @@
|
|||||||
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","ace/range"],function(e,t,n){"use strict";var r=e("../lib/oop"),i=e("./text").Mode,s=e("./cobol_highlight_rules").CobolHighlightRules,o=e("../range").Range,u=function(){this.HighlightRules=s};r.inherits(u,i),function(){this.lineCommentStart="*",this.$id="ace/mode/cobol"}.call(u.prototype),t.Mode=u})
|
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","ace/range"], function(require, exports, module) {
|
||||||
|
"use strict";
|
||||||
|
|
||||||
|
var oop = require("../lib/oop");
|
||||||
|
var TextMode = require("./text").Mode;
|
||||||
|
var CobolHighlightRules = require("./cobol_highlight_rules").CobolHighlightRules;
|
||||||
|
var Range = require("../range").Range;
|
||||||
|
|
||||||
|
var Mode = function() {
|
||||||
|
this.HighlightRules = CobolHighlightRules;
|
||||||
|
};
|
||||||
|
oop.inherits(Mode, TextMode);
|
||||||
|
|
||||||
|
(function() {
|
||||||
|
|
||||||
|
this.lineCommentStart = "*";
|
||||||
|
|
||||||
|
this.$id = "ace/mode/cobol";
|
||||||
|
}).call(Mode.prototype);
|
||||||
|
|
||||||
|
exports.Mode = Mode;
|
||||||
|
|
||||||
|
});
|
||||||
|
413
vendor/assets/javascripts/ace/mode-coffee.js
vendored
Executable file → Normal file
413
vendor/assets/javascripts/ace/mode-coffee.js
vendored
Executable file → Normal file
File diff suppressed because one or more lines are too long
2486
vendor/assets/javascripts/ace/mode-coldfusion.js
vendored
Executable file → Normal file
2486
vendor/assets/javascripts/ace/mode-coldfusion.js
vendored
Executable file → Normal file
File diff suppressed because one or more lines are too long
848
vendor/assets/javascripts/ace/mode-csharp.js
vendored
Executable file → Normal file
848
vendor/assets/javascripts/ace/mode-csharp.js
vendored
Executable file → Normal file
File diff suppressed because one or more lines are too long
829
vendor/assets/javascripts/ace/mode-css.js
vendored
Executable file → Normal file
829
vendor/assets/javascripts/ace/mode-css.js
vendored
Executable file → Normal file
File diff suppressed because one or more lines are too long
2492
vendor/assets/javascripts/ace/mode-curly.js
vendored
Executable file → Normal file
2492
vendor/assets/javascripts/ace/mode-curly.js
vendored
Executable file → Normal file
File diff suppressed because one or more lines are too long
513
vendor/assets/javascripts/ace/mode-d.js
vendored
Executable file → Normal file
513
vendor/assets/javascripts/ace/mode-d.js
vendored
Executable file → Normal file
File diff suppressed because one or more lines are too long
1058
vendor/assets/javascripts/ace/mode-dart.js
vendored
Executable file → Normal file
1058
vendor/assets/javascripts/ace/mode-dart.js
vendored
Executable file → Normal file
File diff suppressed because one or more lines are too long
140
vendor/assets/javascripts/ace/mode-diff.js
vendored
Executable file → Normal file
140
vendor/assets/javascripts/ace/mode-diff.js
vendored
Executable file → Normal file
@ -1 +1,139 @@
|
|||||||
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 s.fromPoints(i,{row:n-1,column: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","index","\\+{3}","@@|\\*{5}"],"i")};r.inherits(u,i),function(){this.$id="ace/mode/diff"}.call(u.prototype),t.Mode=u})
|
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 Range.fromPoints(start, {row: row - 1, column: 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", "index", "\\+{3}", "@@|\\*{5}"], "i");
|
||||||
|
};
|
||||||
|
oop.inherits(Mode, TextMode);
|
||||||
|
|
||||||
|
(function() {
|
||||||
|
|
||||||
|
this.$id = "ace/mode/diff";
|
||||||
|
}).call(Mode.prototype);
|
||||||
|
|
||||||
|
exports.Mode = Mode;
|
||||||
|
|
||||||
|
});
|
||||||
|
2526
vendor/assets/javascripts/ace/mode-django.js
vendored
Executable file → Normal file
2526
vendor/assets/javascripts/ace/mode-django.js
vendored
Executable file → Normal file
File diff suppressed because one or more lines are too long
804
vendor/assets/javascripts/ace/mode-dockerfile.js
vendored
Executable file → Normal file
804
vendor/assets/javascripts/ace/mode-dockerfile.js
vendored
Executable file → Normal file
File diff suppressed because one or more lines are too long
413
vendor/assets/javascripts/ace/mode-dot.js
vendored
Executable file → Normal file
413
vendor/assets/javascripts/ace/mode-dot.js
vendored
Executable file → Normal file
File diff suppressed because one or more lines are too long
129
vendor/assets/javascripts/ace/mode-eiffel.js
vendored
Executable file → Normal file
129
vendor/assets/javascripts/ace/mode-eiffel.js
vendored
Executable file → Normal file
@ -1 +1,128 @@
|
|||||||
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","ace/range"],function(e,t,n){"use strict";var r=e("../lib/oop"),i=e("./text").Mode,s=e("./eiffel_highlight_rules").EiffelHighlightRules,o=e("../range").Range,u=function(){this.HighlightRules=s};r.inherits(u,i),function(){this.lineCommentStart="--",this.$id="ace/mode/eiffel"}.call(u.prototype),t.Mode=u})
|
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","ace/range"], function(require, exports, module) {
|
||||||
|
"use strict";
|
||||||
|
|
||||||
|
var oop = require("../lib/oop");
|
||||||
|
var TextMode = require("./text").Mode;
|
||||||
|
var EiffelHighlightRules = require("./eiffel_highlight_rules").EiffelHighlightRules;
|
||||||
|
var Range = require("../range").Range;
|
||||||
|
|
||||||
|
var Mode = function() {
|
||||||
|
this.HighlightRules = EiffelHighlightRules;
|
||||||
|
};
|
||||||
|
oop.inherits(Mode, TextMode);
|
||||||
|
|
||||||
|
(function() {
|
||||||
|
this.lineCommentStart = "--";
|
||||||
|
this.$id = "ace/mode/eiffel";
|
||||||
|
}).call(Mode.prototype);
|
||||||
|
|
||||||
|
exports.Mode = Mode;
|
||||||
|
|
||||||
|
});
|
||||||
|
2962
vendor/assets/javascripts/ace/mode-ejs.js
vendored
Executable file → Normal file
2962
vendor/assets/javascripts/ace/mode-ejs.js
vendored
Executable file → Normal file
File diff suppressed because one or more lines are too long
494
vendor/assets/javascripts/ace/mode-elixir.js
vendored
Executable file → Normal file
494
vendor/assets/javascripts/ace/mode-elixir.js
vendored
Executable file → Normal file
File diff suppressed because one or more lines are too long
294
vendor/assets/javascripts/ace/mode-elm.js
vendored
Executable file → Normal file
294
vendor/assets/javascripts/ace/mode-elm.js
vendored
Executable file → Normal file
@ -1 +1,293 @@
|
|||||||
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:"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"}],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};r.inherits(u,i),function(){this.lineCommentStart="--",this.blockComment={start:"{-",end:"-}"},this.$id="ace/mode/elm"}.call(u.prototype),t.Mode=u})
|
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 : "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"
|
||||||
|
}],
|
||||||
|
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();
|
||||||
|
};
|
||||||
|
oop.inherits(Mode, TextMode);
|
||||||
|
|
||||||
|
(function() {
|
||||||
|
this.lineCommentStart = "--";
|
||||||
|
this.blockComment = {start: "{-", end: "-}"};
|
||||||
|
this.$id = "ace/mode/elm";
|
||||||
|
}).call(Mode.prototype);
|
||||||
|
|
||||||
|
exports.Mode = Mode;
|
||||||
|
});
|
||||||
|
1002
vendor/assets/javascripts/ace/mode-erlang.js
vendored
Executable file → Normal file
1002
vendor/assets/javascripts/ace/mode-erlang.js
vendored
Executable file → Normal file
File diff suppressed because one or more lines are too long
290
vendor/assets/javascripts/ace/mode-forth.js
vendored
Executable file → Normal file
290
vendor/assets/javascripts/ace/mode-forth.js
vendored
Executable file → Normal file
File diff suppressed because one or more lines are too long
1023
vendor/assets/javascripts/ace/mode-ftl.js
vendored
Executable file → Normal file
1023
vendor/assets/javascripts/ace/mode-ftl.js
vendored
Executable file → Normal file
File diff suppressed because one or more lines are too long
86
vendor/assets/javascripts/ace/mode-gcode.js
vendored
Executable file → Normal file
86
vendor/assets/javascripts/ace/mode-gcode.js
vendored
Executable file → Normal file
@ -1 +1,85 @@
|
|||||||
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};r.inherits(u,i),function(){this.$id="ace/mode/gcode"}.call(u.prototype),t.Mode=u})
|
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;
|
||||||
|
};
|
||||||
|
oop.inherits(Mode, TextMode);
|
||||||
|
|
||||||
|
(function() {
|
||||||
|
this.$id = "ace/mode/gcode";
|
||||||
|
}).call(Mode.prototype);
|
||||||
|
|
||||||
|
exports.Mode = Mode;
|
||||||
|
|
||||||
|
});
|
||||||
|
148
vendor/assets/javascripts/ace/mode-gherkin.js
vendored
Executable file → Normal file
148
vendor/assets/javascripts/ace/mode-gherkin.js
vendored
Executable file → Normal file
@ -1 +1,147 @@
|
|||||||
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(){this.$rules={start:[{token:"constant.numeric",regex:"(?:(?:[1-9]\\d*)|(?:0))"},{token:"comment",regex:"#.*$"},{token:"keyword",regex:"Feature:|Background:|Scenario:|Scenario Outline:|Examples:|Given|When|Then|And|But|\\*"},{token:"string",regex:'"{3}',next:"qqstring3"},{token:"string",regex:'"',next:"qqstring"},{token:"comment",regex:"@[A-Za-z0-9]+",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:"string",regex:"[A-Za-z0-9 ]*",next:"start"}]}};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};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 console.log(e),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})
|
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() {
|
||||||
|
this.$rules = {
|
||||||
|
start : [{
|
||||||
|
token: 'constant.numeric',
|
||||||
|
regex: "(?:(?:[1-9]\\d*)|(?:0))"
|
||||||
|
}, {
|
||||||
|
token : "comment",
|
||||||
|
regex : "#.*$"
|
||||||
|
}, {
|
||||||
|
token : "keyword",
|
||||||
|
regex : "Feature:|Background:|Scenario:|Scenario\ Outline:|Examples:|Given|When|Then|And|But|\\*",
|
||||||
|
}, {
|
||||||
|
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;
|
||||||
|
};
|
||||||
|
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;
|
||||||
|
|
||||||
|
console.log(state)
|
||||||
|
|
||||||
|
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;
|
||||||
|
});
|
||||||
|
52
vendor/assets/javascripts/ace/mode-gitignore.js
vendored
Executable file → Normal file
52
vendor/assets/javascripts/ace/mode-gitignore.js
vendored
Executable file → Normal file
@ -1 +1,51 @@
|
|||||||
define("ace/mode/gitignore_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:/^\s*#.*$/},{token:"keyword",regex:/^\s*!.*$/}]},this.normalizeRules()};s.metaData={fileTypes:["gitignore"],name:"Gitignore"},r.inherits(s,i),t.GitignoreHighlightRules=s}),define("ace/mode/gitignore",["require","exports","module","ace/lib/oop","ace/mode/text","ace/mode/gitignore_highlight_rules"],function(e,t,n){"use strict";var r=e("../lib/oop"),i=e("./text").Mode,s=e("./gitignore_highlight_rules").GitignoreHighlightRules,o=function(){this.HighlightRules=s};r.inherits(o,i),function(){this.lineCommentStart="#",this.$id="ace/mode/gitignore"}.call(o.prototype),t.Mode=o})
|
define("ace/mode/gitignore_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 GitignoreHighlightRules = function() {
|
||||||
|
this.$rules = {
|
||||||
|
"start" : [
|
||||||
|
{
|
||||||
|
token : "comment",
|
||||||
|
regex : /^\s*#.*$/
|
||||||
|
}, {
|
||||||
|
token : "keyword", // negated patterns
|
||||||
|
regex : /^\s*!.*$/
|
||||||
|
}
|
||||||
|
]
|
||||||
|
};
|
||||||
|
|
||||||
|
this.normalizeRules();
|
||||||
|
};
|
||||||
|
|
||||||
|
GitignoreHighlightRules.metaData = {
|
||||||
|
fileTypes: ['gitignore'],
|
||||||
|
name: 'Gitignore'
|
||||||
|
};
|
||||||
|
|
||||||
|
oop.inherits(GitignoreHighlightRules, TextHighlightRules);
|
||||||
|
|
||||||
|
exports.GitignoreHighlightRules = GitignoreHighlightRules;
|
||||||
|
});
|
||||||
|
|
||||||
|
define("ace/mode/gitignore",["require","exports","module","ace/lib/oop","ace/mode/text","ace/mode/gitignore_highlight_rules"], function(require, exports, module) {
|
||||||
|
"use strict";
|
||||||
|
|
||||||
|
var oop = require("../lib/oop");
|
||||||
|
var TextMode = require("./text").Mode;
|
||||||
|
var GitignoreHighlightRules = require("./gitignore_highlight_rules").GitignoreHighlightRules;
|
||||||
|
|
||||||
|
var Mode = function() {
|
||||||
|
this.HighlightRules = GitignoreHighlightRules;
|
||||||
|
};
|
||||||
|
oop.inherits(Mode, TextMode);
|
||||||
|
|
||||||
|
(function() {
|
||||||
|
this.lineCommentStart = "#";
|
||||||
|
this.$id = "ace/mode/gitignore";
|
||||||
|
}).call(Mode.prototype);
|
||||||
|
|
||||||
|
exports.Mode = Mode;
|
||||||
|
});
|
||||||
|
931
vendor/assets/javascripts/ace/mode-glsl.js
vendored
Executable file → Normal file
931
vendor/assets/javascripts/ace/mode-glsl.js
vendored
Executable file → Normal file
File diff suppressed because one or more lines are too long
752
vendor/assets/javascripts/ace/mode-golang.js
vendored
Executable file → Normal file
752
vendor/assets/javascripts/ace/mode-golang.js
vendored
Executable file → Normal file
File diff suppressed because one or more lines are too long
1218
vendor/assets/javascripts/ace/mode-groovy.js
vendored
Executable file → Normal file
1218
vendor/assets/javascripts/ace/mode-groovy.js
vendored
Executable file → Normal file
File diff suppressed because one or more lines are too long
529
vendor/assets/javascripts/ace/mode-haml.js
vendored
Executable file → Normal file
529
vendor/assets/javascripts/ace/mode-haml.js
vendored
Executable file → Normal file
File diff suppressed because one or more lines are too long
2551
vendor/assets/javascripts/ace/mode-handlebars.js
vendored
Executable file → Normal file
2551
vendor/assets/javascripts/ace/mode-handlebars.js
vendored
Executable file → Normal file
File diff suppressed because one or more lines are too long
372
vendor/assets/javascripts/ace/mode-haskell.js
vendored
Executable file → Normal file
372
vendor/assets/javascripts/ace/mode-haskell.js
vendored
Executable file → Normal file
File diff suppressed because one or more lines are too long
738
vendor/assets/javascripts/ace/mode-haxe.js
vendored
Executable file → Normal file
738
vendor/assets/javascripts/ace/mode-haxe.js
vendored
Executable file → Normal file
File diff suppressed because one or more lines are too long
2436
vendor/assets/javascripts/ace/mode-html.js
vendored
Executable file → Normal file
2436
vendor/assets/javascripts/ace/mode-html.js
vendored
Executable file → Normal file
File diff suppressed because one or more lines are too long
2967
vendor/assets/javascripts/ace/mode-html_ruby.js
vendored
Executable file → Normal file
2967
vendor/assets/javascripts/ace/mode-html_ruby.js
vendored
Executable file → Normal file
File diff suppressed because one or more lines are too long
155
vendor/assets/javascripts/ace/mode-ini.js
vendored
Executable file → Normal file
155
vendor/assets/javascripts/ace/mode-ini.js
vendored
Executable file → Normal file
@ -1 +1,154 @@
|
|||||||
define("ace/mode/ini_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="\\\\(?:[\\\\0abtrn;#=:]|x[a-fA-F\\d]{4})",o=function(){this.$rules={start:[{token:"punctuation.definition.comment.ini",regex:"#.*",push_:[{token:"comment.line.number-sign.ini",regex:"$|^",next:"pop"},{defaultToken:"comment.line.number-sign.ini"}]},{token:"punctuation.definition.comment.ini",regex:";.*",push_:[{token:"comment.line.semicolon.ini",regex:"$|^",next:"pop"},{defaultToken:"comment.line.semicolon.ini"}]},{token:["keyword.other.definition.ini","text","punctuation.separator.key-value.ini"],regex:"\\b([a-zA-Z0-9_.-]+)\\b(\\s*)(=)"},{token:["punctuation.definition.entity.ini","constant.section.group-title.ini","punctuation.definition.entity.ini"],regex:"^(\\[)(.*?)(\\])"},{token:"punctuation.definition.string.begin.ini",regex:"'",push:[{token:"punctuation.definition.string.end.ini",regex:"'",next:"pop"},{token:"constant.language.escape",regex:s},{defaultToken:"string.quoted.single.ini"}]},{token:"punctuation.definition.string.begin.ini",regex:'"',push:[{token:"constant.language.escape",regex:s},{token:"punctuation.definition.string.end.ini",regex:'"',next:"pop"},{defaultToken:"string.quoted.double.ini"}]}]},this.normalizeRules()};o.metaData={fileTypes:["ini","conf"],keyEquivalent:"^~I",name:"Ini",scopeName:"source.ini"},r.inherits(o,i),t.IniHighlightRules=o}),define("ace/mode/folding/ini",["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*\[([^\])]*)]\s*(?:$|[;#])/,this.getFoldWidgetRange=function(e,t,n){var r=this.foldingStartMarker,s=e.getLine(n),o=s.match(r);if(!o)return;var u=o[1]+".",a=s.length,f=e.getLength(),l=n,c=n;while(++n<f){s=e.getLine(n);if(/^\s*$/.test(s))continue;o=s.match(r);if(o&&o[1].lastIndexOf(u,0)!==0)break;c=n}if(c>l){var h=e.getLine(c).length;return new i(l,a,c,h)}}}.call(o.prototype)}),define("ace/mode/ini",["require","exports","module","ace/lib/oop","ace/mode/text","ace/mode/ini_highlight_rules","ace/mode/folding/ini"],function(e,t,n){"use strict";var r=e("../lib/oop"),i=e("./text").Mode,s=e("./ini_highlight_rules").IniHighlightRules,o=e("./folding/ini").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/ini"}.call(u.prototype),t.Mode=u})
|
define("ace/mode/ini_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 escapeRe = "\\\\(?:[\\\\0abtrn;#=:]|x[a-fA-F\\d]{4})";
|
||||||
|
|
||||||
|
var IniHighlightRules = function() {
|
||||||
|
this.$rules = {
|
||||||
|
start: [{
|
||||||
|
token: 'punctuation.definition.comment.ini',
|
||||||
|
regex: '#.*',
|
||||||
|
push_: [{
|
||||||
|
token: 'comment.line.number-sign.ini',
|
||||||
|
regex: '$|^',
|
||||||
|
next: 'pop'
|
||||||
|
}, {
|
||||||
|
defaultToken: 'comment.line.number-sign.ini'
|
||||||
|
}]
|
||||||
|
}, {
|
||||||
|
token: 'punctuation.definition.comment.ini',
|
||||||
|
regex: ';.*',
|
||||||
|
push_: [{
|
||||||
|
token: 'comment.line.semicolon.ini',
|
||||||
|
regex: '$|^',
|
||||||
|
next: 'pop'
|
||||||
|
}, {
|
||||||
|
defaultToken: 'comment.line.semicolon.ini'
|
||||||
|
}]
|
||||||
|
}, {
|
||||||
|
token: ['keyword.other.definition.ini', 'text', 'punctuation.separator.key-value.ini'],
|
||||||
|
regex: '\\b([a-zA-Z0-9_.-]+)\\b(\\s*)(=)'
|
||||||
|
}, {
|
||||||
|
token: ['punctuation.definition.entity.ini', 'constant.section.group-title.ini', 'punctuation.definition.entity.ini'],
|
||||||
|
regex: '^(\\[)(.*?)(\\])'
|
||||||
|
}, {
|
||||||
|
token: 'punctuation.definition.string.begin.ini',
|
||||||
|
regex: "'",
|
||||||
|
push: [{
|
||||||
|
token: 'punctuation.definition.string.end.ini',
|
||||||
|
regex: "'",
|
||||||
|
next: 'pop'
|
||||||
|
}, {
|
||||||
|
token: "constant.language.escape",
|
||||||
|
regex: escapeRe
|
||||||
|
}, {
|
||||||
|
defaultToken: 'string.quoted.single.ini'
|
||||||
|
}]
|
||||||
|
}, {
|
||||||
|
token: 'punctuation.definition.string.begin.ini',
|
||||||
|
regex: '"',
|
||||||
|
push: [{
|
||||||
|
token: "constant.language.escape",
|
||||||
|
regex: escapeRe
|
||||||
|
}, {
|
||||||
|
token: 'punctuation.definition.string.end.ini',
|
||||||
|
regex: '"',
|
||||||
|
next: 'pop'
|
||||||
|
}, {
|
||||||
|
defaultToken: 'string.quoted.double.ini'
|
||||||
|
}]
|
||||||
|
}]
|
||||||
|
};
|
||||||
|
|
||||||
|
this.normalizeRules();
|
||||||
|
};
|
||||||
|
|
||||||
|
IniHighlightRules.metaData = {
|
||||||
|
fileTypes: ['ini', 'conf'],
|
||||||
|
keyEquivalent: '^~I',
|
||||||
|
name: 'Ini',
|
||||||
|
scopeName: 'source.ini'
|
||||||
|
};
|
||||||
|
|
||||||
|
|
||||||
|
oop.inherits(IniHighlightRules, TextHighlightRules);
|
||||||
|
|
||||||
|
exports.IniHighlightRules = IniHighlightRules;
|
||||||
|
});
|
||||||
|
|
||||||
|
define("ace/mode/folding/ini",["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*\[([^\])]*)]\s*(?:$|[;#])/;
|
||||||
|
|
||||||
|
this.getFoldWidgetRange = function(session, foldStyle, row) {
|
||||||
|
var re = this.foldingStartMarker;
|
||||||
|
var line = session.getLine(row);
|
||||||
|
|
||||||
|
var m = line.match(re);
|
||||||
|
|
||||||
|
if (!m) return;
|
||||||
|
|
||||||
|
var startName = m[1] + ".";
|
||||||
|
|
||||||
|
var startColumn = line.length;
|
||||||
|
var maxRow = session.getLength();
|
||||||
|
var startRow = row;
|
||||||
|
var endRow = row;
|
||||||
|
|
||||||
|
while (++row < maxRow) {
|
||||||
|
line = session.getLine(row);
|
||||||
|
if (/^\s*$/.test(line))
|
||||||
|
continue;
|
||||||
|
m = line.match(re);
|
||||||
|
if (m && m[1].lastIndexOf(startName, 0) !== 0)
|
||||||
|
break;
|
||||||
|
|
||||||
|
endRow = row;
|
||||||
|
}
|
||||||
|
|
||||||
|
if (endRow > startRow) {
|
||||||
|
var endColumn = session.getLine(endRow).length;
|
||||||
|
return new Range(startRow, startColumn, endRow, endColumn);
|
||||||
|
}
|
||||||
|
};
|
||||||
|
|
||||||
|
}).call(FoldMode.prototype);
|
||||||
|
|
||||||
|
});
|
||||||
|
|
||||||
|
define("ace/mode/ini",["require","exports","module","ace/lib/oop","ace/mode/text","ace/mode/ini_highlight_rules","ace/mode/folding/ini"], function(require, exports, module) {
|
||||||
|
"use strict";
|
||||||
|
|
||||||
|
var oop = require("../lib/oop");
|
||||||
|
var TextMode = require("./text").Mode;
|
||||||
|
var IniHighlightRules = require("./ini_highlight_rules").IniHighlightRules;
|
||||||
|
var FoldMode = require("./folding/ini").FoldMode;
|
||||||
|
|
||||||
|
var Mode = function() {
|
||||||
|
this.HighlightRules = IniHighlightRules;
|
||||||
|
this.foldingRules = new FoldMode();
|
||||||
|
};
|
||||||
|
oop.inherits(Mode, TextMode);
|
||||||
|
|
||||||
|
(function() {
|
||||||
|
this.lineCommentStart = ";";
|
||||||
|
this.blockComment = {start: "/*", end: "*/"};
|
||||||
|
this.$id = "ace/mode/ini";
|
||||||
|
}).call(Mode.prototype);
|
||||||
|
|
||||||
|
exports.Mode = Mode;
|
||||||
|
});
|
||||||
|
247
vendor/assets/javascripts/ace/mode-io.js
vendored
Executable file → Normal file
247
vendor/assets/javascripts/ace/mode-io.js
vendored
Executable file → Normal file
File diff suppressed because one or more lines are too long
697
vendor/assets/javascripts/ace/mode-jack.js
vendored
Executable file → Normal file
697
vendor/assets/javascripts/ace/mode-jack.js
vendored
Executable file → Normal file
File diff suppressed because one or more lines are too long
2042
vendor/assets/javascripts/ace/mode-jade.js
vendored
Executable file → Normal file
2042
vendor/assets/javascripts/ace/mode-jade.js
vendored
Executable file → Normal file
File diff suppressed because one or more lines are too long
1173
vendor/assets/javascripts/ace/mode-java.js
vendored
Executable file → Normal file
1173
vendor/assets/javascripts/ace/mode-java.js
vendored
Executable file → Normal file
File diff suppressed because one or more lines are too long
1026
vendor/assets/javascripts/ace/mode-javascript.js
vendored
Executable file → Normal file
1026
vendor/assets/javascripts/ace/mode-javascript.js
vendored
Executable file → Normal file
File diff suppressed because one or more lines are too long
669
vendor/assets/javascripts/ace/mode-json.js
vendored
Executable file → Normal file
669
vendor/assets/javascripts/ace/mode-json.js
vendored
Executable file → Normal file
File diff suppressed because one or more lines are too long
2957
vendor/assets/javascripts/ace/mode-jsoniq.js
vendored
Executable file → Normal file
2957
vendor/assets/javascripts/ace/mode-jsoniq.js
vendored
Executable file → Normal file
File diff suppressed because one or more lines are too long
1587
vendor/assets/javascripts/ace/mode-jsp.js
vendored
Executable file → Normal file
1587
vendor/assets/javascripts/ace/mode-jsp.js
vendored
Executable file → Normal file
File diff suppressed because one or more lines are too long
763
vendor/assets/javascripts/ace/mode-jsx.js
vendored
Executable file → Normal file
763
vendor/assets/javascripts/ace/mode-jsx.js
vendored
Executable file → Normal file
File diff suppressed because one or more lines are too long
296
vendor/assets/javascripts/ace/mode-julia.js
vendored
Executable file → Normal file
296
vendor/assets/javascripts/ace/mode-julia.js
vendored
Executable file → Normal file
File diff suppressed because one or more lines are too long
224
vendor/assets/javascripts/ace/mode-latex.js
vendored
Executable file → Normal file
224
vendor/assets/javascripts/ace/mode-latex.js
vendored
Executable file → Normal file
@ -1 +1,223 @@
|
|||||||
define("ace/mode/latex_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:"%.*$"},{token:["keyword","lparen","variable.parameter","rparen","lparen","storage.type","rparen"],regex:"(\\\\(?:documentclass|usepackage|input))(?:(\\[)([^\\]]*)(\\]))?({)([^}]*)(})"},{token:["keyword","lparen","variable.parameter","rparen"],regex:"(\\\\(?:label|v?ref|cite(?:[^{]*)))(?:({)([^}]*)(}))?"},{token:["storage.type","lparen","variable.parameter","rparen"],regex:"(\\\\(?:begin|end))({)(\\w*)(})"},{token:"storage.type",regex:"\\\\[a-zA-Z]+"},{token:"lparen",regex:"[[({]"},{token:"rparen",regex:"[\\])}]"},{token:"constant.character.escape",regex:"\\\\[^a-zA-Z]?"},{token:"string",regex:"\\${1,2}",next:"equation"}],equation:[{token:"comment",regex:"%.*$"},{token:"string",regex:"\\${1,2}",next:"start"},{token:"constant.character.escape",regex:"\\\\(?:[^a-zA-Z]|[a-zA-Z]+)"},{token:"error",regex:"^\\s*$",next:"start"},{defaultToken:"string"}]}};r.inherits(s,i),t.LatexHighlightRules=s}),define("ace/mode/folding/latex",["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.foldingStartMarker=/^\s*\\(begin)|(section|subsection|paragraph)\b|{\s*$/,this.foldingStopMarker=/^\s*\\(end)\b|^\s*}/,this.getFoldWidgetRange=function(e,t,n){var r=e.doc.getLine(n),i=this.foldingStartMarker.exec(r);if(i)return i[1]?this.latexBlock(e,n,i[0].length-1):i[2]?this.latexSection(e,n,i[0].length-1):this.openingBracketBlock(e,"{",n,i.index);var i=this.foldingStopMarker.exec(r);if(i)return i[1]?this.latexBlock(e,n,i[0].length-1):this.closingBracketBlock(e,"}",n,i.index+i[0].length)},this.latexBlock=function(e,t,n){var r={"\\begin":1,"\\end":-1},i=new o(e,t,n),u=i.getCurrentToken();if(!u||u.type!="storage.type"&&u.type!="constant.character.escape")return;var a=u.value,f=r[a],l=function(){var e=i.stepForward(),t=e.type=="lparen"?i.stepForward().value:"";return f===-1&&(i.stepBackward(),t&&i.stepBackward()),t},c=[l()],h=f===-1?i.getCurrentTokenColumn():e.getLine(t).length,p=t;i.step=f===-1?i.stepBackward:i.stepForward;while(u=i.step()){if(!u||u.type!="storage.type"&&u.type!="constant.character.escape")continue;var d=r[u.value];if(!d)continue;var v=l();if(d===f)c.unshift(v);else if(c.shift()!==v||!c.length)break}if(c.length)return;var t=i.getCurrentTokenRow();return f===-1?new s(t,e.getLine(t).length,p,h):(i.stepBackward(),new s(p,h,t,i.getCurrentTokenColumn()))},this.latexSection=function(e,t,n){var r=["\\subsection","\\section","\\begin","\\end","\\paragraph"],i=new o(e,t,n),u=i.getCurrentToken();if(!u||u.type!="storage.type")return;var a=r.indexOf(u.value),f=0,l=t;while(u=i.stepForward()){if(u.type!=="storage.type")continue;var c=r.indexOf(u.value);if(c>=2){f||(l=i.getCurrentTokenRow()-1),f+=c==2?1:-1;if(f<0)break}else if(c>=a)break}f||(l=i.getCurrentTokenRow()-1);while(l>t&&!/\S/.test(e.getLine(l)))l--;return new s(t,e.getLine(t).length,l,e.getLine(l).length)}}.call(u.prototype)}),define("ace/mode/latex",["require","exports","module","ace/lib/oop","ace/mode/text","ace/mode/latex_highlight_rules","ace/mode/folding/latex","ace/range"],function(e,t,n){"use strict";var r=e("../lib/oop"),i=e("./text").Mode,s=e("./latex_highlight_rules").LatexHighlightRules,o=e("./folding/latex").FoldMode,u=e("../range").Range,a=function(){this.HighlightRules=s,this.foldingRules=new o};r.inherits(a,i),function(){this.type="text",this.lineCommentStart="%",this.$id="ace/mode/latex"}.call(a.prototype),t.Mode=a})
|
define("ace/mode/latex_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 LatexHighlightRules = function() {
|
||||||
|
|
||||||
|
this.$rules = {
|
||||||
|
"start" : [{
|
||||||
|
token : "comment",
|
||||||
|
regex : "%.*$"
|
||||||
|
}, {
|
||||||
|
token : ["keyword", "lparen", "variable.parameter", "rparen", "lparen", "storage.type", "rparen"],
|
||||||
|
regex : "(\\\\(?:documentclass|usepackage|input))(?:(\\[)([^\\]]*)(\\]))?({)([^}]*)(})"
|
||||||
|
}, {
|
||||||
|
token : ["keyword","lparen", "variable.parameter", "rparen"],
|
||||||
|
regex : "(\\\\(?:label|v?ref|cite(?:[^{]*)))(?:({)([^}]*)(}))?"
|
||||||
|
}, {
|
||||||
|
token : ["storage.type", "lparen", "variable.parameter", "rparen"],
|
||||||
|
regex : "(\\\\(?:begin|end))({)(\\w*)(})"
|
||||||
|
}, {
|
||||||
|
token : "storage.type",
|
||||||
|
regex : "\\\\[a-zA-Z]+"
|
||||||
|
}, {
|
||||||
|
token : "lparen",
|
||||||
|
regex : "[[({]"
|
||||||
|
}, {
|
||||||
|
token : "rparen",
|
||||||
|
regex : "[\\])}]"
|
||||||
|
}, {
|
||||||
|
token : "constant.character.escape",
|
||||||
|
regex : "\\\\[^a-zA-Z]?"
|
||||||
|
}, {
|
||||||
|
token : "string",
|
||||||
|
regex : "\\${1,2}",
|
||||||
|
next : "equation"
|
||||||
|
}],
|
||||||
|
"equation" : [{
|
||||||
|
token : "comment",
|
||||||
|
regex : "%.*$"
|
||||||
|
}, {
|
||||||
|
token : "string",
|
||||||
|
regex : "\\${1,2}",
|
||||||
|
next : "start"
|
||||||
|
}, {
|
||||||
|
token : "constant.character.escape",
|
||||||
|
regex : "\\\\(?:[^a-zA-Z]|[a-zA-Z]+)"
|
||||||
|
}, {
|
||||||
|
token : "error",
|
||||||
|
regex : "^\\s*$",
|
||||||
|
next : "start"
|
||||||
|
}, {
|
||||||
|
defaultToken : "string"
|
||||||
|
}]
|
||||||
|
|
||||||
|
};
|
||||||
|
};
|
||||||
|
oop.inherits(LatexHighlightRules, TextHighlightRules);
|
||||||
|
|
||||||
|
exports.LatexHighlightRules = LatexHighlightRules;
|
||||||
|
|
||||||
|
});
|
||||||
|
|
||||||
|
define("ace/mode/folding/latex",["require","exports","module","ace/lib/oop","ace/mode/folding/fold_mode","ace/range","ace/token_iterator"], function(require, exports, module) {
|
||||||
|
"use strict";
|
||||||
|
|
||||||
|
var oop = require("../../lib/oop");
|
||||||
|
var BaseFoldMode = require("./fold_mode").FoldMode;
|
||||||
|
var Range = require("../../range").Range;
|
||||||
|
var TokenIterator = require("../../token_iterator").TokenIterator;
|
||||||
|
|
||||||
|
var FoldMode = exports.FoldMode = function() {};
|
||||||
|
|
||||||
|
oop.inherits(FoldMode, BaseFoldMode);
|
||||||
|
|
||||||
|
(function() {
|
||||||
|
|
||||||
|
this.foldingStartMarker = /^\s*\\(begin)|(section|subsection|paragraph)\b|{\s*$/;
|
||||||
|
this.foldingStopMarker = /^\s*\\(end)\b|^\s*}/;
|
||||||
|
|
||||||
|
this.getFoldWidgetRange = function(session, foldStyle, row) {
|
||||||
|
var line = session.doc.getLine(row);
|
||||||
|
var match = this.foldingStartMarker.exec(line);
|
||||||
|
if (match) {
|
||||||
|
if (match[1])
|
||||||
|
return this.latexBlock(session, row, match[0].length - 1);
|
||||||
|
if (match[2])
|
||||||
|
return this.latexSection(session, row, match[0].length - 1);
|
||||||
|
|
||||||
|
return this.openingBracketBlock(session, "{", row, match.index);
|
||||||
|
}
|
||||||
|
|
||||||
|
var match = this.foldingStopMarker.exec(line);
|
||||||
|
if (match) {
|
||||||
|
if (match[1])
|
||||||
|
return this.latexBlock(session, row, match[0].length - 1);
|
||||||
|
|
||||||
|
return this.closingBracketBlock(session, "}", row, match.index + match[0].length);
|
||||||
|
}
|
||||||
|
};
|
||||||
|
|
||||||
|
this.latexBlock = function(session, row, column) {
|
||||||
|
var keywords = {
|
||||||
|
"\\begin": 1,
|
||||||
|
"\\end": -1
|
||||||
|
};
|
||||||
|
|
||||||
|
var stream = new TokenIterator(session, row, column);
|
||||||
|
var token = stream.getCurrentToken();
|
||||||
|
if (!token || !(token.type == "storage.type" || token.type == "constant.character.escape"))
|
||||||
|
return;
|
||||||
|
|
||||||
|
var val = token.value;
|
||||||
|
var dir = keywords[val];
|
||||||
|
|
||||||
|
var getType = function() {
|
||||||
|
var token = stream.stepForward();
|
||||||
|
var type = token.type == "lparen" ?stream.stepForward().value : "";
|
||||||
|
if (dir === -1) {
|
||||||
|
stream.stepBackward();
|
||||||
|
if (type)
|
||||||
|
stream.stepBackward();
|
||||||
|
}
|
||||||
|
return type;
|
||||||
|
};
|
||||||
|
var stack = [getType()];
|
||||||
|
var startColumn = dir === -1 ? stream.getCurrentTokenColumn() : session.getLine(row).length;
|
||||||
|
var startRow = row;
|
||||||
|
|
||||||
|
stream.step = dir === -1 ? stream.stepBackward : stream.stepForward;
|
||||||
|
while(token = stream.step()) {
|
||||||
|
if (!token || !(token.type == "storage.type" || token.type == "constant.character.escape"))
|
||||||
|
continue;
|
||||||
|
var level = keywords[token.value];
|
||||||
|
if (!level)
|
||||||
|
continue;
|
||||||
|
var type = getType();
|
||||||
|
if (level === dir)
|
||||||
|
stack.unshift(type);
|
||||||
|
else if (stack.shift() !== type || !stack.length)
|
||||||
|
break;
|
||||||
|
}
|
||||||
|
|
||||||
|
if (stack.length)
|
||||||
|
return;
|
||||||
|
|
||||||
|
var row = stream.getCurrentTokenRow();
|
||||||
|
if (dir === -1)
|
||||||
|
return new Range(row, session.getLine(row).length, startRow, startColumn);
|
||||||
|
stream.stepBackward();
|
||||||
|
return new Range(startRow, startColumn, row, stream.getCurrentTokenColumn());
|
||||||
|
};
|
||||||
|
|
||||||
|
this.latexSection = function(session, row, column) {
|
||||||
|
var keywords = ["\\subsection", "\\section", "\\begin", "\\end", "\\paragraph"];
|
||||||
|
|
||||||
|
var stream = new TokenIterator(session, row, column);
|
||||||
|
var token = stream.getCurrentToken();
|
||||||
|
if (!token || token.type != "storage.type")
|
||||||
|
return;
|
||||||
|
|
||||||
|
var startLevel = keywords.indexOf(token.value);
|
||||||
|
var stackDepth = 0
|
||||||
|
var endRow = row;
|
||||||
|
|
||||||
|
while(token = stream.stepForward()) {
|
||||||
|
if (token.type !== "storage.type")
|
||||||
|
continue;
|
||||||
|
var level = keywords.indexOf(token.value);
|
||||||
|
|
||||||
|
if (level >= 2) {
|
||||||
|
if (!stackDepth)
|
||||||
|
endRow = stream.getCurrentTokenRow() - 1;
|
||||||
|
stackDepth += level == 2 ? 1 : - 1;
|
||||||
|
if (stackDepth < 0)
|
||||||
|
break
|
||||||
|
} else if (level >= startLevel)
|
||||||
|
break;
|
||||||
|
}
|
||||||
|
|
||||||
|
if (!stackDepth)
|
||||||
|
endRow = stream.getCurrentTokenRow() - 1;
|
||||||
|
|
||||||
|
while (endRow > row && !/\S/.test(session.getLine(endRow)))
|
||||||
|
endRow--;
|
||||||
|
|
||||||
|
return new Range(
|
||||||
|
row, session.getLine(row).length,
|
||||||
|
endRow, session.getLine(endRow).length
|
||||||
|
);
|
||||||
|
};
|
||||||
|
|
||||||
|
}).call(FoldMode.prototype);
|
||||||
|
|
||||||
|
});
|
||||||
|
|
||||||
|
define("ace/mode/latex",["require","exports","module","ace/lib/oop","ace/mode/text","ace/mode/latex_highlight_rules","ace/mode/folding/latex","ace/range"], function(require, exports, module) {
|
||||||
|
"use strict";
|
||||||
|
|
||||||
|
var oop = require("../lib/oop");
|
||||||
|
var TextMode = require("./text").Mode;
|
||||||
|
var LatexHighlightRules = require("./latex_highlight_rules").LatexHighlightRules;
|
||||||
|
var LatexFoldMode = require("./folding/latex").FoldMode;
|
||||||
|
var Range = require("../range").Range;
|
||||||
|
|
||||||
|
var Mode = function() {
|
||||||
|
this.HighlightRules = LatexHighlightRules;
|
||||||
|
this.foldingRules = new LatexFoldMode();
|
||||||
|
};
|
||||||
|
oop.inherits(Mode, TextMode);
|
||||||
|
|
||||||
|
(function() {
|
||||||
|
this.type = "text";
|
||||||
|
|
||||||
|
this.lineCommentStart = "%";
|
||||||
|
|
||||||
|
this.$id = "ace/mode/latex";
|
||||||
|
}).call(Mode.prototype);
|
||||||
|
|
||||||
|
exports.Mode = Mode;
|
||||||
|
|
||||||
|
});
|
||||||
|
281
vendor/assets/javascripts/ace/mode-lean.js
vendored
Normal file
281
vendor/assets/javascripts/ace/mode-lean.js
vendored
Normal file
@ -0,0 +1,281 @@
|
|||||||
|
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/lean_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 leanHighlightRules = function() {
|
||||||
|
|
||||||
|
var keywordControls = (
|
||||||
|
[ "add_rewrite", "alias", "as", "assume", "attribute",
|
||||||
|
"begin", "by", "calc", "calc_refl", "calc_subst", "calc_trans", "check",
|
||||||
|
"classes", "coercions", "conjecture", "constants", "context",
|
||||||
|
"corollary", "else", "end", "environment", "eval", "example",
|
||||||
|
"exists", "exit", "export", "exposing", "extends", "fields", "find_decl",
|
||||||
|
"forall", "from", "fun", "have", "help", "hiding", "if",
|
||||||
|
"import", "in", "infix", "infixl", "infixr", "instances",
|
||||||
|
"let", "local", "match", "namespace", "notation", "obtain", "obtains",
|
||||||
|
"omit", "opaque", "open", "options", "parameter", "parameters", "postfix",
|
||||||
|
"precedence", "prefix", "premise", "premises", "print", "private", "proof",
|
||||||
|
"protected", "qed", "raw", "renaming", "section", "set_option",
|
||||||
|
"show", "tactic_hint", "take", "then", "universe",
|
||||||
|
"universes", "using", "variable", "variables", "with"].join("|")
|
||||||
|
);
|
||||||
|
|
||||||
|
var nameProviders = (
|
||||||
|
["inductive", "structure", "record", "theorem", "axiom",
|
||||||
|
"axioms", "lemma", "hypothesis", "definition", "constant"].join("|")
|
||||||
|
);
|
||||||
|
|
||||||
|
var storageType = (
|
||||||
|
["Prop", "Type", "Type'", "Type₊", "Type₁", "Type₂", "Type₃"].join("|")
|
||||||
|
);
|
||||||
|
|
||||||
|
var storageModifiers = (
|
||||||
|
"\\[(" +
|
||||||
|
["abbreviations", "all-transparent", "begin-end-hints", "class", "classes", "coercion",
|
||||||
|
"coercions", "declarations", "decls", "instance", "irreducible",
|
||||||
|
"multiple-instances", "notation", "notations", "parsing-only", "persistent",
|
||||||
|
"reduce-hints", "reducible", "tactic-hints", "visible", "wf", "whnf"
|
||||||
|
].join("|") +
|
||||||
|
")\\]"
|
||||||
|
);
|
||||||
|
|
||||||
|
var keywordOperators = (
|
||||||
|
[].join("|")
|
||||||
|
);
|
||||||
|
|
||||||
|
var keywordMapper = this.$keywords = this.createKeywordMapper({
|
||||||
|
"keyword.control" : keywordControls,
|
||||||
|
"storage.type" : storageType,
|
||||||
|
"keyword.operator" : keywordOperators,
|
||||||
|
"variable.language": "sorry",
|
||||||
|
}, "identifier");
|
||||||
|
|
||||||
|
var identifierRe = "[A-Za-z_\u03b1-\u03ba\u03bc-\u03fb\u1f00-\u1ffe\u2100-\u214f][A-Za-z0-9_'\u03b1-\u03ba\u03bc-\u03fb\u1f00-\u1ffe\u2070-\u2079\u207f-\u2089\u2090-\u209c\u2100-\u214f]*";
|
||||||
|
var operatorRe = new RegExp(["#", "@", "->", "∼", "↔", "/", "==", "=", ":=", "<->",
|
||||||
|
"/\\", "\\/", "∧", "∨", "≠", "<", ">", "≤", "≥", "¬",
|
||||||
|
"<=", ">=", "⁻¹", "⬝", "▸", "\\+", "\\*", "-", "/",
|
||||||
|
"λ", "→", "∃", "∀", ":="].join("|"));
|
||||||
|
|
||||||
|
this.$rules = {
|
||||||
|
"start" : [
|
||||||
|
{
|
||||||
|
token : "comment", // single line comment "--"
|
||||||
|
regex : "--.*$"
|
||||||
|
},
|
||||||
|
DocCommentHighlightRules.getStartRule("doc-start"),
|
||||||
|
{
|
||||||
|
token : "comment", // multi line comment "/-"
|
||||||
|
regex : "\\/-",
|
||||||
|
next : "comment"
|
||||||
|
}, {
|
||||||
|
stateName: "qqstring",
|
||||||
|
token : "string.start", regex : '"', next : [
|
||||||
|
{token : "string.end", regex : '"', next : "start"},
|
||||||
|
{token : "constant.language.escape", regex : /\\[n"\\]/},
|
||||||
|
{defaultToken: "string"}
|
||||||
|
]
|
||||||
|
}, {
|
||||||
|
token : "keyword.control", regex : nameProviders, next : [
|
||||||
|
{token : "variable.language", regex : identifierRe, next : "start"} ]
|
||||||
|
}, {
|
||||||
|
token : "constant.numeric", // hex
|
||||||
|
regex : "0[xX][0-9a-fA-F]+(L|l|UL|ul|u|U|F|f|ll|LL|ull|ULL)?\\b"
|
||||||
|
}, {
|
||||||
|
token : "constant.numeric", // float
|
||||||
|
regex : "[+-]?\\d+(?:(?:\\.\\d*)?(?:[eE][+-]?\\d+)?)?(L|l|UL|ul|u|U|F|f|ll|LL|ull|ULL)?\\b"
|
||||||
|
}, {
|
||||||
|
token : "storage.modifier",
|
||||||
|
regex : storageModifiers
|
||||||
|
}, {
|
||||||
|
token : keywordMapper,
|
||||||
|
regex : identifierRe
|
||||||
|
}, {
|
||||||
|
token : "operator",
|
||||||
|
regex : operatorRe
|
||||||
|
}, {
|
||||||
|
token : "punctuation.operator",
|
||||||
|
regex : "\\?|\\:|\\,|\\;|\\."
|
||||||
|
}, {
|
||||||
|
token : "paren.lparen",
|
||||||
|
regex : "[[({]"
|
||||||
|
}, {
|
||||||
|
token : "paren.rparen",
|
||||||
|
regex : "[\\])}]"
|
||||||
|
}, {
|
||||||
|
token : "text",
|
||||||
|
regex : "\\s+"
|
||||||
|
}
|
||||||
|
],
|
||||||
|
"comment" : [ {token: "comment", regex: "-/", next: "start"},
|
||||||
|
{defaultToken: "comment"} ]
|
||||||
|
};
|
||||||
|
|
||||||
|
this.embedRules(DocCommentHighlightRules, "doc-",
|
||||||
|
[ DocCommentHighlightRules.getEndRule("start") ]);
|
||||||
|
this.normalizeRules();
|
||||||
|
};
|
||||||
|
|
||||||
|
oop.inherits(leanHighlightRules, TextHighlightRules);
|
||||||
|
|
||||||
|
exports.leanHighlightRules = leanHighlightRules;
|
||||||
|
});
|
||||||
|
|
||||||
|
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/lean",["require","exports","module","ace/lib/oop","ace/mode/text","ace/mode/lean_highlight_rules","ace/mode/matching_brace_outdent","ace/range"], function(require, exports, module) {
|
||||||
|
"use strict";
|
||||||
|
|
||||||
|
var oop = require("../lib/oop");
|
||||||
|
var TextMode = require("./text").Mode;
|
||||||
|
var leanHighlightRules = require("./lean_highlight_rules").leanHighlightRules;
|
||||||
|
var MatchingBraceOutdent = require("./matching_brace_outdent").MatchingBraceOutdent;
|
||||||
|
var Range = require("../range").Range;
|
||||||
|
|
||||||
|
var Mode = function() {
|
||||||
|
this.HighlightRules = leanHighlightRules;
|
||||||
|
|
||||||
|
this.$outdent = new MatchingBraceOutdent();
|
||||||
|
};
|
||||||
|
oop.inherits(Mode, TextMode);
|
||||||
|
|
||||||
|
(function() {
|
||||||
|
|
||||||
|
this.lineCommentStart = "--";
|
||||||
|
this.blockComment = {start: "/-", end: "-/"};
|
||||||
|
|
||||||
|
this.getNextLineIndent = function(state, line, tab) {
|
||||||
|
var indent = this.$getIndent(line);
|
||||||
|
|
||||||
|
var tokenizedLine = this.getTokenizer().getLineTokens(line, state);
|
||||||
|
var tokens = tokenizedLine.tokens;
|
||||||
|
var endState = tokenizedLine.state;
|
||||||
|
|
||||||
|
if (tokens.length && tokens[tokens.length-1].type == "comment") {
|
||||||
|
return indent;
|
||||||
|
}
|
||||||
|
|
||||||
|
if (state == "start") {
|
||||||
|
var match = line.match(/^.*[\{\(\[]\s*$/);
|
||||||
|
if (match) {
|
||||||
|
indent += tab;
|
||||||
|
}
|
||||||
|
} else if (state == "doc-start") {
|
||||||
|
if (endState == "start") {
|
||||||
|
return "";
|
||||||
|
}
|
||||||
|
var match = line.match(/^\s*(\/?)\*/);
|
||||||
|
if (match) {
|
||||||
|
if (match[1]) {
|
||||||
|
indent += " ";
|
||||||
|
}
|
||||||
|
indent += "- ";
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
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/lean";
|
||||||
|
}).call(Mode.prototype);
|
||||||
|
|
||||||
|
exports.Mode = Mode;
|
||||||
|
});
|
898
vendor/assets/javascripts/ace/mode-less.js
vendored
Executable file → Normal file
898
vendor/assets/javascripts/ace/mode-less.js
vendored
Executable file → Normal file
File diff suppressed because one or more lines are too long
1025
vendor/assets/javascripts/ace/mode-liquid.js
vendored
Executable file → Normal file
1025
vendor/assets/javascripts/ace/mode-liquid.js
vendored
Executable file → Normal file
File diff suppressed because one or more lines are too long
105
vendor/assets/javascripts/ace/mode-lisp.js
vendored
Executable file → Normal file
105
vendor/assets/javascripts/ace/mode-lisp.js
vendored
Executable file → Normal file
@ -1 +1,104 @@
|
|||||||
define("ace/mode/lisp_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="case|do|let|loop|if|else|when",t="eq|neq|and|or",n="null|nil",r="cons|car|cdr|cond|lambda|format|setq|setf|quote|eval|append|list|listp|memberp|t|load|progn",i=this.createKeywordMapper({"keyword.control":e,"keyword.operator":t,"constant.language":n,"support.function":r},"identifier",!0);this.$rules={start:[{token:"comment",regex:";.*$"},{token:["storage.type.function-type.lisp","text","entity.name.function.lisp"],regex:"(?:\\b(?:(defun|defmethod|defmacro))\\b)(\\s+)((?:\\w|\\-|\\!|\\?)*)"},{token:["punctuation.definition.constant.character.lisp","constant.character.lisp"],regex:"(#)((?:\\w|[\\\\+-=<>'\"&#])+)"},{token:["punctuation.definition.variable.lisp","variable.other.global.lisp","punctuation.definition.variable.lisp"],regex:"(\\*)(\\S*)(\\*)"},{token:"constant.numeric",regex:"0[xX][0-9a-fA-F]+(?:L|l|UL|ul|u|U|F|f|ll|LL|ull|ULL)?\\b"},{token:"constant.numeric",regex:"[+-]?\\d+(?:(?:\\.\\d*)?(?:[eE][+-]?\\d+)?)?(?:L|l|UL|ul|u|U|F|f|ll|LL|ull|ULL)?\\b"},{token:i,regex:"[a-zA-Z_$][a-zA-Z0-9_$]*\\b"},{token:"string",regex:'"(?=.)',next:"qqstring"}],qqstring:[{token:"constant.character.escape.lisp",regex:"\\\\."},{token:"string",regex:'[^"\\\\]+'},{token:"string",regex:"\\\\$",next:"qqstring"},{token:"string",regex:'"|$',next:"start"}]}};r.inherits(s,i),t.LispHighlightRules=s}),define("ace/mode/lisp",["require","exports","module","ace/lib/oop","ace/mode/text","ace/mode/lisp_highlight_rules"],function(e,t,n){"use strict";var r=e("../lib/oop"),i=e("./text").Mode,s=e("./lisp_highlight_rules").LispHighlightRules,o=function(){this.HighlightRules=s};r.inherits(o,i),function(){this.lineCommentStart=";",this.$id="ace/mode/lisp"}.call(o.prototype),t.Mode=o})
|
define("ace/mode/lisp_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 LispHighlightRules = function() {
|
||||||
|
var keywordControl = "case|do|let|loop|if|else|when";
|
||||||
|
var keywordOperator = "eq|neq|and|or";
|
||||||
|
var constantLanguage = "null|nil";
|
||||||
|
var supportFunctions = "cons|car|cdr|cond|lambda|format|setq|setf|quote|eval|append|list|listp|memberp|t|load|progn";
|
||||||
|
|
||||||
|
var keywordMapper = this.createKeywordMapper({
|
||||||
|
"keyword.control": keywordControl,
|
||||||
|
"keyword.operator": keywordOperator,
|
||||||
|
"constant.language": constantLanguage,
|
||||||
|
"support.function": supportFunctions
|
||||||
|
}, "identifier", true);
|
||||||
|
|
||||||
|
this.$rules =
|
||||||
|
{
|
||||||
|
"start": [
|
||||||
|
{
|
||||||
|
token : "comment",
|
||||||
|
regex : ";.*$"
|
||||||
|
},
|
||||||
|
{
|
||||||
|
token: ["storage.type.function-type.lisp", "text", "entity.name.function.lisp"],
|
||||||
|
regex: "(?:\\b(?:(defun|defmethod|defmacro))\\b)(\\s+)((?:\\w|\\-|\\!|\\?)*)"
|
||||||
|
},
|
||||||
|
{
|
||||||
|
token: ["punctuation.definition.constant.character.lisp", "constant.character.lisp"],
|
||||||
|
regex: "(#)((?:\\w|[\\\\+-=<>'\"&#])+)"
|
||||||
|
},
|
||||||
|
{
|
||||||
|
token: ["punctuation.definition.variable.lisp", "variable.other.global.lisp", "punctuation.definition.variable.lisp"],
|
||||||
|
regex: "(\\*)(\\S*)(\\*)"
|
||||||
|
},
|
||||||
|
{
|
||||||
|
token : "constant.numeric", // hex
|
||||||
|
regex : "0[xX][0-9a-fA-F]+(?:L|l|UL|ul|u|U|F|f|ll|LL|ull|ULL)?\\b"
|
||||||
|
},
|
||||||
|
{
|
||||||
|
token : "constant.numeric", // float
|
||||||
|
regex : "[+-]?\\d+(?:(?:\\.\\d*)?(?:[eE][+-]?\\d+)?)?(?:L|l|UL|ul|u|U|F|f|ll|LL|ull|ULL)?\\b"
|
||||||
|
},
|
||||||
|
{
|
||||||
|
token : keywordMapper,
|
||||||
|
regex : "[a-zA-Z_$][a-zA-Z0-9_$]*\\b"
|
||||||
|
},
|
||||||
|
{
|
||||||
|
token : "string",
|
||||||
|
regex : '"(?=.)',
|
||||||
|
next : "qqstring"
|
||||||
|
}
|
||||||
|
],
|
||||||
|
"qqstring": [
|
||||||
|
{
|
||||||
|
token: "constant.character.escape.lisp",
|
||||||
|
regex: "\\\\."
|
||||||
|
},
|
||||||
|
{
|
||||||
|
token : "string",
|
||||||
|
regex : '[^"\\\\]+'
|
||||||
|
}, {
|
||||||
|
token : "string",
|
||||||
|
regex : "\\\\$",
|
||||||
|
next : "qqstring"
|
||||||
|
}, {
|
||||||
|
token : "string",
|
||||||
|
regex : '"|$',
|
||||||
|
next : "start"
|
||||||
|
}
|
||||||
|
]
|
||||||
|
}
|
||||||
|
|
||||||
|
};
|
||||||
|
|
||||||
|
oop.inherits(LispHighlightRules, TextHighlightRules);
|
||||||
|
|
||||||
|
exports.LispHighlightRules = LispHighlightRules;
|
||||||
|
});
|
||||||
|
|
||||||
|
define("ace/mode/lisp",["require","exports","module","ace/lib/oop","ace/mode/text","ace/mode/lisp_highlight_rules"], function(require, exports, module) {
|
||||||
|
"use strict";
|
||||||
|
|
||||||
|
var oop = require("../lib/oop");
|
||||||
|
var TextMode = require("./text").Mode;
|
||||||
|
var LispHighlightRules = require("./lisp_highlight_rules").LispHighlightRules;
|
||||||
|
|
||||||
|
var Mode = function() {
|
||||||
|
this.HighlightRules = LispHighlightRules;
|
||||||
|
};
|
||||||
|
oop.inherits(Mode, TextMode);
|
||||||
|
|
||||||
|
(function() {
|
||||||
|
|
||||||
|
this.lineCommentStart = ";";
|
||||||
|
|
||||||
|
this.$id = "ace/mode/lisp";
|
||||||
|
}).call(Mode.prototype);
|
||||||
|
|
||||||
|
exports.Mode = Mode;
|
||||||
|
});
|
||||||
|
482
vendor/assets/javascripts/ace/mode-live_script.js
vendored
Executable file → Normal file
482
vendor/assets/javascripts/ace/mode-live_script.js
vendored
Executable file → Normal file
File diff suppressed because one or more lines are too long
287
vendor/assets/javascripts/ace/mode-livescript.js
vendored
Executable file → Normal file
287
vendor/assets/javascripts/ace/mode-livescript.js
vendored
Executable file → Normal file
File diff suppressed because one or more lines are too long
668
vendor/assets/javascripts/ace/mode-logiql.js
vendored
Executable file → Normal file
668
vendor/assets/javascripts/ace/mode-logiql.js
vendored
Executable file → Normal file
File diff suppressed because one or more lines are too long
694
vendor/assets/javascripts/ace/mode-lsl.js
vendored
Executable file → Normal file
694
vendor/assets/javascripts/ace/mode-lsl.js
vendored
Executable file → Normal file
File diff suppressed because one or more lines are too long
427
vendor/assets/javascripts/ace/mode-lua.js
vendored
Executable file → Normal file
427
vendor/assets/javascripts/ace/mode-lua.js
vendored
Executable file → Normal file
File diff suppressed because one or more lines are too long
2936
vendor/assets/javascripts/ace/mode-luapage.js
vendored
Executable file → Normal file
2936
vendor/assets/javascripts/ace/mode-luapage.js
vendored
Executable file → Normal file
File diff suppressed because one or more lines are too long
70
vendor/assets/javascripts/ace/mode-lucene.js
vendored
Executable file → Normal file
70
vendor/assets/javascripts/ace/mode-lucene.js
vendored
Executable file → Normal file
@ -1 +1,69 @@
|
|||||||
define("ace/mode/lucene_highlight_rules",["require","exports","module","ace/lib/oop","ace/lib/lang","ace/mode/text_highlight_rules"],function(e,t,n){"use strict";var r=e("../lib/oop"),i=e("../lib/lang"),s=e("./text_highlight_rules").TextHighlightRules,o=function(){this.$rules={start:[{token:"constant.character.negation",regex:"[\\-]"},{token:"constant.character.interro",regex:"[\\?]"},{token:"constant.character.asterisk",regex:"[\\*]"},{token:"constant.character.proximity",regex:"~[0-9]+\\b"},{token:"keyword.operator",regex:"(?:AND|OR|NOT)\\b"},{token:"paren.lparen",regex:"[\\(]"},{token:"paren.rparen",regex:"[\\)]"},{token:"keyword",regex:"[\\S]+:"},{token:"string",regex:'".*?"'},{token:"text",regex:"\\s+"}]}};r.inherits(o,s),t.LuceneHighlightRules=o}),define("ace/mode/lucene",["require","exports","module","ace/lib/oop","ace/mode/text","ace/mode/lucene_highlight_rules"],function(e,t,n){"use strict";var r=e("../lib/oop"),i=e("./text").Mode,s=e("./lucene_highlight_rules").LuceneHighlightRules,o=function(){this.HighlightRules=s};r.inherits(o,i),function(){this.$id="ace/mode/lucene"}.call(o.prototype),t.Mode=o})
|
define("ace/mode/lucene_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;
|
||||||
|
|
||||||
|
var LuceneHighlightRules = function() {
|
||||||
|
this.$rules = {
|
||||||
|
"start" : [
|
||||||
|
{
|
||||||
|
token : "constant.character.negation",
|
||||||
|
regex : "[\\-]"
|
||||||
|
}, {
|
||||||
|
token : "constant.character.interro",
|
||||||
|
regex : "[\\?]"
|
||||||
|
}, {
|
||||||
|
token : "constant.character.asterisk",
|
||||||
|
regex : "[\\*]"
|
||||||
|
}, {
|
||||||
|
token: 'constant.character.proximity',
|
||||||
|
regex: '~[0-9]+\\b'
|
||||||
|
}, {
|
||||||
|
token : 'keyword.operator',
|
||||||
|
regex: '(?:AND|OR|NOT)\\b'
|
||||||
|
}, {
|
||||||
|
token : "paren.lparen",
|
||||||
|
regex : "[\\(]"
|
||||||
|
}, {
|
||||||
|
token : "paren.rparen",
|
||||||
|
regex : "[\\)]"
|
||||||
|
}, {
|
||||||
|
token : "keyword",
|
||||||
|
regex : "[\\S]+:"
|
||||||
|
}, {
|
||||||
|
token : "string", // " string
|
||||||
|
regex : '".*?"'
|
||||||
|
}, {
|
||||||
|
token : "text",
|
||||||
|
regex : "\\s+"
|
||||||
|
}
|
||||||
|
]
|
||||||
|
};
|
||||||
|
};
|
||||||
|
|
||||||
|
oop.inherits(LuceneHighlightRules, TextHighlightRules);
|
||||||
|
|
||||||
|
exports.LuceneHighlightRules = LuceneHighlightRules;
|
||||||
|
});
|
||||||
|
|
||||||
|
define("ace/mode/lucene",["require","exports","module","ace/lib/oop","ace/mode/text","ace/mode/lucene_highlight_rules"], function(require, exports, module) {
|
||||||
|
'use strict';
|
||||||
|
|
||||||
|
var oop = require("../lib/oop");
|
||||||
|
var TextMode = require("./text").Mode;
|
||||||
|
var LuceneHighlightRules = require("./lucene_highlight_rules").LuceneHighlightRules;
|
||||||
|
|
||||||
|
var Mode = function() {
|
||||||
|
this.HighlightRules = LuceneHighlightRules;
|
||||||
|
};
|
||||||
|
|
||||||
|
oop.inherits(Mode, TextMode);
|
||||||
|
|
||||||
|
(function() {
|
||||||
|
this.$id = "ace/mode/lucene";
|
||||||
|
}).call(Mode.prototype);
|
||||||
|
|
||||||
|
exports.Mode = Mode;
|
||||||
|
});
|
||||||
|
358
vendor/assets/javascripts/ace/mode-makefile.js
vendored
Executable file → Normal file
358
vendor/assets/javascripts/ace/mode-makefile.js
vendored
Executable file → Normal file
File diff suppressed because one or more lines are too long
2820
vendor/assets/javascripts/ace/mode-markdown.js
vendored
Executable file → Normal file
2820
vendor/assets/javascripts/ace/mode-markdown.js
vendored
Executable file → Normal file
File diff suppressed because one or more lines are too long
1984
vendor/assets/javascripts/ace/mode-mask.js
vendored
Executable file → Normal file
1984
vendor/assets/javascripts/ace/mode-mask.js
vendored
Executable file → Normal file
File diff suppressed because one or more lines are too long
257
vendor/assets/javascripts/ace/mode-matlab.js
vendored
Executable file → Normal file
257
vendor/assets/javascripts/ace/mode-matlab.js
vendored
Executable file → Normal file
File diff suppressed because one or more lines are too long
160
vendor/assets/javascripts/ace/mode-mavens_mate_log.js
vendored
Normal file
160
vendor/assets/javascripts/ace/mode-mavens_mate_log.js
vendored
Normal file
@ -0,0 +1,160 @@
|
|||||||
|
ace.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);
|
||||||
|
|
||||||
|
});
|
||||||
|
|
||||||
|
ace.define("ace/mode/mavens_mate_log",["require","exports","module","ace/lib/oop","ace/mode/text","ace/mode/mavens_mate_log_highlight_rules","ace/mode/folding/cstyle"], function(require, exports, module) {
|
||||||
|
"use strict";
|
||||||
|
|
||||||
|
var oop = require("../lib/oop");
|
||||||
|
var TextMode = require("./text").Mode;
|
||||||
|
var MavensMateLogHighlightRules = require("./mavens_mate_log_highlight_rules").MavensMateLogHighlightRules;
|
||||||
|
var FoldMode = require("./folding/cstyle").FoldMode;
|
||||||
|
|
||||||
|
var Mode = function() {
|
||||||
|
this.HighlightRules = MavensMateLogHighlightRules;
|
||||||
|
this.foldingRules = new FoldMode();
|
||||||
|
};
|
||||||
|
oop.inherits(Mode, TextMode);
|
||||||
|
|
||||||
|
(function() {
|
||||||
|
this.$id = "ace/mode/mavens_mate_log"
|
||||||
|
}).call(Mode.prototype);
|
||||||
|
|
||||||
|
exports.Mode = Mode;
|
||||||
|
});
|
Some files were not shown because too many files have changed in this diff Show More
Reference in New Issue
Block a user