first commit
This commit is contained in:
commit
1218dd1517
12716 files changed
+989233
No files matched your search
@@ -0,0 +1,47 @@
|
||||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<xliff version="1.0" xmlns:t3="http://typo3.org/schemas/xliff">
|
||||
<file t3:id="1415814999" source-language="en" datatype="plaintext" original="EXT:t3editor/Resources/Private/Language/locallang.xlf" date="2011-10-17T20:22:37Z" product-name="t3editor">
|
||||
<header/>
|
||||
<body>
|
||||
<trans-unit id="deactivate" resname="deactivate">
|
||||
<source>Deactivate t3editor</source>
|
||||
</trans-unit>
|
||||
<trans-unit id="template" resname="template">
|
||||
<source>Template</source>
|
||||
</trans-unit>
|
||||
<trans-unit id="file" resname="file">
|
||||
<source>File</source>
|
||||
</trans-unit>
|
||||
<trans-unit id="delimiter" resname="delimiter">
|
||||
<source></source>
|
||||
</trans-unit>
|
||||
<trans-unit id="constants" resname="constants">
|
||||
<source>Constants</source>
|
||||
</trans-unit>
|
||||
<trans-unit id="setup" resname="setup">
|
||||
<source>Setup</source>
|
||||
</trans-unit>
|
||||
<trans-unit id="unknownContentType" resname="unknownContentType">
|
||||
<source>Unknown content type</source>
|
||||
</trans-unit>
|
||||
<trans-unit id="pageIDInteger" resname="pageIDInteger">
|
||||
<source>Syntax error: Parameter pageID must be a valid integer.</source>
|
||||
</trans-unit>
|
||||
<trans-unit id="noPermission" resname="noPermission">
|
||||
<source>Access denied: No permission to template records.</source>
|
||||
</trans-unit>
|
||||
<trans-unit id="typeIDMissing" resname="typeIDMissing">
|
||||
<source>Syntax error: At least parameter typeID has to be supplied.</source>
|
||||
</trans-unit>
|
||||
<trans-unit id="js.label_lines" resname="js.label_lines">
|
||||
<source>lines</source>
|
||||
</trans-unit>
|
||||
<trans-unit id="js.label_documentModified" resname="js.label_documentModified">
|
||||
<source>document has been modified</source>
|
||||
</trans-unit>
|
||||
<trans-unit id="js.label_errorWhileSaving" resname="js.label_errorWhileSaving">
|
||||
<source>An error occurred while saving the data.</source>
|
||||
</trans-unit>
|
||||
</body>
|
||||
</file>
|
||||
</xliff>
|
||||
File diff suppressed because it is too large.
Load diff
@@ -0,0 +1,13 @@
|
||||
/*!
|
||||
* This file is part of the TYPO3 CMS project.
|
||||
*
|
||||
* It is free software; you can redistribute it and/or modify it under
|
||||
* the terms of the GNU General Public License, either version 2
|
||||
* of the License, or any later version.
|
||||
*
|
||||
* For the full copyright and license information, please read the
|
||||
* LICENSE.txt file that was distributed with this source code.
|
||||
*
|
||||
* The TYPO3 project - inspiring people to share!
|
||||
*/
|
||||
.t3editor-wrapper{border:1px solid transparent}.t3editor-wrapper .CodeMirror-fullscreen{top:64px!important}.t3editor-wrapper .CodeMirror-panel{background:#f7f7f7;padding:3px 6px;font-size:.85em}.t3editor-wrapper .CodeMirror-panel-bottom{border-top:1px solid #ddd}.t3editor-wrapper div.CodeMirror span.CodeMirror-matchingbracket{color:#6ca52b}.has-change .t3editor-wrapper{border-color:#6daadf}
|
||||
Binary file not shown.
|
After Width: | Height: | Size: 2.2 KiB |
@@ -0,0 +1,120 @@
|
||||
/*
|
||||
* This file is part of the TYPO3 CMS project.
|
||||
*
|
||||
* It is free software; you can redistribute it and/or modify it under
|
||||
* the terms of the GNU General Public License, either version 2
|
||||
* of the License, or any later version.
|
||||
*
|
||||
* For the full copyright and license information, please read the
|
||||
* LICENSE.txt file that was distributed with this source code.
|
||||
*
|
||||
* The TYPO3 project - inspiring people to share!
|
||||
*/
|
||||
|
||||
/**
|
||||
* Module: TYPO3/CMS/T3editor/Addon/Hint/CompletionResult
|
||||
* Contains the CompletionResult class
|
||||
*/
|
||||
define(['jquery'], function($) {
|
||||
/**
|
||||
*
|
||||
* @type {{tsRef: null, tsTreeNode: null}}
|
||||
* @exports TYPO3/CMS/T3editor/Addon/Hint/CompletionResult
|
||||
*/
|
||||
var CompletionResult = {
|
||||
tsRef: null,
|
||||
tsTreeNode: null
|
||||
};
|
||||
|
||||
/**
|
||||
*
|
||||
* @param {Object} config
|
||||
* @returns {{tsRef: null, tsTreeNode: null}}
|
||||
*/
|
||||
CompletionResult.init = function(config) {
|
||||
CompletionResult.tsRef = config.tsRef;
|
||||
CompletionResult.tsTreeNode = config.tsTreeNode;
|
||||
|
||||
return CompletionResult;
|
||||
};
|
||||
|
||||
/**
|
||||
* returns the type of the currentTsTreeNode
|
||||
*
|
||||
* @returns {*}
|
||||
*/
|
||||
CompletionResult.getType = function() {
|
||||
var val = CompletionResult.tsTreeNode.getValue();
|
||||
if (CompletionResult.tsRef.isType(val)) {
|
||||
return CompletionResult.tsRef.getType(val);
|
||||
}
|
||||
return null;
|
||||
};
|
||||
|
||||
/**
|
||||
* returns a list of possible path completions (proposals), which is:
|
||||
* a list of the children of the current TsTreeNode (= userdefined properties)
|
||||
* and a list of properties allowed for the current object in the TsRef
|
||||
* remove all words from list that don't start with the string in filter
|
||||
*
|
||||
* @param {String} filter beginning of the words contained in the proposal list
|
||||
* @return {Array} an Array of Proposals
|
||||
*/
|
||||
CompletionResult.getFilteredProposals = function(filter) {
|
||||
var defined = [],
|
||||
propArr = [],
|
||||
childNodes = CompletionResult.tsTreeNode.getChildNodes(),
|
||||
value = CompletionResult.tsTreeNode.getValue();
|
||||
|
||||
// first get the childNodes of the Node (=properties defined by the user)
|
||||
for (var key in childNodes) {
|
||||
if (typeof childNodes[key].value !== 'undefined' && childNodes[key].value !== null) {
|
||||
var propObj = {};
|
||||
propObj.word = key;
|
||||
if (CompletionResult.tsRef.typeHasProperty(value, childNodes[key].name)) {
|
||||
CompletionResult.tsRef.cssClass = 'definedTSREFProperty';
|
||||
propObj.type = childNodes[key].value;
|
||||
} else {
|
||||
propObj.cssClass = 'userProperty';
|
||||
if (CompletionResult.tsRef.isType(childNodes[key].value)) {
|
||||
propObj.type = childNodes[key].value;
|
||||
} else {
|
||||
propObj.type = '';
|
||||
}
|
||||
}
|
||||
propArr.push(propObj);
|
||||
defined[key] = true;
|
||||
}
|
||||
}
|
||||
|
||||
// then get the tsref properties
|
||||
var props = CompletionResult.tsRef.getPropertiesFromTypeId(CompletionResult.tsTreeNode.getValue());
|
||||
for (var key in props) {
|
||||
// show just the TSREF properties - no properties of the array-prototype and no properties which have been defined by the user
|
||||
if (typeof props[key].value !== 'undefined' && defined[key] !== true) {
|
||||
var propObj = {};
|
||||
propObj.word = key;
|
||||
propObj.cssClass = 'undefinedTSREFProperty';
|
||||
propObj.type = props[key].value;
|
||||
propArr.push(propObj);
|
||||
}
|
||||
}
|
||||
|
||||
var result = [],
|
||||
wordBeginning = '';
|
||||
|
||||
for (var i = 0; i < propArr.length; i++) {
|
||||
if (filter.length === 0) {
|
||||
result.push(propArr[i]);
|
||||
continue;
|
||||
}
|
||||
wordBeginning = propArr[i].word.substring(0, filter.length);
|
||||
if (wordBeginning.toLowerCase() === filter.toLowerCase()) {
|
||||
result.push(propArr[i]);
|
||||
}
|
||||
}
|
||||
return result;
|
||||
};
|
||||
|
||||
return CompletionResult;
|
||||
});
|
||||
@@ -0,0 +1,172 @@
|
||||
/*
|
||||
* This file is part of the TYPO3 CMS project.
|
||||
*
|
||||
* It is free software; you can redistribute it and/or modify it under
|
||||
* the terms of the GNU General Public License, either version 2
|
||||
* of the License, or any later version.
|
||||
*
|
||||
* For the full copyright and license information, please read the
|
||||
* LICENSE.txt file that was distributed with this source code.
|
||||
*
|
||||
* The TYPO3 project - inspiring people to share!
|
||||
*/
|
||||
|
||||
/**
|
||||
* Module: TYPO3/CMS/T3editor/Addon/Hint/TsCodeCompletion
|
||||
* Contains the TsCodeCompletion class
|
||||
*/
|
||||
define([
|
||||
'jquery',
|
||||
'TYPO3/CMS/T3editor/Addon/Hint/TsRef',
|
||||
'TYPO3/CMS/T3editor/Addon/Hint/TsParser',
|
||||
'TYPO3/CMS/T3editor/Addon/Hint/CompletionResult'
|
||||
], function($, TsRef, TsParser, CompletionResult) {
|
||||
/**
|
||||
*
|
||||
* @type {{tsRef: *, proposals: null, compResult: null, currentCursorPosition: null, extTsObjTree: {}, codemirror: null, parser: null, plugins: string[]}}
|
||||
* @exports TYPO3/CMS/T3editor/CodeCompletion/TsCodeCompletion
|
||||
*/
|
||||
var TsCodeCompletion = {
|
||||
tsRef: TsRef,
|
||||
proposals: null,
|
||||
compResult: null,
|
||||
currentCursorPosition: null,
|
||||
extTsObjTree: {},
|
||||
codemirror: null,
|
||||
parser: null
|
||||
};
|
||||
|
||||
/**
|
||||
* All external templates along the rootline have to be loaded,
|
||||
* this function retrieves the JSON code by committing a AJAX request
|
||||
*
|
||||
* @param {number} id
|
||||
*/
|
||||
TsCodeCompletion.loadExtTemplatesAsync = function(id) {
|
||||
// Ensure id is an integer
|
||||
id *= 1;
|
||||
if (isNaN(id) || id === 0) {
|
||||
return null;
|
||||
}
|
||||
$.ajax({
|
||||
url: TYPO3.settings.ajaxUrls['t3editor_codecompletion_loadtemplates'],
|
||||
data: {
|
||||
pageId: id
|
||||
},
|
||||
dataType: 'json',
|
||||
success: function(response) {
|
||||
TsCodeCompletion.extTsObjTree.c = response;
|
||||
TsCodeCompletion.resolveExtReferencesRec(TsCodeCompletion.extTsObjTree.c);
|
||||
}
|
||||
});
|
||||
};
|
||||
|
||||
/**
|
||||
* Since the references are not resolved server side we have to do it client-side
|
||||
* Benefit: less loading time due to less data which has to be transmitted
|
||||
*
|
||||
* @param {Array} childNodes
|
||||
*/
|
||||
TsCodeCompletion.resolveExtReferencesRec = function(childNodes) {
|
||||
for (var key in childNodes) {
|
||||
var childNode;
|
||||
// if the childnode has a value and there is a part of a reference operator ('<')
|
||||
// and it does not look like a html tag ('>')
|
||||
if (childNodes[key].v && childNodes[key].v[0] === '<' && childNodes[key].v.indexOf('>') === -1) {
|
||||
var path = $.trim(childNodes[key].v.replace(/</, ''));
|
||||
// if there are still whitespaces it's no path
|
||||
if (path.indexOf(' ') === -1) {
|
||||
childNode = TsCodeCompletion.getExtChildNode(path);
|
||||
// if the node was found - reference it
|
||||
if (childNode !== null) {
|
||||
childNodes[key] = childNode;
|
||||
}
|
||||
}
|
||||
}
|
||||
// if there was no reference-resolving then we go deeper into the tree
|
||||
if (!childNode && childNodes[key].c) {
|
||||
TsCodeCompletion.resolveExtReferencesRec(childNodes[key].c);
|
||||
}
|
||||
}
|
||||
};
|
||||
|
||||
/**
|
||||
* Get the child node of given path
|
||||
*
|
||||
* @param {String} path
|
||||
* @returns {Object}
|
||||
*/
|
||||
TsCodeCompletion.getExtChildNode = function(path) {
|
||||
var extTree = TsCodeCompletion.extTsObjTree,
|
||||
path = path.split('.'),
|
||||
pathSeg;
|
||||
|
||||
for (var i = 0; i < path.length; i++) {
|
||||
pathSeg = path[i];
|
||||
if (typeof extTree.c === 'undefined' || typeof extTree.c[pathSeg] === 'undefined') {
|
||||
return null;
|
||||
}
|
||||
extTree = extTree.c[pathSeg];
|
||||
}
|
||||
return extTree;
|
||||
};
|
||||
|
||||
/**
|
||||
*
|
||||
* @returns {String}
|
||||
*/
|
||||
TsCodeCompletion.getFilter = function() {
|
||||
var currentLine = TsCodeCompletion.codemirror.getTokenAt(TsCodeCompletion.currentCursorPosition).string;
|
||||
if (currentLine) {
|
||||
var filter = currentLine.replace('.', '');
|
||||
return filter.replace(/\s/g, '');
|
||||
}
|
||||
return '';
|
||||
};
|
||||
|
||||
/**
|
||||
* Refreshes the code completion list based on the cursor's position
|
||||
*/
|
||||
TsCodeCompletion.refreshCodeCompletion = function(codemirror) {
|
||||
TsCodeCompletion.codemirror = codemirror;
|
||||
|
||||
// retrieves the node right to the cursor
|
||||
TsCodeCompletion.currentCursorPosition = TsCodeCompletion.codemirror.doc.getCursor();
|
||||
|
||||
// the cursornode has to be stored cause inserted breaks have to be deleted after pressing enter if the codecompletion is active
|
||||
var filter = TsCodeCompletion.getFilter();
|
||||
|
||||
if (TsCodeCompletion.compResult === null || TsCodeCompletion.codemirror.getTokenAt(TsCodeCompletion.currentCursorPosition).string === '.') {
|
||||
// TODO: implement cases: operatorCompletion reference/copy path completion (formerly found in getCompletionResults())
|
||||
var currentTsTreeNode = TsCodeCompletion.parser.buildTsObjTree(TsCodeCompletion.codemirror);
|
||||
TsCodeCompletion.compResult = CompletionResult.init({
|
||||
tsRef: TsRef,
|
||||
tsTreeNode: currentTsTreeNode
|
||||
});
|
||||
}
|
||||
|
||||
TsCodeCompletion.proposals = TsCodeCompletion.compResult.getFilteredProposals(filter);
|
||||
|
||||
var proposals = [];
|
||||
for (var i = 0; i < TsCodeCompletion.proposals.length; i++) {
|
||||
proposals[i] = TsCodeCompletion.proposals[i].word;
|
||||
}
|
||||
|
||||
return proposals;
|
||||
};
|
||||
|
||||
/**
|
||||
* Resets the completion list
|
||||
*/
|
||||
TsCodeCompletion.resetCompList = function() {
|
||||
TsCodeCompletion.compResult = null;
|
||||
};
|
||||
|
||||
$(function() {
|
||||
TsCodeCompletion.parser = TsParser.init(TsCodeCompletion.tsRef, TsCodeCompletion.extTsObjTree);
|
||||
TsCodeCompletion.tsRef.loadTsrefAsync();
|
||||
TsCodeCompletion.loadExtTemplatesAsync($('input[name="effectivePid"]').first().val());
|
||||
});
|
||||
|
||||
return TsCodeCompletion;
|
||||
});
|
||||
@@ -0,0 +1,518 @@
|
||||
/*
|
||||
* This file is part of the TYPO3 CMS project.
|
||||
*
|
||||
* It is free software; you can redistribute it and/or modify it under
|
||||
* the terms of the GNU General Public License, either version 2
|
||||
* of the License, or any later version.
|
||||
*
|
||||
* For the full copyright and license information, please read the
|
||||
* LICENSE.txt file that was distributed with this source code.
|
||||
*
|
||||
* The TYPO3 project - inspiring people to share!
|
||||
*/
|
||||
|
||||
/**
|
||||
* Module: TYPO3/CMS/T3editor/Addon/Hint/TsParser
|
||||
* Contains the TsCodeCompletion class
|
||||
*/
|
||||
define([
|
||||
'jquery', 'TYPO3/CMS/T3editor/Addon/Hint/TsRef'
|
||||
], function($) {
|
||||
/**
|
||||
*
|
||||
* @type {{typeId: null, properties: null, typeTree: Array, doc: null, tsRef: null, extTsObjTree: Array, tsTree: null}}
|
||||
* @exports TYPO3/CMS/T3editor/Addon/Hint/TsParser
|
||||
*/
|
||||
var TsParser = {
|
||||
typeId: null,
|
||||
properties: null,
|
||||
typeTree: [],
|
||||
doc: null,
|
||||
tsRef: null,
|
||||
extTsObjTree: [],
|
||||
tsTree: null
|
||||
};
|
||||
|
||||
/**
|
||||
*
|
||||
* @param {Object} tsRef
|
||||
* @param {Object} extTsObjTree
|
||||
* @returns {{typeId: null, properties: null, typeTree: Array, doc: null, tsRef: null, extTsObjTree: Array, tsTree: null}}
|
||||
*/
|
||||
TsParser.init = function(tsRef, extTsObjTree) {
|
||||
TsParser.tsRef = tsRef;
|
||||
TsParser.extTsObjTree = extTsObjTree;
|
||||
TsParser.tsTree = new TsParser.treeNode('_L_');
|
||||
|
||||
return TsParser;
|
||||
};
|
||||
|
||||
/**
|
||||
*
|
||||
* @param {String} nodeName
|
||||
*/
|
||||
TsParser.treeNode = function(nodeName) {
|
||||
this.name = nodeName;
|
||||
this.childNodes = [];
|
||||
this.extPath = '';
|
||||
this.value = '';
|
||||
this.isExternal = false;
|
||||
|
||||
/**
|
||||
* Returns local properties and the properties of the external templates
|
||||
*
|
||||
* @return {Array}
|
||||
*/
|
||||
this.getChildNodes = function() {
|
||||
var node = this.getExtNode();
|
||||
if (node !== null && typeof node.c === 'object') {
|
||||
for (key in node.c) {
|
||||
var tn = new TsParser.treeNode(key, this.tsObjTree);
|
||||
tn.global = true;
|
||||
tn.value = (node.c[key].v) ? node.c[key].v : "";
|
||||
tn.isExternal = true;
|
||||
this.childNodes[key] = tn;
|
||||
}
|
||||
}
|
||||
return this.childNodes;
|
||||
};
|
||||
|
||||
/**
|
||||
* Returns the value of a node
|
||||
*
|
||||
* @returns {String}
|
||||
*/
|
||||
this.getValue = function() {
|
||||
if (this.value) {
|
||||
return this.value;
|
||||
}
|
||||
var node = this.getExtNode();
|
||||
if (node && node.v) {
|
||||
return node.v;
|
||||
}
|
||||
|
||||
var type = this.getNodeTypeFromTsref();
|
||||
if (type) {
|
||||
return type;
|
||||
}
|
||||
return '';
|
||||
};
|
||||
|
||||
/**
|
||||
* This method will try to resolve the properties recursively from right
|
||||
* to left. If the node's value property is not set, it will look for the
|
||||
* value of its parent node, and if there is a matching childProperty
|
||||
* (according to the TSREF) it will return the childProperties value.
|
||||
* If there is no value in the parent node it will go one step further
|
||||
* and look into the parent node of the parent node,...
|
||||
*
|
||||
* @return {String}
|
||||
*/
|
||||
this.getNodeTypeFromTsref = function() {
|
||||
var path = this.extPath.split('.'),
|
||||
lastSeg = path.pop();
|
||||
|
||||
// attention: there will be recursive calls if necessary
|
||||
var parentValue = this.parent.getValue();
|
||||
if (parentValue) {
|
||||
if (TsParser.tsRef.typeHasProperty(parentValue, lastSeg)) {
|
||||
var type = TsParser.tsRef.getType(parentValue);
|
||||
return type.properties[lastSeg].value;
|
||||
}
|
||||
}
|
||||
return '';
|
||||
};
|
||||
|
||||
/**
|
||||
* Will look in the external ts-tree (static templates, templates on other pages)
|
||||
* if there is a value or childproperties assigned to the current node.
|
||||
* The method uses the extPath of the current node to navigate to the corresponding
|
||||
* node in the external tree
|
||||
*
|
||||
* @return {Object}
|
||||
*/
|
||||
this.getExtNode = function() {
|
||||
var extTree = TsParser.extTsObjTree,
|
||||
path,
|
||||
pathSeg;
|
||||
|
||||
if (this.extPath === '') {
|
||||
return extTree;
|
||||
}
|
||||
path = this.extPath.split('.');
|
||||
|
||||
for (var i = 0; i < path.length; i++) {
|
||||
pathSeg = path[i];
|
||||
if (typeof extTree.c === 'undefined' || typeof extTree.c[pathSeg] === 'undefined') {
|
||||
return null;
|
||||
}
|
||||
extTree = extTree.c[pathSeg];
|
||||
}
|
||||
return extTree;
|
||||
};
|
||||
};
|
||||
|
||||
/**
|
||||
* Check if there is an operator in the line and return it
|
||||
* if there is none, return -1
|
||||
*
|
||||
* @return {(String|Number)}
|
||||
*/
|
||||
TsParser.getOperator = function(line) {
|
||||
var operators = [':=', '=<', '<', '>', '='];
|
||||
for (var i = 0; i < operators.length; i++) {
|
||||
var op = operators[i];
|
||||
if (line.indexOf(op) !== -1) {
|
||||
// check if there is some HTML in this line (simple check, however it's the only difference between a reference operator and HTML)
|
||||
// we do this check only in case of the two operators "=<" and "<" since the delete operator would trigger our "HTML-finder"
|
||||
if ((op === '=<' || op === '<') && line.indexOf('>') > -1) {
|
||||
// if there is a ">" in the line suppose there's some HTML
|
||||
return '=';
|
||||
}
|
||||
return op;
|
||||
}
|
||||
}
|
||||
return -1;
|
||||
};
|
||||
|
||||
/**
|
||||
* Build the TypoScript object tree
|
||||
*/
|
||||
TsParser.buildTsObjTree = function(codemirror) {
|
||||
TsParser.tsTree = new TsParser.treeNode('');
|
||||
TsParser.tsTree.value = 'TLO';
|
||||
|
||||
function Stack() {
|
||||
}
|
||||
|
||||
Stack.prototype = [];
|
||||
Stack.prototype.lastElementEquals = function(str) {
|
||||
return this.length > 0 && this[this.length - 1] === str;
|
||||
};
|
||||
|
||||
Stack.prototype.popIfLastElementEquals = function(str) {
|
||||
if (this.lastElementEquals(str)) {
|
||||
this.pop();
|
||||
return true;
|
||||
}
|
||||
return false;
|
||||
};
|
||||
|
||||
var currentLine = 0,
|
||||
cursorPosition = codemirror.getCursor(),
|
||||
line = '',
|
||||
stack = new Stack(),
|
||||
prefixes = [],
|
||||
ignoreLine = false,
|
||||
insideCondition = false;
|
||||
|
||||
while (currentLine <= cursorPosition.line) {
|
||||
line = '';
|
||||
var tokens = codemirror.getLineTokens(currentLine);
|
||||
for (var i = 0; i <= tokens.length; ++i) {
|
||||
if (i < tokens.length && tokens[i].string.length > 0) {
|
||||
var tokenValue = tokens[i].string;
|
||||
|
||||
if (tokenValue[0] === '#') {
|
||||
stack.push('#');
|
||||
} else if (tokenValue === '(') {
|
||||
stack.push('(');
|
||||
} else if (tokenValue[0] === '/' && tokenValue[1] === '*') {
|
||||
stack.push('/*');
|
||||
} else if (tokenValue === '{') {
|
||||
// TODO: ignore whole block if wrong whitespaces in this line
|
||||
if (TsParser.getOperator(line) === -1) {
|
||||
stack.push('{');
|
||||
prefixes.push($.trim(line));
|
||||
ignoreLine = true;
|
||||
}
|
||||
}
|
||||
// TODO: conditions
|
||||
// if condition starts -> ignore everything until end of condition
|
||||
if (tokenValue.search(/^\s*\[.*\]/) !== -1
|
||||
&& line.search(/\S/) === -1
|
||||
&& tokenValue.search(/^\s*\[(global|end|GLOBAL|END)\]/) === -1
|
||||
&& !stack.lastElementEquals('#')
|
||||
&& !stack.lastElementEquals('/*')
|
||||
&& !stack.lastElementEquals('{')
|
||||
&& !stack.lastElementEquals('(')
|
||||
) {
|
||||
insideCondition = true;
|
||||
ignoreLine = true;
|
||||
}
|
||||
|
||||
// if end of condition reached
|
||||
if (line.search(/\S/) === -1
|
||||
&& !stack.lastElementEquals('#')
|
||||
&& !stack.lastElementEquals('/*')
|
||||
&& !stack.lastElementEquals('(')
|
||||
&& (
|
||||
(tokenValue.search(/^\s*\[(global|end|GLOBAL|END)\]/) !== -1
|
||||
&& !stack.lastElementEquals('{'))
|
||||
|| (tokenValue.search(/^\s*\[(global|GLOBAL)\]/) !== -1)
|
||||
)
|
||||
) {
|
||||
insideCondition = false;
|
||||
ignoreLine = true;
|
||||
}
|
||||
|
||||
if (tokenValue === ')') {
|
||||
stack.popIfLastElementEquals('(');
|
||||
}
|
||||
if (tokenValue[0] === '*' && tokenValue[1] === '/') {
|
||||
stack.popIfLastElementEquals('/*');
|
||||
ignoreLine = true;
|
||||
}
|
||||
if (tokenValue === '}') {
|
||||
//no characters except whitespace allowed before closing bracket
|
||||
var trimmedLine = line.replace(/\s/g, '');
|
||||
if (trimmedLine === '') {
|
||||
stack.popIfLastElementEquals('{');
|
||||
if (prefixes.length > 0) {
|
||||
prefixes.pop();
|
||||
}
|
||||
ignoreLine = true;
|
||||
}
|
||||
}
|
||||
if (!stack.lastElementEquals('#')) {
|
||||
line += tokenValue;
|
||||
}
|
||||
} else {
|
||||
// ignore comments, ...
|
||||
if (!stack.lastElementEquals('/*') && !stack.lastElementEquals('(') && !ignoreLine && !insideCondition) {
|
||||
line = $.trim(line);
|
||||
// check if there is any operator in this line
|
||||
var op = TsParser.getOperator(line);
|
||||
if (op !== -1) {
|
||||
// figure out the position of the operator
|
||||
var pos = line.indexOf(op);
|
||||
// the target objectpath should be left to the operator
|
||||
var path = line.substring(0, pos);
|
||||
// if we are in between curly brackets: add prefixes to object path
|
||||
if (prefixes.length > 0) {
|
||||
path = prefixes.join('.') + '.' + path;
|
||||
}
|
||||
// the type or value should be right to the operator
|
||||
var str = line.substring(pos + op.length, line.length);
|
||||
path = $.trim(path);
|
||||
str = $.trim(str);
|
||||
switch (op) { // set a value or create a new object
|
||||
case '=':
|
||||
//ignore if path is empty or contains whitespace
|
||||
if (path.search(/\s/g) === -1 && path.length > 0) {
|
||||
TsParser.setTreeNodeValue(path, str);
|
||||
}
|
||||
break;
|
||||
case '=<': // reference to another object in the tree
|
||||
// resolve relative path
|
||||
if (prefixes.length > 0 && str.substr(0, 1) === '.') {
|
||||
str = prefixes.join('.') + str;
|
||||
}
|
||||
//ignore if either path or str is empty or contains whitespace
|
||||
if (path.search(/\s/g) === -1
|
||||
&& path.length > 0
|
||||
&& str.search(/\s/g) === -1
|
||||
&& str.length > 0
|
||||
) {
|
||||
TsParser.setReference(path, str);
|
||||
}
|
||||
break;
|
||||
case '<': // copy from another object in the tree
|
||||
// resolve relative path
|
||||
if (prefixes.length > 0 && str.substr(0, 1) === '.') {
|
||||
str = prefixes.join('.') + str;
|
||||
}
|
||||
//ignore if either path or str is empty or contains whitespace
|
||||
if (path.search(/\s/g) === -1
|
||||
&& path.length > 0
|
||||
&& str.search(/\s/g) === -1
|
||||
&& str.length > 0
|
||||
) {
|
||||
TsParser.setCopy(path, str);
|
||||
}
|
||||
break;
|
||||
case '>': // delete object value and properties
|
||||
TsParser.deleteTreeNodeValue(path);
|
||||
break;
|
||||
case ':=': // function operator
|
||||
// TODO: function-operator
|
||||
break;
|
||||
}
|
||||
}
|
||||
}
|
||||
stack.popIfLastElementEquals('#');
|
||||
ignoreLine = false;
|
||||
}
|
||||
}
|
||||
currentLine++;
|
||||
}
|
||||
// when node at cursorPos is reached:
|
||||
// save currentLine, currentTsTreeNode and filter if necessary
|
||||
// if there is a reference or copy operator ('<' or '=<')
|
||||
// return the treeNode of the path right to the operator,
|
||||
// else try to build a path from the whole line
|
||||
if (!stack.lastElementEquals('/*') && !stack.lastElementEquals('(') && !ignoreLine) {
|
||||
var i = line.indexOf('<');
|
||||
|
||||
if (i !== -1) {
|
||||
var path = line.substring(i + 1, line.length);
|
||||
path = $.trim(path);
|
||||
if (prefixes.length > 0 && path.substr(0, 1) === '.') {
|
||||
path = prefixes.join('.') + path;
|
||||
}
|
||||
} else {
|
||||
var path = line;
|
||||
if (prefixes.length > 0) {
|
||||
path = prefixes.join('.') + '.' + path;
|
||||
path = path.replace(/\s/g, '');
|
||||
}
|
||||
}
|
||||
var lastDot = path.lastIndexOf('.');
|
||||
path = path.substring(0, lastDot);
|
||||
}
|
||||
return TsParser.getTreeNode(path);
|
||||
};
|
||||
|
||||
/**
|
||||
* Iterates through the object tree, and creates treenodes
|
||||
* along the path, if necessary
|
||||
*
|
||||
* @param {String} path
|
||||
* @returns {Object}
|
||||
*/
|
||||
TsParser.getTreeNode = function(path) {
|
||||
path = $.trim(path);
|
||||
if (path.length === 0) {
|
||||
return TsParser.tsTree;
|
||||
}
|
||||
var aPath = path.split('.');
|
||||
|
||||
var subTree = TsParser.tsTree.childNodes,
|
||||
pathSeg,
|
||||
parent = TsParser.tsTree;
|
||||
|
||||
// step through the path from left to right
|
||||
for (var i = 0; i < aPath.length; i++) {
|
||||
pathSeg = aPath[i];
|
||||
|
||||
// if there isn't already a treenode
|
||||
if (typeof subTree[pathSeg] === 'undefined' || typeof subTree[pathSeg].childNodes === 'undefined') { // if this subpath is not defined in the code
|
||||
// create a new treenode
|
||||
subTree[pathSeg] = new TsParser.treeNode(pathSeg);
|
||||
subTree[pathSeg].parent = parent;
|
||||
// the extPath has to be set, so the TreeNode can retrieve the respecting node in the external templates
|
||||
var extPath = parent.extPath;
|
||||
if (extPath) {
|
||||
extPath += '.';
|
||||
}
|
||||
extPath += pathSeg;
|
||||
subTree[pathSeg].extPath = extPath;
|
||||
}
|
||||
if (i === aPath.length - 1) {
|
||||
return subTree[pathSeg];
|
||||
}
|
||||
parent = subTree[pathSeg];
|
||||
subTree = subTree[pathSeg].childNodes;
|
||||
}
|
||||
};
|
||||
|
||||
/**
|
||||
* Navigates to the respecting treenode,
|
||||
* create nodes in the path, if necessary, and sets the value
|
||||
*
|
||||
* @param {String} path
|
||||
* @param {String} value
|
||||
*/
|
||||
TsParser.setTreeNodeValue = function(path, value) {
|
||||
var treeNode = TsParser.getTreeNode(path);
|
||||
// if we are inside a GIFBUILDER Object
|
||||
if (treeNode.parent !== null && (treeNode.parent.value === "GIFBUILDER" || treeNode.parent.getValue() === "GMENU_itemState") && value === "TEXT") {
|
||||
value = 'GB_TEXT';
|
||||
}
|
||||
if (treeNode.parent !== null && (treeNode.parent.value === "GIFBUILDER" || treeNode.parent.getValue() === "GMENU_itemState") && value === "IMAGE") {
|
||||
value = 'GB_IMAGE';
|
||||
}
|
||||
|
||||
// just override if it is a real objecttype
|
||||
if (TsParser.tsRef.isType(value)) {
|
||||
treeNode.value = value;
|
||||
}
|
||||
};
|
||||
|
||||
/**
|
||||
* Navigates to the respecting treenode,
|
||||
* creates nodes if necessary, empties the value and childNodes-Array
|
||||
*
|
||||
* @param {String} path
|
||||
*/
|
||||
TsParser.deleteTreeNodeValue = function(path) {
|
||||
var treeNode = TsParser.getTreeNode(path);
|
||||
// currently the node is not deleted really, it's just not displayed cause value == null
|
||||
// deleting it would be a cleaner solution
|
||||
treeNode.value = null;
|
||||
treeNode.childNodes = {};
|
||||
};
|
||||
|
||||
/**
|
||||
* Copies a reference of the treeNode specified by path2
|
||||
* to the location specified by path1
|
||||
*
|
||||
* @param {String} path1
|
||||
* @param {String} path2
|
||||
*/
|
||||
TsParser.setReference = function(path1, path2) {
|
||||
var path1arr = path1.split('.'),
|
||||
lastNodeName = path1arr[path1arr.length - 1],
|
||||
treeNode1 = TsParser.getTreeNode(path1),
|
||||
treeNode2 = TsParser.getTreeNode(path2);
|
||||
|
||||
if (treeNode1.parent !== null) {
|
||||
treeNode1.parent.childNodes[lastNodeName] = treeNode2;
|
||||
} else {
|
||||
TsParser.tsTree.childNodes[lastNodeName] = treeNode2;
|
||||
}
|
||||
};
|
||||
|
||||
/**
|
||||
* copies a treeNode specified by path2
|
||||
* to the location specified by path1
|
||||
*
|
||||
* @param {String} path1
|
||||
* @param {String} path2
|
||||
*/
|
||||
TsParser.setCopy = function(path1, path2) {
|
||||
this.clone = function(myObj) {
|
||||
if (typeof myObj !== 'object') {
|
||||
return myObj;
|
||||
}
|
||||
|
||||
var myNewObj = {};
|
||||
for (var i in myObj) {
|
||||
// disable recursive cloning for parent object -> copy by reference
|
||||
if (i !== 'parent') {
|
||||
if (typeof myObj[i] === 'object') {
|
||||
myNewObj[i] = this.clone(myObj[i]);
|
||||
} else {
|
||||
myNewObj[i] = myObj[i];
|
||||
}
|
||||
} else {
|
||||
myNewObj.parent = myObj.parent;
|
||||
}
|
||||
}
|
||||
return myNewObj;
|
||||
};
|
||||
|
||||
var path1arr = path1.split('.'),
|
||||
lastNodeName = path1arr[path1arr.length - 1],
|
||||
treeNode1 = TsParser.getTreeNode(path1),
|
||||
treeNode2 = TsParser.getTreeNode(path2);
|
||||
|
||||
if (treeNode1.parent !== null) {
|
||||
treeNode1.parent.childNodes[lastNodeName] = this.clone(treeNode2);
|
||||
} else {
|
||||
TsParser.tsTree.childNodes[lastNodeName] = this.clone(treeNode2);
|
||||
}
|
||||
};
|
||||
|
||||
return TsParser;
|
||||
});
|
||||
@@ -0,0 +1,176 @@
|
||||
/*
|
||||
* This file is part of the TYPO3 CMS project.
|
||||
*
|
||||
* It is free software; you can redistribute it and/or modify it under
|
||||
* the terms of the GNU General Public License, either version 2
|
||||
* of the License, or any later version.
|
||||
*
|
||||
* For the full copyright and license information, please read the
|
||||
* LICENSE.txt file that was distributed with this source code.
|
||||
*
|
||||
* The TYPO3 project - inspiring people to share!
|
||||
*/
|
||||
|
||||
/**
|
||||
* Module: TYPO3/CMS/T3editor/CodeCompletion/TsRef
|
||||
* Contains the TsCodeCompletion class
|
||||
*/
|
||||
define(['jquery'], function($) {
|
||||
/**
|
||||
*
|
||||
* @type {{typeId: null, properties: null, typeTree: Array, doc: null}}
|
||||
* @exports TYPO3/CMS/T3editor/CodeCompletion/TsRef
|
||||
*/
|
||||
var TsRef = {
|
||||
typeId: null,
|
||||
properties: null,
|
||||
typeTree: [],
|
||||
doc: null
|
||||
};
|
||||
|
||||
/**
|
||||
* Prototypes a TS reference type object
|
||||
*
|
||||
* @param {String} typeId
|
||||
*/
|
||||
TsRef.TsRefType = function(typeId) {
|
||||
this.typeId = typeId;
|
||||
this.properties = [];
|
||||
};
|
||||
|
||||
/**
|
||||
* Prototypes a TS reference property object
|
||||
*
|
||||
* @param {String} parentType
|
||||
* @param {String} name
|
||||
* @param {String} value
|
||||
* @constructor
|
||||
*/
|
||||
TsRef.TsRefProperty = function(parentType, name, value) {
|
||||
this.parentType = parentType;
|
||||
this.name = name;
|
||||
this.value = value;
|
||||
};
|
||||
|
||||
/**
|
||||
* Load available TypoScript reference
|
||||
*/
|
||||
TsRef.loadTsrefAsync = function() {
|
||||
$.ajax({
|
||||
url: TYPO3.settings.ajaxUrls['t3editor_tsref'],
|
||||
success: function(response) {
|
||||
TsRef.doc = response;
|
||||
TsRef.buildTree();
|
||||
}
|
||||
});
|
||||
};
|
||||
|
||||
/**
|
||||
* Build the TypoScript reference tree
|
||||
*/
|
||||
TsRef.buildTree = function() {
|
||||
for (var typeId in TsRef.doc) {
|
||||
var arr = TsRef.doc[typeId];
|
||||
TsRef.typeTree[typeId] = new TsRef.TsRefType(typeId);
|
||||
|
||||
if (typeof arr['extends'] !== 'undefined') {
|
||||
TsRef.typeTree[typeId]['extends'] = arr['extends'];
|
||||
}
|
||||
for (var propName in arr.properties) {
|
||||
var propType = arr.properties[propName].type;
|
||||
TsRef.typeTree[typeId].properties[propName] = new TsRef.TsRefProperty(typeId, propName, propType);
|
||||
}
|
||||
}
|
||||
for (var typeId in TsRef.typeTree) {
|
||||
if (typeof TsRef.typeTree[typeId]['extends'] !== 'undefined') {
|
||||
TsRef.addPropertiesToType(TsRef.typeTree[typeId], TsRef.typeTree[typeId]['extends'], 100);
|
||||
}
|
||||
}
|
||||
};
|
||||
|
||||
/**
|
||||
* Adds properties to TypoScript types
|
||||
*
|
||||
* @param {String} addToType
|
||||
* @param {String} addFromTypeNames
|
||||
* @param {Number} maxRecDepth
|
||||
*/
|
||||
TsRef.addPropertiesToType = function(addToType, addFromTypeNames, maxRecDepth) {
|
||||
if (maxRecDepth < 0) {
|
||||
throw "Maximum recursion depth exceeded while trying to resolve the extends in the TSREF!";
|
||||
return;
|
||||
}
|
||||
var exts = addFromTypeNames.split(','),
|
||||
i;
|
||||
for (i = 0; i < exts.length; i++) {
|
||||
// "Type 'array' which is used to extend 'undefined', was not found in the TSREF!"
|
||||
if (typeof TsRef.typeTree[exts[i]] !== 'undefined') {
|
||||
if (typeof TsRef.typeTree[exts[i]]['extends'] !== 'undefined') {
|
||||
TsRef.addPropertiesToType(TsRef.typeTree[exts[i]], TsRef.typeTree[exts[i]]['extends'], maxRecDepth - 1);
|
||||
}
|
||||
var properties = TsRef.typeTree[exts[i]].properties;
|
||||
for (var propName in properties) {
|
||||
// only add this property if it was not already added by a supertype (subtypes override supertypes)
|
||||
if (typeof addToType.properties[propName] === 'undefined') {
|
||||
addToType.properties[propName] = properties[propName];
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
};
|
||||
|
||||
/**
|
||||
* Get properties from given TypoScript type id
|
||||
*
|
||||
* @param {String} tId
|
||||
* @return {Array}
|
||||
*/
|
||||
TsRef.getPropertiesFromTypeId = function(tId) {
|
||||
if (typeof TsRef.typeTree[tId] !== 'undefined') {
|
||||
// clone is needed to assure that nothing of the tsref is overwritten by user setup
|
||||
TsRef.typeTree[tId].properties.clone = function() {
|
||||
var result = [];
|
||||
for (key in this) {
|
||||
result[key] = new TsRef.TsRefProperty(this[key].parentType, this[key].name, this[key].value);
|
||||
}
|
||||
return result;
|
||||
}
|
||||
return TsRef.typeTree[tId].properties;
|
||||
}
|
||||
return [];
|
||||
};
|
||||
|
||||
/**
|
||||
* Check if a property of a type exists
|
||||
*
|
||||
* @param {String} typeId
|
||||
* @param {String} propertyName
|
||||
* @return {Boolean}
|
||||
*/
|
||||
TsRef.typeHasProperty = function(typeId, propertyName) {
|
||||
return typeof TsRef.typeTree[typeId] !== 'undefined'
|
||||
&& typeof TsRef.typeTree[typeId].properties[propertyName] !== 'undefined';
|
||||
};
|
||||
|
||||
/**
|
||||
* Get the type
|
||||
*
|
||||
* @param {String} typeId
|
||||
* @return {Object}
|
||||
*/
|
||||
TsRef.getType = function(typeId) {
|
||||
return TsRef.typeTree[typeId];
|
||||
};
|
||||
|
||||
/**
|
||||
* Check if type exists in the type tree
|
||||
*
|
||||
* @param {String} typeId
|
||||
* @return {Boolean}
|
||||
*/
|
||||
TsRef.isType = function(typeId) {
|
||||
return typeof TsRef.typeTree[typeId] !== 'undefined';
|
||||
};
|
||||
|
||||
return TsRef;
|
||||
});
|
||||
@@ -0,0 +1,105 @@
|
||||
// CodeMirror, copyright (c) by Marijn Haverbeke and others
|
||||
// Distributed under an MIT license: http://codemirror.net/LICENSE
|
||||
|
||||
(function(mod) {
|
||||
if (typeof exports === 'object' && typeof module === 'object') // CommonJS
|
||||
mod(require('cm/lib/codemirror', 'TYPO3/CMS/T3editor/Addon/Hint/TsCodeCompletion'));
|
||||
else if (typeof define === 'function' && define.amd) // AMD
|
||||
define(['cm/lib/codemirror', 'TYPO3/CMS/T3editor/Addon/Hint/TsCodeCompletion'], mod);
|
||||
else // Plain browser env
|
||||
mod(CodeMirror);
|
||||
})(function(CodeMirror, TsCodeCompletion) {
|
||||
var Pos = CodeMirror.Pos;
|
||||
|
||||
CodeMirror.registerHelper('hint', 'typoscript', function(editor, options) {
|
||||
return typoScriptHint(editor, function(e, cur) {
|
||||
return e.getTokenAt(cur);
|
||||
}, options);
|
||||
});
|
||||
|
||||
function arrayContains(arr, item) {
|
||||
if (!Array.prototype.indexOf) {
|
||||
var i = arr.length;
|
||||
while (i--) {
|
||||
if (arr[i] === item) {
|
||||
return true;
|
||||
}
|
||||
}
|
||||
return false;
|
||||
}
|
||||
return arr.indexOf(item) !== -1;
|
||||
}
|
||||
|
||||
function typoScriptHint(editor, getToken) {
|
||||
var keywords = TsCodeCompletion.refreshCodeCompletion(editor);
|
||||
|
||||
// Find the token at the cursor
|
||||
var cur = editor.getCursor(),
|
||||
token = getToken(editor, cur);
|
||||
|
||||
if (/\b(?:string|comment)\b/.test(token.type) && tokenIsSubStringOfKeywords(token, keywords)) {
|
||||
return;
|
||||
}
|
||||
token.state = CodeMirror.innerMode(editor.getMode(), token.state).state;
|
||||
|
||||
// If it's not a 'word-style' token, ignore the token.
|
||||
if (!/^[\w$_]*$/.test(token.string)) {
|
||||
token = {
|
||||
start: cur.ch, end: cur.ch, string: '', state: token.state,
|
||||
type: token.string === '.' ? 'property' : null
|
||||
};
|
||||
} else if (token.end > cur.ch) {
|
||||
token.end = cur.ch;
|
||||
token.string = token.string.slice(0, cur.ch - token.start);
|
||||
}
|
||||
|
||||
var completions = {
|
||||
list: getCompletions(token, keywords),
|
||||
from: Pos(cur.line, token.start),
|
||||
to: Pos(cur.line, token.end)
|
||||
};
|
||||
|
||||
CodeMirror.on(completions, 'pick', function() {
|
||||
TsCodeCompletion.resetCompList();
|
||||
});
|
||||
|
||||
return completions;
|
||||
}
|
||||
|
||||
function tokenIsSubStringOfKeywords(token, keywords) {
|
||||
var tokenLength = token.string.length;
|
||||
for (var i = 0; i < keywords.length; ++i) {
|
||||
if (token.string === keywords[i].substr(tokenLength)) {
|
||||
return true;
|
||||
}
|
||||
}
|
||||
|
||||
return false;
|
||||
}
|
||||
|
||||
function getCompletions(token, keywords) {
|
||||
var found = [],
|
||||
start = token.string;
|
||||
|
||||
function maybeAdd(str) {
|
||||
if (str.lastIndexOf(start, 0) === 0 && !arrayContains(found, str)) {
|
||||
found.push(str);
|
||||
}
|
||||
}
|
||||
|
||||
// If not, just look in the global object and any local scope
|
||||
// (reading into JS mode internals to get at the local and global variables)
|
||||
for (var v = token.state.localVars; v; v = v.next) {
|
||||
maybeAdd(v.name);
|
||||
}
|
||||
for (var v = token.state.globalVars; v; v = v.next) {
|
||||
maybeAdd(v.name);
|
||||
}
|
||||
for (var i = 0, e = keywords.length; i < e; ++i) {
|
||||
maybeAdd(keywords[i]);
|
||||
}
|
||||
found.sort();
|
||||
|
||||
return found;
|
||||
}
|
||||
});
|
||||
@@ -0,0 +1,938 @@
|
||||
List of CodeMirror contributors. Updated before every release.
|
||||
|
||||
4oo4
|
||||
4r2r
|
||||
Aaron Brooks
|
||||
Abdelouahab
|
||||
Abdussalam Abdurrahman
|
||||
Abe Fettig
|
||||
Abhishek Gahlot
|
||||
Adam Ahmed
|
||||
Adam King
|
||||
Adam Particka
|
||||
Adam Wight
|
||||
adanlobato
|
||||
Adán Lobato
|
||||
Aditya Toshniwal
|
||||
Adrian Aichner
|
||||
Adrian Heine
|
||||
Adrian Kunz
|
||||
Adrien Bertrand
|
||||
aeroson
|
||||
Ahmad Amireh
|
||||
Ahmad M. Zawawi
|
||||
ahoward
|
||||
Ajin Abraham
|
||||
Akeksandr Motsjonov
|
||||
Alasdair Smith
|
||||
AlbertHilb
|
||||
Alberto González Palomo
|
||||
Alberto Pose
|
||||
Albert Xing
|
||||
Alexander Marks
|
||||
Alexander Pavlov
|
||||
Alexander Schepanovski
|
||||
Alexander Shvets
|
||||
Alexander Solovyov
|
||||
Alexandre Bique
|
||||
Alex Churchill
|
||||
alexey-k
|
||||
Alex Piggott
|
||||
Alf Eaton
|
||||
Aliaksei Chapyzhenka
|
||||
Allen Sarkisyan
|
||||
Ami Fischman
|
||||
Amin Shali
|
||||
Amin Ullah Khan
|
||||
amshali@google.com
|
||||
Amsul
|
||||
amuntean
|
||||
Amy
|
||||
Ananya Sen
|
||||
anaran
|
||||
AndersMad
|
||||
Anders Nawroth
|
||||
Anderson Mesquita
|
||||
Anders Wåglund
|
||||
Andrea G
|
||||
Andreas Reischuck
|
||||
Andres Taylor
|
||||
Andre von Houck
|
||||
Andrew Cheng
|
||||
Andrew Dassonville
|
||||
Andrey Fedorov
|
||||
Andrey Klyuchnikov
|
||||
Andrey Lushnikov
|
||||
Andrey Shchekin
|
||||
Andy Joslin
|
||||
Andy Kimball
|
||||
Andy Li
|
||||
Angelo
|
||||
angelozerr
|
||||
angelo.zerr@gmail.com
|
||||
Ankit
|
||||
Ankit Ahuja
|
||||
Ansel Santosa
|
||||
Anthony Dugois
|
||||
anthonygego
|
||||
Anthony Gégo
|
||||
Anthony Grimes
|
||||
Anton Kovalyov
|
||||
antosarho
|
||||
Apollo Zhu
|
||||
AQNOUCH Mohammed
|
||||
Aram Shatakhtsyan
|
||||
areos
|
||||
Arnab Bose
|
||||
Arnoud Buzing
|
||||
Arsène von Wyss
|
||||
Arthur Müller
|
||||
Arun Narasani
|
||||
as3boyan
|
||||
asolove
|
||||
atelierbram
|
||||
AtomicPages LLC
|
||||
Atul Bhouraskar
|
||||
Aurelian Oancea
|
||||
Axel Lewenhaupt
|
||||
Baptiste Augrain
|
||||
Barret Rennie
|
||||
Bartosz Dziewoński
|
||||
Basarat Ali Syed
|
||||
Bastian Müller
|
||||
belhaj
|
||||
Bem Jones-Bey
|
||||
benbro
|
||||
Benedikt Meurer
|
||||
benhormann
|
||||
Ben Hormann
|
||||
Beni Cherniavsky-Paskin
|
||||
Benjamin DeCoste
|
||||
Benjamin Young
|
||||
Ben Keen
|
||||
Ben Miller
|
||||
Ben Mosher
|
||||
Bernhard Sirlinger
|
||||
Bert Chang
|
||||
Bharad
|
||||
BigBlueHat
|
||||
Billy Moon
|
||||
Bin Ni
|
||||
binny
|
||||
Bjorn Hansen
|
||||
B Krishna Chaitanya
|
||||
Blaine G
|
||||
blukat29
|
||||
Bo
|
||||
boomyjee
|
||||
Bo Peng
|
||||
borawjm
|
||||
Boris K
|
||||
Brad Metcalf
|
||||
Brandon Frohs
|
||||
Brandon Wamboldt
|
||||
Bret Little
|
||||
Brett Zamir
|
||||
Brian Grinstead
|
||||
BrianHung
|
||||
Brian Sletten
|
||||
brrd
|
||||
Bruce Mitchener
|
||||
Bruno Logerfo
|
||||
Bryan Gin-ge Chen
|
||||
Bryan Massoth
|
||||
Caitlin Potter
|
||||
Calin Barbat
|
||||
callodacity
|
||||
Camilo Roca
|
||||
Casey Klebba
|
||||
cBiscuit87
|
||||
César González Íñiguez
|
||||
Chad Jolly
|
||||
Chandra Sekhar Pydi
|
||||
Charles Skelton
|
||||
Cheah Chu Yeow
|
||||
Chhekur
|
||||
Chris Colborne
|
||||
Chris Coyier
|
||||
Chris Ford
|
||||
Chris Granger
|
||||
Chris Houseknecht
|
||||
Chris Lohfink
|
||||
Chris Morgan
|
||||
Chris Reeves
|
||||
Chris Smith
|
||||
Christian Gruen
|
||||
Christian Oyarzun
|
||||
Christian Petrov
|
||||
christopherblaser
|
||||
Christopher Brown
|
||||
Christopher Kramer
|
||||
Christopher Mitchell
|
||||
Christopher Pfohl
|
||||
Christopher Wallis
|
||||
Chunliang Lyu
|
||||
ciaranj
|
||||
clone-it
|
||||
clso
|
||||
CodeAnimal
|
||||
CodeBitt
|
||||
coderaiser
|
||||
Cole R Lawrence
|
||||
ComFreek
|
||||
Cornelius Weig
|
||||
Cristian Prieto
|
||||
Curran Kelleher
|
||||
Curtis Gagliardi
|
||||
d8888
|
||||
dagsta
|
||||
daines
|
||||
Dale Jung
|
||||
Dan Bentley
|
||||
Dan Heberden
|
||||
Daniel, Dao Quang Minh
|
||||
Daniele Di Sarli
|
||||
Daniel Faust
|
||||
Daniel Hanggi
|
||||
Daniel Huigens
|
||||
Daniel Kesler
|
||||
Daniel KJ
|
||||
Daniel Neel
|
||||
Daniel Parnell
|
||||
Daniel Thwaites
|
||||
Danila Malyutin
|
||||
Danny Yoo
|
||||
darealshinji
|
||||
Darius Roberts
|
||||
databricks-david-lewis
|
||||
Dave Brondsema
|
||||
Dave MacLachlan
|
||||
Dave Myers
|
||||
David Barnett
|
||||
David H. Bronke
|
||||
David Mignot
|
||||
David Pathakjee
|
||||
David R. Myers
|
||||
David Rodrigues
|
||||
David Santana
|
||||
David Vázquez
|
||||
David Whittington
|
||||
deebugger
|
||||
Deep Thought
|
||||
Denis Ovsienko
|
||||
Devin Abbott
|
||||
Devon Carew
|
||||
Dick Choi
|
||||
Diego Fernandez
|
||||
dignifiedquire
|
||||
Dimage Sapelkin
|
||||
Dimitri Mitropoulos
|
||||
Dinindu D. Wanniarachchi
|
||||
dmaclach
|
||||
Dmitry Kiselyov
|
||||
domagoj412
|
||||
Dominator008
|
||||
Domizio Demichelis
|
||||
Doug Blank
|
||||
Doug Wikle
|
||||
Drew Bratcher
|
||||
Drew Hintz
|
||||
Drew Khoury
|
||||
Drini Cami
|
||||
Dror BG
|
||||
Duncan Lilley
|
||||
duralog
|
||||
dwelle
|
||||
Ealton
|
||||
eborden
|
||||
edoroshenko
|
||||
edsharp
|
||||
ekhaled
|
||||
Elisée
|
||||
Elmar Peise
|
||||
elpnt
|
||||
Emmanuel Schanzer
|
||||
Enam Mijbah Noor
|
||||
Eric Allam
|
||||
Eric Bogard
|
||||
Erik Demaine
|
||||
Erik Welander
|
||||
erosman
|
||||
eustas
|
||||
Evan Minsk
|
||||
Fabien Dubosson
|
||||
Fabien O'Carroll
|
||||
Fabio Zendhi Nagao
|
||||
Faiza Alsaied
|
||||
Fauntleroy
|
||||
fbuchinger
|
||||
feizhang365
|
||||
Felipe Lalanne
|
||||
Felipe S. S. Schneider
|
||||
Felix Raab
|
||||
ficristo
|
||||
Filip Noetzel
|
||||
Filip Stollár
|
||||
Filype Pereira
|
||||
finalfantasia
|
||||
flack
|
||||
Florian Felten
|
||||
Fons van der Plas
|
||||
Forbes Lindesay
|
||||
ForbesLindesay
|
||||
Ford_Lawnmower
|
||||
Forrest Oliphant
|
||||
Franco Catena
|
||||
Frank Seifferth
|
||||
Frank Wiegand
|
||||
fraxx001
|
||||
Fredrik Borg
|
||||
FUJI Goro (gfx)
|
||||
Gabriel Gheorghian
|
||||
Gabriel Horner
|
||||
Gabriel Nahmias
|
||||
galambalazs
|
||||
Gary Sheng
|
||||
Gautam Mehta
|
||||
Gavin Douglas
|
||||
gekkoe
|
||||
Geordie Hall
|
||||
George Stephanis
|
||||
geowarin
|
||||
Gerard Braad
|
||||
Gergely Hegykozi
|
||||
Germain Chazot
|
||||
Giovanni Calò
|
||||
Glebov Boris
|
||||
Glenn Jorde
|
||||
Glenn Ruehle
|
||||
goldsmcb
|
||||
Golevka
|
||||
Google LLC
|
||||
Gordon Smith
|
||||
Grant Skinner
|
||||
greengiant
|
||||
Gregory Koberger
|
||||
Grzegorz Mazur
|
||||
Guang Li
|
||||
Guan Gui
|
||||
Guillaume Massé
|
||||
Guillaume Massé
|
||||
guraga
|
||||
Gustavo Rodrigues
|
||||
Hakan Tunc
|
||||
Hanno Fellmann
|
||||
Hans Engel
|
||||
Hanzhao Deng
|
||||
Haoran Yu
|
||||
Harald Schilly
|
||||
Hardest
|
||||
Harshvardhan Gupta
|
||||
Hasan Delibaş
|
||||
Hasan Karahan
|
||||
Heanes
|
||||
Hector Oswaldo Caballero
|
||||
Hein Htat
|
||||
Hélio
|
||||
Hendrik Erz
|
||||
Hendrik Wallbaum
|
||||
Henrik Haugbølle
|
||||
Herculano Campos
|
||||
hidaiy
|
||||
Hiroyuki Makino
|
||||
hitsthings
|
||||
Hocdoc
|
||||
Howard
|
||||
Howard Jing
|
||||
Hugues Malphettes
|
||||
Ian Beck
|
||||
Ian Davies
|
||||
Ian Dickinson
|
||||
Ian Henderson
|
||||
ianhi
|
||||
Ian Rose
|
||||
Ian Wehrman
|
||||
Ian Wetherbee
|
||||
Ice White
|
||||
ICHIKAWA, Yuji
|
||||
idleberg
|
||||
Igor Petruk
|
||||
ilvalle
|
||||
Ilya Kharlamov
|
||||
Ilya Zverev
|
||||
Ingo Richter
|
||||
Intervue
|
||||
Irakli Gozalishvili
|
||||
iteriani
|
||||
Ivan Kurnosov
|
||||
Ivoah
|
||||
Jack Douglas
|
||||
Jacob Lee
|
||||
Jaimin
|
||||
Jake Peyser
|
||||
Jakob Kummerow
|
||||
Jakob Miland
|
||||
Jakub T. Jankiewicz
|
||||
Jakub Vrana
|
||||
Jakub Vrána
|
||||
James Campos
|
||||
James Cockshull
|
||||
James Howard
|
||||
James Thorne
|
||||
Jamie Hill
|
||||
Jamie Morris
|
||||
Janice Leung
|
||||
Jan Jongboom
|
||||
jankeromnes
|
||||
Jan Keromnes
|
||||
Jan Odvarko
|
||||
Jan Schär
|
||||
Jan T. Sott
|
||||
Jared Dean
|
||||
Jared Forsyth
|
||||
Jared Jacobs
|
||||
Jason
|
||||
Jason Barnabe
|
||||
Jason Grout
|
||||
Jason Heeris
|
||||
Jason Johnston
|
||||
Jason San Jose
|
||||
Jason Siefken
|
||||
Jayaprabhakar
|
||||
Jay Contonio
|
||||
Jaydeep Solanki
|
||||
Jean Boussier
|
||||
Jeff Blaisdell
|
||||
Jeff Hanke
|
||||
Jeff Jenkins
|
||||
jeffkenton
|
||||
Jeff Pickhardt
|
||||
jem (graphite)
|
||||
Jeremy Parmenter
|
||||
Jim
|
||||
Jim Avery
|
||||
jkaplon
|
||||
JobJob
|
||||
jochenberger
|
||||
Jochen Berger
|
||||
Joel Einbinder
|
||||
joelpinheiro
|
||||
Joe Predham
|
||||
joewalsh
|
||||
Johan Ask
|
||||
Johannes
|
||||
John Chen
|
||||
John Connor
|
||||
John-David Dalton
|
||||
John Engler
|
||||
John Lees-Miller
|
||||
John Ryan
|
||||
John Snelson
|
||||
John Van Der Loo
|
||||
Jon Ander Peñalba
|
||||
Jonas Döbertin
|
||||
Jonas Helfer
|
||||
Jonathan Dierksen
|
||||
Jonathan Hart
|
||||
Jonathan Malmaud
|
||||
Jonathan Rascher
|
||||
Jon Gacnik
|
||||
jongalloway
|
||||
Jon Malmaud
|
||||
Jon Sangster
|
||||
Joo
|
||||
Joost-Wim Boekesteijn
|
||||
José dBruxelles
|
||||
Joseph Pecoraro
|
||||
Josh Barnes
|
||||
Josh Cohen
|
||||
Josh Soref
|
||||
Joshua Newman
|
||||
Josh Watzman
|
||||
jots
|
||||
Joy Zhong
|
||||
jsoojeon
|
||||
ju1ius
|
||||
Juan Benavides Romero
|
||||
Jucovschi Constantin
|
||||
Juho Vuori
|
||||
Julien CROUZET
|
||||
Julien Rebetez
|
||||
Justin Andresen
|
||||
Justin Hileman
|
||||
jwallers@gmail.com
|
||||
kaniga
|
||||
karevn
|
||||
Karol
|
||||
Kaushik Kulkarni
|
||||
Kayur Patel
|
||||
Kazuhito Hokamura
|
||||
kcwiakala
|
||||
Kees de Kooter
|
||||
Kenan Christian Dimas
|
||||
Ken Newman
|
||||
ken restivo
|
||||
Ken Rockot
|
||||
Kevin Earls
|
||||
Kevin Kwok
|
||||
Kevin Muret
|
||||
Kevin Sawicki
|
||||
Kevin Ushey
|
||||
Kier Darby
|
||||
Kim-Anh Tran
|
||||
Klaus Silveira
|
||||
Koh Zi Han, Cliff
|
||||
komakino
|
||||
Konstantin Chernenko
|
||||
Konstantin Lopuhin
|
||||
koops
|
||||
Kris Ciccarello
|
||||
ks-ifware
|
||||
kubelsmieci
|
||||
kvncp
|
||||
KwanEsq
|
||||
Kyle Kelley
|
||||
KyleMcNutt
|
||||
LaKing
|
||||
Lanfei
|
||||
Lanny
|
||||
laobubu
|
||||
Laszlo Vidacs
|
||||
leaf
|
||||
leaf corcoran
|
||||
Lemmon
|
||||
Leo Baschy
|
||||
Leonid Khachaturov
|
||||
Leon Sorokin
|
||||
Leonya Khachaturov
|
||||
lexer2086
|
||||
Liam Newman
|
||||
Libo Cannici
|
||||
Lior Goldberg
|
||||
Lior Shub
|
||||
lishid
|
||||
LloydMilligan
|
||||
LM
|
||||
lochel
|
||||
Lonnie Abelbeck
|
||||
Lorenzo Simionato
|
||||
Lorenzo Stoakes
|
||||
Louis Mauchet
|
||||
Luca Fabbri
|
||||
Lucas Buchala
|
||||
Luciano Longo
|
||||
Luciano Santana
|
||||
Lu Fangjian
|
||||
Łukasz Wielgus
|
||||
Luke Browning
|
||||
Luke Granger-Brown
|
||||
Luke Stagner
|
||||
lynschinzer
|
||||
M1cha
|
||||
Madhura Jayaratne
|
||||
Maksim Lin
|
||||
Maksym Taran
|
||||
Malay Majithia
|
||||
Manideep
|
||||
Manuel Rego Casasnovas
|
||||
Marat Dreizin
|
||||
Marcel Gerber
|
||||
Marcelo Camargo
|
||||
Marc Espín
|
||||
Marco Aurélio
|
||||
Marco Munizaga
|
||||
Marcus Bointon
|
||||
Marek Rudnicki
|
||||
Marijn Haverbeke
|
||||
Mário Gonçalves
|
||||
Mario Pietsch
|
||||
Mark Anderson
|
||||
Mark Boyes
|
||||
Mark Dalgleish
|
||||
Mark Hamstra
|
||||
Mark Lentczner
|
||||
Marko Bonaci
|
||||
Mark Peace
|
||||
Markus Bordihn
|
||||
Markus Olsson
|
||||
Martin Balek
|
||||
Martín Gaitán
|
||||
Martin Hasoň
|
||||
Martin Hunt
|
||||
Martin Laine
|
||||
Martin Zagora
|
||||
Masahiro MATAYOSHI
|
||||
Mason Malone
|
||||
Mateusz Paprocki
|
||||
Mathias Bynens
|
||||
mats cronqvist
|
||||
Matt Diehl
|
||||
Matt Gaide
|
||||
Matthew Bauer
|
||||
Matthew Beale
|
||||
Matthew Casperson
|
||||
matthewhayes
|
||||
Matthew Rathbone
|
||||
Matthew Suozzo
|
||||
Matthias Bussonnier
|
||||
Matthias BUSSONNIER
|
||||
Mattia Astorino
|
||||
Matt MacPherson
|
||||
Matt McDonald
|
||||
Matt Pass
|
||||
Matt Sacks
|
||||
mauricio
|
||||
Maximilian Hils
|
||||
Maxim Kraev
|
||||
Max Kirsch
|
||||
Max Schaefer
|
||||
Max Wu
|
||||
Max Xiantu
|
||||
mbarkhau
|
||||
McBrainy
|
||||
mce2
|
||||
Mélanie Chauvel
|
||||
melpon
|
||||
meshuamam
|
||||
Metatheos
|
||||
Micah Dubinko
|
||||
Michael
|
||||
Michael Chirico
|
||||
Michael Goderbauer
|
||||
Michael Grey
|
||||
Michael Kaminsky
|
||||
Michael Lehenbauer
|
||||
Michael Wadman
|
||||
Michael Walker
|
||||
Michael Zhou
|
||||
Michal Čihař
|
||||
Michal Dorner
|
||||
Michal Kapiczynski
|
||||
Mighty Guava
|
||||
Miguel Castillo
|
||||
mihailik
|
||||
Mika Andrianarijaona
|
||||
Mike
|
||||
Mike Bostock
|
||||
Mike Brevoort
|
||||
Mike Diaz
|
||||
Mike Ivanov
|
||||
Mike Kadin
|
||||
Mike Kobit
|
||||
Milan Szekely
|
||||
MinRK
|
||||
Miraculix87
|
||||
misfo
|
||||
mkaminsky11
|
||||
mloginov
|
||||
mlsad3
|
||||
Moritz Schubotz (physikerwelt)
|
||||
Moritz Schwörer
|
||||
Moshe Wajnberg
|
||||
mps
|
||||
ms
|
||||
mtaran-google
|
||||
Mu-An ✌️ Chiou
|
||||
Mu-An Chiou
|
||||
mzabuawala
|
||||
Narciso Jaramillo
|
||||
nathanlesage
|
||||
Nathan Williams
|
||||
ndr
|
||||
Neil Anderson
|
||||
neon-dev
|
||||
nerbert
|
||||
NetworkNode
|
||||
nextrevision
|
||||
ngn
|
||||
nguillaumin
|
||||
Ng Zhi An
|
||||
Nicholas Bollweg
|
||||
Nicholas Bollweg (Nick)
|
||||
NickKolok
|
||||
Nick Kreeger
|
||||
Nick Small
|
||||
Nicolas Chevobbe
|
||||
Nicolas Kick
|
||||
Nicolò Ribaudo
|
||||
Niels van Groningen
|
||||
nightwing
|
||||
Nikita Beloglazov
|
||||
Nikita Vasilyev
|
||||
Nikolaj Kappler
|
||||
Nikolay Kostov
|
||||
nilp0inter
|
||||
Nils Knappmeier
|
||||
Nina Pypchenko
|
||||
Nisarg Jhaveri
|
||||
nlwillia
|
||||
noragrossman
|
||||
Norman Rzepka
|
||||
Nouzbe
|
||||
Oleksandr Yakovenko
|
||||
Olivia Ytterbrink
|
||||
Opender Singh
|
||||
opl-
|
||||
Oreoluwa Onatemowo
|
||||
orionlee
|
||||
oscar.lofwenhamn
|
||||
Oskar Segersvärd
|
||||
ossdev
|
||||
overdodactyl
|
||||
pablo
|
||||
pabloferz
|
||||
Pablo Zubieta
|
||||
paddya
|
||||
Page
|
||||
paladox
|
||||
Panupong Pasupat
|
||||
paris
|
||||
Paris
|
||||
Paris Kasidiaris
|
||||
Patil Arpith
|
||||
Patrick Kettner
|
||||
Patrick Stoica
|
||||
Patrick Strawderman
|
||||
Paul Garvin
|
||||
Paul Ivanov
|
||||
Paul Masson
|
||||
Paul Schmidt
|
||||
Pavel
|
||||
Pavel Feldman
|
||||
Pavel Petržela
|
||||
Pavel Strashkin
|
||||
Paweł Bartkiewicz
|
||||
peteguhl
|
||||
peter
|
||||
Peter Flynn
|
||||
peterkroon
|
||||
Peter Kroon
|
||||
Peter László
|
||||
Phil DeJarnett
|
||||
Philipp A
|
||||
Philipp Markovics
|
||||
Philip Stadermann
|
||||
Pi Delport
|
||||
Pierre Gerold
|
||||
Pieter Ouwerkerk
|
||||
Piyush
|
||||
Pontus Melke
|
||||
prasanthj
|
||||
Prasanth J
|
||||
Prayag Verma
|
||||
prendota
|
||||
Prendota
|
||||
ps173
|
||||
Qiang Li
|
||||
quiddity-wp
|
||||
Radek Piórkowski
|
||||
Rahul
|
||||
Rahul Anand
|
||||
ramwin1
|
||||
Randall Mason
|
||||
Randy Burden
|
||||
Randy Edmunds
|
||||
Randy Luecke
|
||||
Raphael Amorim
|
||||
Rasmus Erik Voel Jensen
|
||||
Rasmus Schultz
|
||||
raymondf
|
||||
Raymond Hill
|
||||
ray ratchup
|
||||
Ray Ratchup
|
||||
Remi Nyborg
|
||||
Renaud Durlin
|
||||
Reynold Xin
|
||||
Richard Denton
|
||||
Richard van der Meer
|
||||
Richard Z.H. Wang
|
||||
Rishi Goomar
|
||||
Robert Brignull
|
||||
Robert Crossfield
|
||||
Robert Martin
|
||||
Roberto Abdelkader Martínez Pérez
|
||||
robertop23
|
||||
Roberto Vidal
|
||||
Robert Plummer
|
||||
Roman Frolov
|
||||
Roman Janusz
|
||||
Rongjian Zhang
|
||||
Rrandom
|
||||
Rrrandom
|
||||
Ruslan Osmanov
|
||||
rvalavicius
|
||||
Ryan Pangrle
|
||||
Ryan Petrello
|
||||
Ryan Prior
|
||||
ryu-sato
|
||||
sabaca
|
||||
Sam Lee
|
||||
Sam Rawlins
|
||||
Samuel Ainsworth
|
||||
Sam Wilson
|
||||
sandeepshetty
|
||||
Sander AKA Redsandro
|
||||
Sander Verweij
|
||||
santec
|
||||
Sarah McAlear and Wenlin Zhang
|
||||
Sascha Peilicke
|
||||
Sasha Varlamov
|
||||
satamas
|
||||
satchmorun
|
||||
sathyamoorthi
|
||||
Saul Costa
|
||||
S. Chris Colbert
|
||||
SCLINIC\jdecker
|
||||
Scott Aikin
|
||||
Scott Feeney
|
||||
Scott Goodhew
|
||||
Seb35
|
||||
Sebastian Ślepowroński
|
||||
Sebastian Wilzbach
|
||||
Sebastian Zaha
|
||||
Seren D
|
||||
Sergey Goder
|
||||
Sergey Tselovalnikov
|
||||
Se-Won Kim
|
||||
Shane Liesegang
|
||||
shaund
|
||||
shaun gilchrist
|
||||
Shawn A
|
||||
Shea Bunge
|
||||
sheopory
|
||||
Shil S
|
||||
Shiv Deepak
|
||||
Shmuel Englard
|
||||
Shubham Jain
|
||||
Siamak Mokhtari
|
||||
Siddhartha Gunti
|
||||
silverwind
|
||||
Simon Edwards
|
||||
Simon Huber
|
||||
sinkuu
|
||||
Slava Rozhnev
|
||||
snasa
|
||||
soliton4
|
||||
sonson
|
||||
Sorab Bisht
|
||||
spastorelli
|
||||
srajanpaliwal
|
||||
Stanislav Oaserele
|
||||
stan-z
|
||||
Stas Kobzar
|
||||
stasoid
|
||||
Stefan Borsje
|
||||
Steffen Beyer
|
||||
Steffen Bruchmann
|
||||
Steffen Kowalski
|
||||
Stephane Moore
|
||||
Stephen Lavelle
|
||||
Steve Champagne
|
||||
Steve Hoover
|
||||
Steven Yung
|
||||
Steve O'Hara
|
||||
stockiNail
|
||||
stoskov
|
||||
Stryder Crown
|
||||
Stu Kennedy
|
||||
Sungho Kim
|
||||
sverweij
|
||||
Taha Jahangir
|
||||
takamori
|
||||
Tako Schotanus
|
||||
Takuji Shimokawa
|
||||
Takuya Matsuyama
|
||||
Tarmil
|
||||
T. Brandon Ashley
|
||||
TDaglis
|
||||
Teja
|
||||
tel
|
||||
Tentone
|
||||
tfjgeorge
|
||||
Thaddee Tyl
|
||||
thanasis
|
||||
TheHowl
|
||||
themrmax
|
||||
Thiemo Kreuz
|
||||
think
|
||||
Thomas Brouard
|
||||
Thomas Dvornik
|
||||
Thomas Kluyver
|
||||
thomasmaclean
|
||||
Thomas Schmid
|
||||
Tim Alby
|
||||
Tim Baumann
|
||||
Tim Gates
|
||||
Timothy Farrell
|
||||
Timothy Gu
|
||||
Timothy Hatcher
|
||||
Tim van der Lippe
|
||||
Tobias Bertelsen
|
||||
TobiasBg
|
||||
Todd Berman
|
||||
Todd Kennedy
|
||||
tokafew420
|
||||
Tomas-A
|
||||
Tomas Varaneckas
|
||||
Tom Erik Støwer
|
||||
Tom Klancer
|
||||
Tom MacWright
|
||||
Tom McLaughlin
|
||||
Tony Jian
|
||||
tophf
|
||||
Torben Bundt
|
||||
Torgeir Thoresen
|
||||
totalamd
|
||||
Travis Heppe
|
||||
Triangle717
|
||||
Tristan Tarrant
|
||||
TSUYUSATO Kitsune
|
||||
Tugrul Elmas
|
||||
twifkak
|
||||
Tyler Long
|
||||
Tyler Makaro
|
||||
Vadim Dyachenko
|
||||
Vadzim Ramanenka
|
||||
Vaibhav Sagar
|
||||
vamshi.revu
|
||||
VapidWorx
|
||||
Vestimir Markov
|
||||
vf
|
||||
Victor Bocharsky
|
||||
Vincent Woo
|
||||
Volker Mische
|
||||
vtripolitakis
|
||||
wdouglashall
|
||||
Weiyan Shao
|
||||
wenli
|
||||
Wes Cossick
|
||||
Wesley Wiser
|
||||
Weston Ruter
|
||||
Will Binns-Smith
|
||||
Will Dean
|
||||
William Desportes
|
||||
William Jamieson
|
||||
William Stein
|
||||
Willy
|
||||
Wojtek Ptak
|
||||
wonderboyjon
|
||||
Wu Cheng-Han
|
||||
Xavier Mendez
|
||||
Yang Guo
|
||||
Yash Singh
|
||||
Yash-Singh1
|
||||
Yassin N. Hassan
|
||||
YNH Webdev
|
||||
yoongu
|
||||
Yunchi Luo
|
||||
Yuvi Panda
|
||||
Yvonnick Esnault
|
||||
Zac Anger
|
||||
Zachary Dremann
|
||||
ZeeshanNoor
|
||||
Zeno Rocha
|
||||
Zhang Hao
|
||||
Ziv
|
||||
zoobestik
|
||||
zziuni
|
||||
魏鹏刚
|
||||
File diff suppressed because it is too large.
Load diff
@@ -0,0 +1,92 @@
|
||||
# How to contribute
|
||||
|
||||
- [Getting help](#getting-help)
|
||||
- [Submitting bug reports](#submitting-bug-reports)
|
||||
- [Contributing code](#contributing-code)
|
||||
|
||||
## Getting help
|
||||
|
||||
Community discussion, questions, and informal bug reporting is done on the
|
||||
[discuss.CodeMirror forum](http://discuss.codemirror.net).
|
||||
|
||||
## Submitting bug reports
|
||||
|
||||
The preferred way to report bugs is to use the
|
||||
[GitHub issue tracker](http://github.com/codemirror/CodeMirror/issues). Before
|
||||
reporting a bug, read these pointers.
|
||||
|
||||
**Note:** The issue tracker is for *bugs*, not requests for help. Questions
|
||||
should be asked on the
|
||||
[discuss.CodeMirror forum](http://discuss.codemirror.net) instead.
|
||||
|
||||
### Reporting bugs effectively
|
||||
|
||||
- CodeMirror is maintained by volunteers. They don't owe you anything, so be
|
||||
polite. Reports with an indignant or belligerent tone tend to be moved to the
|
||||
bottom of the pile.
|
||||
|
||||
- Include information about **the browser in which the problem occurred**. Even
|
||||
if you tested several browsers, and the problem occurred in all of them,
|
||||
mention this fact in the bug report. Also include browser version numbers and
|
||||
the operating system that you're on.
|
||||
|
||||
- Mention which release of CodeMirror you're using. Preferably, try also with
|
||||
the current development snapshot, to ensure the problem has not already been
|
||||
fixed.
|
||||
|
||||
- Mention very precisely what went wrong. "X is broken" is not a good bug
|
||||
report. What did you expect to happen? What happened instead? Describe the
|
||||
exact steps a maintainer has to take to make the problem occur. We can not
|
||||
fix something that we can not observe.
|
||||
|
||||
- If the problem can not be reproduced in any of the demos included in the
|
||||
CodeMirror distribution, please provide an HTML document that demonstrates
|
||||
the problem. The best way to do this is to go to
|
||||
[jsbin.com](http://jsbin.com/ihunin/edit), enter it there, press save, and
|
||||
include the resulting link in your bug report.
|
||||
|
||||
## Contributing code
|
||||
|
||||
Note that we are not accepting any new addons or modes into the main
|
||||
distribution. If you've written such a module, please distribute it as
|
||||
a separate NPM package.
|
||||
|
||||
- Make sure you have a [GitHub Account](https://github.com/signup/free)
|
||||
- Fork [CodeMirror](https://github.com/codemirror/CodeMirror/)
|
||||
([how to fork a repo](https://help.github.com/articles/fork-a-repo))
|
||||
- Make your changes
|
||||
- If your changes are easy to test or likely to regress, add tests.
|
||||
Tests for the core go into `test/test.js`, some modes have their own
|
||||
test suite under `mode/XXX/test.js`. Feel free to add new test
|
||||
suites to modes that don't have one yet (be sure to link the new
|
||||
tests into `test/index.html`).
|
||||
- Follow the general code style of the rest of the project (see
|
||||
below). Run `bin/lint` to verify that the linter is happy.
|
||||
- Make sure all tests pass. Visit `test/index.html` in your browser to
|
||||
run them.
|
||||
- Submit a pull request
|
||||
([how to create a pull request](https://help.github.com/articles/fork-a-repo)).
|
||||
Don't put more than one feature/fix in a single pull request.
|
||||
|
||||
By contributing code to CodeMirror you
|
||||
|
||||
- agree to license the contributed code under CodeMirror's [MIT
|
||||
license](https://codemirror.net/LICENSE).
|
||||
|
||||
- confirm that you have the right to contribute and license the code
|
||||
in question. (Either you hold all rights on the code, or the rights
|
||||
holder has explicitly granted the right to use it like this,
|
||||
through a compatible open source license or through a direct
|
||||
agreement with you.)
|
||||
|
||||
### Coding standards
|
||||
|
||||
- 2 spaces per indentation level, no tabs.
|
||||
|
||||
- Note that the linter (`bin/lint`) which is run after each commit
|
||||
complains about unused variables and functions. Prefix their names
|
||||
with an underscore to muffle it.
|
||||
|
||||
- CodeMirror does *not* follow JSHint or JSLint prescribed style.
|
||||
Patches that try to 'fix' code to pass one of these linters will be
|
||||
unceremoniously discarded.
|
||||
@@ -0,0 +1,21 @@
|
||||
MIT License
|
||||
|
||||
Copyright (C) 2017 by Marijn Haverbeke <marijnh@gmail.com> and others
|
||||
|
||||
Permission is hereby granted, free of charge, to any person obtaining a copy
|
||||
of this software and associated documentation files (the "Software"), to deal
|
||||
in the Software without restriction, including without limitation the rights
|
||||
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
|
||||
copies of the Software, and to permit persons to whom the Software is
|
||||
furnished to do so, subject to the following conditions:
|
||||
|
||||
The above copyright notice and this permission notice shall be included in
|
||||
all copies or substantial portions of the Software.
|
||||
|
||||
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
|
||||
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
|
||||
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
|
||||
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
|
||||
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
|
||||
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
|
||||
THE SOFTWARE.
|
||||
@@ -0,0 +1,47 @@
|
||||
# CodeMirror
|
||||
|
||||
[](https://github.com/codemirror/codemirror/actions)
|
||||
[](https://www.npmjs.org/package/codemirror)
|
||||
|
||||
CodeMirror is a versatile text editor implemented in JavaScript for
|
||||
the browser. It is specialized for editing code, and comes with over
|
||||
100 language modes and various addons that implement more advanced
|
||||
editing functionality. Every language comes with fully-featured code
|
||||
and syntax highlighting to help with reading and editing complex code.
|
||||
|
||||
A rich programming API and a CSS theming system are available for
|
||||
customizing CodeMirror to fit your application, and extending it with
|
||||
new functionality.
|
||||
|
||||
You can find more information (and the
|
||||
[manual](https://codemirror.net/doc/manual.html)) on the [project
|
||||
page](https://codemirror.net). For questions and discussion, use the
|
||||
[discussion forum](https://discuss.codemirror.net/).
|
||||
|
||||
See
|
||||
[CONTRIBUTING.md](https://github.com/codemirror/CodeMirror/blob/master/CONTRIBUTING.md)
|
||||
for contributing guidelines.
|
||||
|
||||
The CodeMirror community aims to be welcoming to everybody. We use the
|
||||
[Contributor Covenant
|
||||
(1.1)](http://contributor-covenant.org/version/1/1/0/) as our code of
|
||||
conduct.
|
||||
|
||||
### Installation
|
||||
|
||||
Either get the [zip file](https://codemirror.net/codemirror.zip) with
|
||||
the latest version, or make sure you have [Node](https://nodejs.org/)
|
||||
installed and run:
|
||||
|
||||
npm install codemirror
|
||||
|
||||
**NOTE**: This is the source repository for the library, and not the
|
||||
distribution channel. Cloning it is not the recommended way to install
|
||||
the library, and will in fact not work unless you also run the build
|
||||
step.
|
||||
|
||||
### Quickstart
|
||||
|
||||
To build the project, make sure you have Node.js installed (at least version 6)
|
||||
and then `npm install`. To run, just open `index.html` in your
|
||||
browser (you don't need to run a webserver). Run the tests with `npm test`.
|
||||
@@ -0,0 +1 @@
|
||||
!function(e){"object"==typeof exports&&"object"==typeof module?e(require("../../lib/codemirror")):"function"==typeof define&&define.amd?define(["../../lib/codemirror"],e):e(CodeMirror)}((function(e){"use strict";var n={},t=/[^\s\u00a0]/,i=e.Pos,l=e.cmpPos;function o(e){var n=e.search(t);return-1==n?0:n}function r(e,n){var t=e.getMode();return!1!==t.useInnerComments&&t.innerMode?e.getModeAt(n):t}e.commands.toggleComment=function(e){e.toggleComment()},e.defineExtension("toggleComment",(function(e){e||(e=n);for(var t=1/0,l=this.listSelections(),o=null,r=l.length-1;r>=0;r--){var a=l[r].from(),m=l[r].to();a.line>=t||(m.line>=t&&(m=i(t,0)),t=a.line,null==o?this.uncomment(a,m,e)?o="un":(this.lineComment(a,m,e),o="line"):"un"==o?this.uncomment(a,m,e):this.lineComment(a,m,e))}})),e.defineExtension("lineComment",(function(e,l,a){a||(a=n);var m=this,c=r(m,e),s=m.getLine(e.line);if(null!=s&&(g=e,f=s,!/\bstring\b/.test(m.getTokenTypeAt(i(g.line,0)))||/^[\'\"\`]/.test(f))){var g,f,d=a.lineComment||c.lineComment;if(d){var u=Math.min(0!=l.ch||l.line==e.line?l.line+1:l.line,m.lastLine()+1),h=null==a.padding?" ":a.padding,C=a.commentBlankLines||e.line==l.line;m.operation((function(){if(a.indent){for(var n=null,l=e.line;l<u;++l){var r=(c=m.getLine(l)).slice(0,o(c));(null==n||n.length>r.length)&&(n=r)}for(l=e.line;l<u;++l){var c=m.getLine(l),s=n.length;(C||t.test(c))&&(c.slice(0,s)!=n&&(s=o(c)),m.replaceRange(n+d+h,i(l,0),i(l,s)))}}else for(l=e.line;l<u;++l)(C||t.test(m.getLine(l)))&&m.replaceRange(d+h,i(l,0))}))}else(a.blockCommentStart||c.blockCommentStart)&&(a.fullLines=!0,m.blockComment(e,l,a))}})),e.defineExtension("blockComment",(function(e,o,a){a||(a=n);var m=this,c=r(m,e),s=a.blockCommentStart||c.blockCommentStart,g=a.blockCommentEnd||c.blockCommentEnd;if(s&&g){if(!/\bcomment\b/.test(m.getTokenTypeAt(i(e.line,0)))){var f=Math.min(o.line,m.lastLine());f!=e.line&&0==o.ch&&t.test(m.getLine(f))&&--f;var d=null==a.padding?" ":a.padding;e.line>f||m.operation((function(){if(0!=a.fullLines){var n=t.test(m.getLine(f));m.replaceRange(d+g,i(f)),m.replaceRange(s+d,i(e.line,0));var r=a.blockCommentLead||c.blockCommentLead;if(null!=r)for(var u=e.line+1;u<=f;++u)(u!=f||n)&&m.replaceRange(r+d,i(u,0))}else{var h=0==l(m.getCursor("to"),o),C=!m.somethingSelected();m.replaceRange(g,o),h&&m.setSelection(C?o:m.getCursor("from"),o),m.replaceRange(s,e)}}))}}else(a.lineComment||c.lineComment)&&0!=a.fullLines&&m.lineComment(e,o,a)})),e.defineExtension("uncomment",(function(e,l,o){o||(o=n);var a,m=this,c=r(m,e),s=Math.min(0!=l.ch||l.line==e.line?l.line:l.line-1,m.lastLine()),g=Math.min(e.line,s),f=o.lineComment||c.lineComment,d=[],u=null==o.padding?" ":o.padding;e:if(f){for(var h=g;h<=s;++h){var C=m.getLine(h),p=C.indexOf(f);if(p>-1&&!/comment/.test(m.getTokenTypeAt(i(h,p+1)))&&(p=-1),-1==p&&t.test(C))break e;if(p>-1&&t.test(C.slice(0,p)))break e;d.push(C)}if(m.operation((function(){for(var e=g;e<=s;++e){var n=d[e-g],t=n.indexOf(f),l=t+f.length;t<0||(n.slice(l,l+u.length)==u&&(l+=u.length),a=!0,m.replaceRange("",i(e,t),i(e,l)))}})),a)return!0}var v=o.blockCommentStart||c.blockCommentStart,b=o.blockCommentEnd||c.blockCommentEnd;if(!v||!b)return!1;var k=o.blockCommentLead||c.blockCommentLead,L=m.getLine(g),x=L.indexOf(v);if(-1==x)return!1;var R=s==g?L:m.getLine(s),O=R.indexOf(b,s==g?x+v.length:0),T=i(g,x+1),S=i(s,O+1);if(-1==O||!/comment/.test(m.getTokenTypeAt(T))||!/comment/.test(m.getTokenTypeAt(S))||m.getRange(T,S,"\n").indexOf(b)>-1)return!1;var y=L.lastIndexOf(v,e.ch),E=-1==y?-1:L.slice(0,e.ch).indexOf(b,y+v.length);if(-1!=y&&-1!=E&&E+b.length!=e.ch)return!1;E=R.indexOf(b,l.ch);var M=R.slice(l.ch).lastIndexOf(v,E-l.ch);return y=-1==E||-1==M?-1:l.ch+M,(-1==E||-1==y||y==l.ch)&&(m.operation((function(){m.replaceRange("",i(s,O-(u&&R.slice(O-u.length,O)==u?u.length:0)),i(s,O+b.length));var e=x+v.length;if(u&&L.slice(e,e+u.length)==u&&(e+=u.length),m.replaceRange("",i(g,x),i(g,e)),k)for(var n=g+1;n<=s;++n){var l=m.getLine(n),o=l.indexOf(k);if(-1!=o&&!t.test(l.slice(0,o))){var r=o+k.length;u&&l.slice(r,r+u.length)==u&&(r+=u.length),m.replaceRange("",i(n,o),i(n,r))}}})),!0)}))}));
|
||||
+1
@@ -0,0 +1 @@
|
||||
!function(e){"object"==typeof exports&&"object"==typeof module?e(require("../../lib/codemirror")):"function"==typeof define&&define.amd?define(["../../lib/codemirror"],e):e(CodeMirror)}((function(e){var n=/\S/g,t=String.prototype.repeat||function(e){return Array(e+1).join(this)};function o(n){if(n.getOption("disableInput"))return e.Pass;for(var o,r=n.listSelections(),c=[],f=0;f<r.length;f++){var a=r[f].head;if(!/\bcomment\b/.test(n.getTokenTypeAt(a)))return e.Pass;var m=n.getModeAt(a);if(o){if(o!=m)return e.Pass}else o=m;var s,u,d=null,p=o.blockCommentStart,h=o.lineComment;if(p&&o.blockCommentContinue){var b=(s=n.getLine(a.line)).lastIndexOf(o.blockCommentEnd,a.ch-o.blockCommentEnd.length);if(-1!=b&&b==a.ch-o.blockCommentEnd.length||h&&(u=s.lastIndexOf(h,a.ch-1))>-1&&/\bcomment\b/.test(n.getTokenTypeAt({line:a.line,ch:u+1})));else if(a.ch>=p.length&&(u=s.lastIndexOf(p,a.ch-p.length))>-1&&u>b)if(i(0,s)>=u)d=s.slice(0,u);else{var g,C=n.options.tabSize;u=e.countColumn(s,u,C),d=n.options.indentWithTabs?t.call("\t",g=Math.floor(u/C))+t.call(" ",u-C*g):t.call(" ",u)}else(u=s.indexOf(o.blockCommentContinue))>-1&&u<=a.ch&&u<=i(0,s)&&(d=s.slice(0,u));null!=d&&(d+=o.blockCommentContinue)}if(null==d&&h&&l(n))if(null==s&&(s=n.getLine(a.line)),u=s.indexOf(h),a.ch||u){if(u>-1&&i(0,s)>=u){if(!(d=i(a.ch,s)>-1)){var v=n.getLine(a.line+1)||"",y=v.indexOf(h);d=y>-1&&i(0,v)>=y||null}d&&(d=s.slice(0,u)+h+s.slice(u+h.length).match(/^\s*/)[0])}}else d="";if(null==d)return e.Pass;c[f]="\n"+d}n.operation((function(){for(var e=r.length-1;e>=0;e--)n.replaceRange(c[e],r[e].from(),r[e].to(),"+insert")}))}function i(e,t){n.lastIndex=e;var o=n.exec(t);return o?o.index:-1}function l(e){var n=e.getOption("continueComments");return!n||"object"!=typeof n||!1!==n.continueLineComment}e.defineOption("continueComments",null,(function(n,t,i){if(i&&i!=e.Init&&n.removeKeyMap("continueComment"),t){var l="Enter";"string"==typeof t?l=t:"object"==typeof t&&t.key&&(l=t.key);var r={name:"continueComment"};r[l]=o,n.addKeyMap(r)}}))}));
|
||||
@@ -0,0 +1,32 @@
|
||||
.CodeMirror-dialog {
|
||||
position: absolute;
|
||||
left: 0; right: 0;
|
||||
background: inherit;
|
||||
z-index: 15;
|
||||
padding: .1em .8em;
|
||||
overflow: hidden;
|
||||
color: inherit;
|
||||
}
|
||||
|
||||
.CodeMirror-dialog-top {
|
||||
border-bottom: 1px solid #eee;
|
||||
top: 0;
|
||||
}
|
||||
|
||||
.CodeMirror-dialog-bottom {
|
||||
border-top: 1px solid #eee;
|
||||
bottom: 0;
|
||||
}
|
||||
|
||||
.CodeMirror-dialog input {
|
||||
border: none;
|
||||
outline: none;
|
||||
background: transparent;
|
||||
width: 20em;
|
||||
color: inherit;
|
||||
font-family: monospace;
|
||||
}
|
||||
|
||||
.CodeMirror-dialog button {
|
||||
font-size: 70%;
|
||||
}
|
||||
@@ -0,0 +1 @@
|
||||
!function(e){"object"==typeof exports&&"object"==typeof module?e(require("../../lib/codemirror")):"function"==typeof define&&define.amd?define(["../../lib/codemirror"],e):e(CodeMirror)}((function(e){function o(o,n,t){var i,r=o.getWrapperElement();return(i=r.appendChild(document.createElement("div"))).className=t?"CodeMirror-dialog CodeMirror-dialog-bottom":"CodeMirror-dialog CodeMirror-dialog-top","string"==typeof n?i.innerHTML=n:i.appendChild(n),e.addClass(r,"dialog-opened"),i}function n(e,o){e.state.currentNotificationClose&&e.state.currentNotificationClose(),e.state.currentNotificationClose=o}e.defineExtension("openDialog",(function(t,i,r){r||(r={}),n(this,null);var u=o(this,t,r.bottom),l=!1,a=this;function c(o){if("string"==typeof o)s.value=o;else{if(l)return;l=!0,e.rmClass(u.parentNode,"dialog-opened"),u.parentNode.removeChild(u),a.focus(),r.onClose&&r.onClose(u)}}var d,s=u.getElementsByTagName("input")[0];return s?(s.focus(),r.value&&(s.value=r.value,!1!==r.selectValueOnOpen&&s.select()),r.onInput&&e.on(s,"input",(function(e){r.onInput(e,s.value,c)})),r.onKeyUp&&e.on(s,"keyup",(function(e){r.onKeyUp(e,s.value,c)})),e.on(s,"keydown",(function(o){r&&r.onKeyDown&&r.onKeyDown(o,s.value,c)||((27==o.keyCode||!1!==r.closeOnEnter&&13==o.keyCode)&&(s.blur(),e.e_stop(o),c()),13==o.keyCode&&i(s.value,o))})),!1!==r.closeOnBlur&&e.on(u,"focusout",(function(e){null!==e.relatedTarget&&c()}))):(d=u.getElementsByTagName("button")[0])&&(e.on(d,"click",(function(){c(),a.focus()})),!1!==r.closeOnBlur&&e.on(d,"blur",c),d.focus()),c})),e.defineExtension("openConfirm",(function(t,i,r){n(this,null);var u=o(this,t,r&&r.bottom),l=u.getElementsByTagName("button"),a=!1,c=this,d=1;function s(){a||(a=!0,e.rmClass(u.parentNode,"dialog-opened"),u.parentNode.removeChild(u),c.focus())}l[0].focus();for(var f=0;f<l.length;++f){var p=l[f];!function(o){e.on(p,"click",(function(n){e.e_preventDefault(n),s(),o&&o(c)}))}(i[f]),e.on(p,"blur",(function(){--d,setTimeout((function(){d<=0&&s()}),200)})),e.on(p,"focus",(function(){++d}))}})),e.defineExtension("openNotification",(function(t,i){n(this,c);var r,u=o(this,t,i&&i.bottom),l=!1,a=i&&void 0!==i.duration?i.duration:5e3;function c(){l||(l=!0,clearTimeout(r),e.rmClass(u.parentNode,"dialog-opened"),u.parentNode.removeChild(u))}return e.on(u,"click",(function(o){e.e_preventDefault(o),c()})),a&&(r=setTimeout(c,a)),c}))}));
|
||||
+1
@@ -0,0 +1 @@
|
||||
!function(e){"object"==typeof exports&&"object"==typeof module?e(require("../../lib/codemirror")):"function"==typeof define&&define.amd?define(["../../lib/codemirror"],e):e(CodeMirror)}((function(e){"use strict";function t(t,o){clearTimeout(o.timeout),e.off(window,"mouseup",o.hurry),e.off(window,"keyup",o.hurry)}e.defineOption("autoRefresh",!1,(function(o,i){o.state.autoRefresh&&(t(o,o.state.autoRefresh),o.state.autoRefresh=null),i&&0==o.display.wrapper.offsetHeight&&function(o,i){function r(){o.display.wrapper.offsetHeight?(t(o,i),o.display.lastWrapHeight!=o.display.wrapper.clientHeight&&o.refresh()):i.timeout=setTimeout(r,i.delay)}i.timeout=setTimeout(r,i.delay),i.hurry=function(){clearTimeout(i.timeout),i.timeout=setTimeout(r,50)},e.on(window,"mouseup",i.hurry),e.on(window,"keyup",i.hurry)}(o,o.state.autoRefresh={delay:i.delay||250})}))}));
|
||||
+6
@@ -0,0 +1,6 @@
|
||||
.CodeMirror-fullscreen {
|
||||
position: fixed;
|
||||
top: 0; left: 0; right: 0; bottom: 0;
|
||||
height: auto;
|
||||
z-index: 9;
|
||||
}
|
||||
+1
@@ -0,0 +1 @@
|
||||
!function(e){"object"==typeof exports&&"object"==typeof module?e(require("../../lib/codemirror")):"function"==typeof define&&define.amd?define(["../../lib/codemirror"],e):e(CodeMirror)}((function(e){"use strict";e.defineOption("fullScreen",!1,(function(t,o,r){r==e.Init&&(r=!1),!r!=!o&&(o?function(e){var t=e.getWrapperElement();e.state.fullScreenRestore={scrollTop:window.pageYOffset,scrollLeft:window.pageXOffset,width:t.style.width,height:t.style.height},t.style.width="",t.style.height="auto",t.className+=" CodeMirror-fullscreen",document.documentElement.style.overflow="hidden",e.refresh()}(t):function(e){var t=e.getWrapperElement();t.className=t.className.replace(/\s*CodeMirror-fullscreen\b/,""),document.documentElement.style.overflow="";var o=e.state.fullScreenRestore;t.style.width=o.width,t.style.height=o.height,window.scrollTo(o.scrollLeft,o.scrollTop),e.refresh()}(t))}))}));
|
||||
@@ -0,0 +1 @@
|
||||
!function(e){"object"==typeof exports&&"object"==typeof module?e(require("../../lib/codemirror")):"function"==typeof define&&define.amd?define(["../../lib/codemirror"],e):e(CodeMirror)}((function(e){function t(e,t,i,n){this.cm=e,this.node=t,this.options=i,this.height=n,this.cleared=!1}function i(e,t){for(var i=t.nextSibling;i;i=i.nextSibling)if(i==e.getWrapperElement())return!0;return!1}e.defineExtension("addPanel",(function(e,n){n=n||{},this.state.panels||function(e){var t=e.getWrapperElement(),i=window.getComputedStyle?window.getComputedStyle(t):t.currentStyle,n=parseInt(i.height),r=e.state.panels={setHeight:t.style.height,panels:[],wrapper:document.createElement("div")},o=e.hasFocus(),s=e.getScrollInfo();t.parentNode.insertBefore(r.wrapper,t),r.wrapper.appendChild(t),e.scrollTo(s.left,s.top),o&&e.focus();e._setSize=e.setSize,null!=n&&(e.setSize=function(t,i){if(i||(i=r.wrapper.offsetHeight),r.setHeight=i,"number"!=typeof i){var o=/^(\d+\.?\d*)px$/.exec(i);o?i=Number(o[1]):(r.wrapper.style.height=i,i=r.wrapper.offsetHeight)}var s=i-r.panels.map((function(e){return e.node.getBoundingClientRect().height})).reduce((function(e,t){return e+t}),0);e._setSize(t,s),n=i})}(this);var r=this.state.panels,o=r.wrapper,s=this.getWrapperElement(),l=n.replace instanceof t&&!n.replace.cleared;n.after instanceof t&&!n.after.cleared?o.insertBefore(e,n.before.node.nextSibling):n.before instanceof t&&!n.before.cleared?o.insertBefore(e,n.before.node):l?(o.insertBefore(e,n.replace.node),n.replace.clear(!0)):"bottom"==n.position?o.appendChild(e):"before-bottom"==n.position?o.insertBefore(e,s.nextSibling):"after-top"==n.position?o.insertBefore(e,s):o.insertBefore(e,o.firstChild);var p=n&&n.height||e.offsetHeight,a=new t(this,e,n,p);return r.panels.push(a),this.setSize(),n.stable&&i(this,e)&&this.scrollTo(null,this.getScrollInfo().top+p),a})),t.prototype.clear=function(e){if(!this.cleared){this.cleared=!0;var t=this.cm.state.panels;t.panels.splice(t.panels.indexOf(this),1),this.cm.setSize(),this.options.stable&&i(this.cm,this.node)&&this.cm.scrollTo(null,this.cm.getScrollInfo().top-this.height),t.wrapper.removeChild(this.node),0!=t.panels.length||e||function(e){var t=e.state.panels;e.state.panels=null;var i=e.getWrapperElement(),n=e.hasFocus(),r=e.getScrollInfo();t.wrapper.parentNode.replaceChild(i,t.wrapper),e.scrollTo(r.left,r.top),n&&e.focus();i.style.height=t.setHeight,e.setSize=e._setSize,e.setSize()}(this.cm)}},t.prototype.changed=function(){this.height=this.node.getBoundingClientRect().height,this.cm.setSize()}}));
|
||||
+1
@@ -0,0 +1 @@
|
||||
!function(e){"object"==typeof exports&&"object"==typeof module?e(require("../../lib/codemirror")):"function"==typeof define&&define.amd?define(["../../lib/codemirror"],e):e(CodeMirror)}((function(e){function o(e){e.state.placeholder&&(e.state.placeholder.parentNode.removeChild(e.state.placeholder),e.state.placeholder=null)}function t(e){o(e);var t=e.state.placeholder=document.createElement("pre");t.style.cssText="height: 0; overflow: visible",t.style.direction=e.getOption("direction"),t.className="CodeMirror-placeholder CodeMirror-line-like";var r=e.getOption("placeholder");"string"==typeof r&&(r=document.createTextNode(r)),t.appendChild(r),e.display.lineSpace.insertBefore(t,e.display.lineSpace.firstChild)}function r(e){i(e)&&t(e)}function n(e){var r=e.getWrapperElement(),n=i(e);r.className=r.className.replace(" CodeMirror-empty","")+(n?" CodeMirror-empty":""),n?t(e):o(e)}function i(e){return 1===e.lineCount()&&""===e.getLine(0)}e.defineOption("placeholder","",(function(i,l,a){var c=a&&a!=e.Init;if(l&&!c)i.on("blur",r),i.on("change",n),i.on("swapDoc",n),e.on(i.getInputField(),"compositionupdate",i.state.placeholderCompose=function(){!function(e){setTimeout((function(){var r=!1;if(1==e.lineCount()){var n=e.getInputField();r="TEXTAREA"==n.nodeName?!e.getLine(0).length:!/[^\u200b]/.test(n.querySelector(".CodeMirror-line").textContent)}r?t(e):o(e)}),20)}(i)}),n(i);else if(!l&&c){i.off("blur",r),i.off("change",n),i.off("swapDoc",n),e.off(i.getInputField(),"compositionupdate",i.state.placeholderCompose),o(i);var p=i.getWrapperElement();p.className=p.className.replace(" CodeMirror-empty","")}l&&!i.hasFocus()&&r(i)}))}));
|
||||
@@ -0,0 +1 @@
|
||||
!function(e){"object"==typeof exports&&"object"==typeof module?e(require("../../lib/codemirror")):"function"==typeof define&&define.amd?define(["../../lib/codemirror"],e):e(CodeMirror)}((function(e){"use strict";function r(r){r.state.rulerDiv.textContent="";var t=r.getOption("rulers"),l=r.defaultCharWidth(),i=r.charCoords(e.Pos(r.firstLine(),0),"div").left;r.state.rulerDiv.style.minHeight=r.display.scroller.offsetHeight+30+"px";for(var o=0;o<t.length;o++){var s=document.createElement("div");s.className="CodeMirror-ruler";var n,a=t[o];"number"==typeof a?n=a:(n=a.column,a.className&&(s.className+=" "+a.className),a.color&&(s.style.borderColor=a.color),a.lineStyle&&(s.style.borderLeftStyle=a.lineStyle),a.width&&(s.style.borderLeftWidth=a.width)),s.style.left=i+n*l+"px",r.state.rulerDiv.appendChild(s)}}e.defineOption("rulers",!1,(function(e,t){e.state.rulerDiv&&(e.state.rulerDiv.parentElement.removeChild(e.state.rulerDiv),e.state.rulerDiv=null,e.off("refresh",r)),t&&t.length&&(e.state.rulerDiv=e.display.lineSpace.parentElement.insertBefore(document.createElement("div"),e.display.lineSpace),e.state.rulerDiv.className="CodeMirror-rulers",r(e),e.on("refresh",r))}))}));
|
||||
+1
@@ -0,0 +1 @@
|
||||
!function(e){"object"==typeof exports&&"object"==typeof module?e(require("../../lib/codemirror")):"function"==typeof define&&define.amd?define(["../../lib/codemirror"],e):e(CodeMirror)}((function(e){var n={pairs:"()[]{}''\"\"",closeBefore:")]}'\":;>",triples:"",explode:"[]{}"},t=e.Pos;function r(e,t){return"pairs"==t&&"string"==typeof e?e:"object"==typeof e&&null!=e[t]?e[t]:n[t]}e.defineOption("autoCloseBrackets",!1,(function(n,t,o){o&&o!=e.Init&&(n.removeKeyMap(i),n.state.closeBrackets=null),t&&(a(r(t,"pairs")),n.state.closeBrackets=t,n.addKeyMap(i))}));var i={Backspace:function(n){var i=s(n);if(!i||n.getOption("disableInput"))return e.Pass;for(var a=r(i,"pairs"),o=n.listSelections(),l=0;l<o.length;l++){if(!o[l].empty())return e.Pass;var f=c(n,o[l].head);if(!f||a.indexOf(f)%2!=0)return e.Pass}for(l=o.length-1;l>=0;l--){var h=o[l].head;n.replaceRange("",t(h.line,h.ch-1),t(h.line,h.ch+1),"+delete")}},Enter:function(n){var t=s(n),i=t&&r(t,"explode");if(!i||n.getOption("disableInput"))return e.Pass;for(var a=n.listSelections(),o=0;o<a.length;o++){if(!a[o].empty())return e.Pass;var f=c(n,a[o].head);if(!f||i.indexOf(f)%2!=0)return e.Pass}n.operation((function(){var e=n.lineSeparator()||"\n";n.replaceSelection(e+e,null),l(n,-1),a=n.listSelections();for(var t=0;t<a.length;t++){var r=a[t].head.line;n.indentLine(r,null,!0),n.indentLine(r+1,null,!0)}}))}};function a(e){for(var n=0;n<e.length;n++){var t=e.charAt(n),r="'"+t+"'";i[r]||(i[r]=o(t))}}function o(n){return function(i){return function(n,i){var a=s(n);if(!a||n.getOption("disableInput"))return e.Pass;var o=r(a,"pairs"),c=o.indexOf(i);if(-1==c)return e.Pass;for(var h,u=r(a,"closeBefore"),d=r(a,"triples"),p=o.charAt(c+1)==i,g=n.listSelections(),v=c%2==0,b=0;b<g.length;b++){var P,S=g[b],k=S.head,y=n.getRange(k,t(k.line,k.ch+1));if(v&&!S.empty())P="surround";else if(!p&&v||y!=i)if(p&&k.ch>1&&d.indexOf(i)>=0&&n.getRange(t(k.line,k.ch-2),k)==i+i){if(k.ch>2&&/\bstring/.test(n.getTokenTypeAt(t(k.line,k.ch-2))))return e.Pass;P="addFour"}else if(p){var O=0==k.ch?" ":n.getRange(t(k.line,k.ch-1),k);if(e.isWordChar(y)||O==i||e.isWordChar(O))return e.Pass;P="both"}else{if(!v||!(0===y.length||/\s/.test(y)||u.indexOf(y)>-1))return e.Pass;P="both"}else P=p&&f(n,k)?"both":d.indexOf(i)>=0&&n.getRange(k,t(k.line,k.ch+3))==i+i+i?"skipThree":"skip";if(h){if(h!=P)return e.Pass}else h=P}var m=c%2?o.charAt(c-1):i,x=c%2?i:o.charAt(c+1);n.operation((function(){if("skip"==h)l(n,1);else if("skipThree"==h)l(n,3);else if("surround"==h){for(var r=n.getSelections(),i=0;i<r.length;i++)r[i]=m+r[i]+x;n.replaceSelections(r,"around"),r=n.listSelections().slice();for(i=0;i<r.length;i++)r[i]=(a=r[i],o=void 0,o=e.cmpPos(a.anchor,a.head)>0,{anchor:new t(a.anchor.line,a.anchor.ch+(o?-1:1)),head:new t(a.head.line,a.head.ch+(o?1:-1))});n.setSelections(r)}else"both"==h?(n.replaceSelection(m+x,null),n.triggerElectric(m+x),l(n,-1)):"addFour"==h&&(n.replaceSelection(m+m+m+m,"before"),l(n,1));var a,o}))}(i,n)}}function s(e){var n=e.state.closeBrackets;return!n||n.override?n:e.getModeAt(e.getCursor()).closeBrackets||n}function l(e,n){for(var t=[],r=e.listSelections(),i=0,a=0;a<r.length;a++){var o=r[a];o.head==e.getCursor()&&(i=a);var s=o.head.ch||n>0?{line:o.head.line,ch:o.head.ch+n}:{line:o.head.line-1};t.push({anchor:s,head:s})}e.setSelections(t,i)}function c(e,n){var r=e.getRange(t(n.line,n.ch-1),t(n.line,n.ch+1));return 2==r.length?r:null}function f(e,n){var r=e.getTokenAt(t(n.line,n.ch+1));return/\bstring/.test(r.type)&&r.start==n.ch&&(0==n.ch||!/\bstring/.test(e.getTokenTypeAt(n)))}a(n.pairs+"`")}));
|
||||
@@ -0,0 +1 @@
|
||||
!function(e){"object"==typeof exports&&"object"==typeof module?e(require("../../lib/codemirror"),require("../fold/xml-fold")):"function"==typeof define&&define.amd?define(["../../lib/codemirror","../fold/xml-fold"],e):e(CodeMirror)}((function(e){e.defineOption("autoCloseTags",!1,(function(a,l,s){if(s!=e.Init&&s&&a.removeKeyMap("autoCloseTags"),l){var d={name:"autoCloseTags"};"object"==typeof l&&!1===l.whenClosing||(d["'/'"]=function(t){return function(t){return t.getOption("disableInput")?e.Pass:o(t,!0)}(t)}),"object"==typeof l&&!1===l.whenOpening||(d["'>'"]=function(o){return function(o){if(o.getOption("disableInput"))return e.Pass;for(var a=o.listSelections(),l=[],s=o.getOption("autoCloseTags"),d=0;d<a.length;d++){if(!a[d].empty())return e.Pass;var c=a[d].head,f=o.getTokenAt(c),g=e.innerMode(o.getMode(),f.state),u=g.state,m=g.mode.xmlCurrentTag&&g.mode.xmlCurrentTag(u),h=m&&m.name;if(!h)return e.Pass;var p="html"==g.mode.configuration,C="object"==typeof s&&s.dontCloseTags||p&&t,b="object"==typeof s&&s.indentTags||p&&n;f.end>c.ch&&(h=h.slice(0,h.length-f.end+c.ch));var v=h.toLowerCase();if(!h||"string"==f.type&&(f.end!=c.ch||!/[\"\']/.test(f.string.charAt(f.string.length-1))||1==f.string.length)||"tag"==f.type&&m.close||f.string.indexOf("/")==c.ch-f.start-1||C&&r(C,v)>-1||i(o,g.mode.xmlCurrentContext&&g.mode.xmlCurrentContext(u)||[],h,c,!0))return e.Pass;var y="object"==typeof s&&s.emptyTags;if(y&&r(y,h)>-1)l[d]={text:"/>",newPos:e.Pos(c.line,c.ch+2)};else{var x=b&&r(b,v)>-1;l[d]={indent:x,text:">"+(x?"\n\n":"")+"</"+h+">",newPos:x?e.Pos(c.line+1,0):e.Pos(c.line,c.ch+1)}}}var P="object"==typeof s&&s.dontIndentOnAutoClose;for(d=a.length-1;d>=0;d--){var T=l[d];o.replaceRange(T.text,a[d].head,a[d].anchor,"+insert");var j=o.listSelections().slice(0);j[d]={head:T.newPos,anchor:T.newPos},o.setSelections(j),!P&&T.indent&&(o.indentLine(T.newPos.line,null,!0),o.indentLine(T.newPos.line+1,null,!0))}}(o)}),a.addKeyMap(d)}}));var t=["area","base","br","col","command","embed","hr","img","input","keygen","link","meta","param","source","track","wbr"],n=["applet","blockquote","body","button","div","dl","fieldset","form","frameset","h1","h2","h3","h4","h5","h6","head","html","iframe","layer","legend","object","ol","p","select","table","ul"];function o(t,n){for(var o=t.listSelections(),r=[],a=n?"/":"</",l=t.getOption("autoCloseTags"),s="object"==typeof l&&l.dontIndentOnSlash,d=0;d<o.length;d++){if(!o[d].empty())return e.Pass;var c=o[d].head,f=t.getTokenAt(c),g=e.innerMode(t.getMode(),f.state),u=g.state;if(n&&("string"==f.type||"<"!=f.string.charAt(0)||f.start!=c.ch-1))return e.Pass;var m,h="xml"!=g.mode.name&&"htmlmixed"==t.getMode().name;if(h&&"javascript"==g.mode.name)m=a+"script";else if(h&&"css"==g.mode.name)m=a+"style";else{var p=g.mode.xmlCurrentContext&&g.mode.xmlCurrentContext(u),C=p.length?p[p.length-1]:"";if(!p||p.length&&i(t,p,C,c))return e.Pass;m=a+C}">"!=t.getLine(c.line).charAt(f.end)&&(m+=">"),r[d]=m}if(t.replaceSelections(r),o=t.listSelections(),!s)for(d=0;d<o.length;d++)(d==o.length-1||o[d].head.line<o[d+1].head.line)&&t.indentLine(o[d].head.line)}function r(e,t){if(e.indexOf)return e.indexOf(t);for(var n=0,o=e.length;n<o;++n)if(e[n]==t)return n;return-1}function i(t,n,o,r,i){if(!e.scanForClosingTag)return!1;var a=Math.min(t.lastLine()+1,r.line+500),l=e.scanForClosingTag(t,r,null,a);if(!l||l.tag!=o)return!1;for(var s=i?1:0,d=n.length-1;d>=0&&n[d]==o;d--)++s;r=l.to;for(d=1;d<s;d++){var c=e.scanForClosingTag(t,r,null,a);if(!c||c.tag!=o)return!1;r=c.to}return!0}e.commands.closeTag=function(e){return o(e)}}));
|
||||
+1
@@ -0,0 +1 @@
|
||||
!function(e){"object"==typeof exports&&"object"==typeof module?e(require("../../lib/codemirror")):"function"==typeof define&&define.amd?define(["../../lib/codemirror"],e):e(CodeMirror)}((function(e){"use strict";var n=/^(\s*)(>[> ]*|[*+-] \[[x ]\]\s|[*+-]\s|(\d+)([.)]))(\s*)/,t=/^(\s*)(>[> ]*|[*+-] \[[x ]\]|[*+-]|(\d+)[.)])(\s*)$/,i=/[*+-]\s/;function r(e,t){var i=t.line,r=0,l=0,o=n.exec(e.getLine(i)),s=o[1];do{var a=i+(r+=1),c=e.getLine(a),d=n.exec(c);if(d){var f=d[1],u=parseInt(o[3],10)+r-l,p=parseInt(d[3],10),g=p;if(s!==f||isNaN(p)){if(s.length>f.length)return;if(s.length<f.length&&1===r)return;l+=1}else u===p&&(g=p+1),u>p&&(g=u+1),e.replaceRange(c.replace(n,f+g+d[4]+d[5]),{line:a,ch:0},{line:a,ch:c.length})}}while(d)}e.commands.newlineAndIndentContinueMarkdownList=function(l){if(l.getOption("disableInput"))return e.Pass;for(var o=l.listSelections(),s=[],a=0;a<o.length;a++){var c=o[a].head,d=l.getStateAfter(c.line),f=e.innerMode(l.getMode(),d);if("markdown"!==f.mode.name)return void l.execCommand("newlineAndIndent");var u=!1!==(d=f.state).list,p=0!==d.quote,g=l.getLine(c.line),h=n.exec(g),m=/^\s*$/.test(g.slice(0,c.ch));if(!o[a].empty()||!u&&!p||!h||m)return void l.execCommand("newlineAndIndent");if(t.test(g)){var v=p&&/>\s*$/.test(g),x=!/>\s*$/.test(g);(v||x)&&l.replaceRange("",{line:c.line,ch:0},{line:c.line,ch:c.ch+1}),s[a]="\n"}else{var I=h[1],w=h[5],b=!(i.test(h[2])||h[2].indexOf(">")>=0),y=b?parseInt(h[3],10)+1+h[4]:h[2].replace("x"," ");s[a]="\n"+I+y+w,b&&r(l,c)}}l.replaceSelections(s)}}));
|
||||
+1
@@ -0,0 +1 @@
|
||||
!function(t){"object"==typeof exports&&"object"==typeof module?t(require("../../lib/codemirror")):"function"==typeof define&&define.amd?define(["../../lib/codemirror"],t):t(CodeMirror)}((function(t){var e=/MSIE \d/.test(navigator.userAgent)&&(null==document.documentMode||document.documentMode<8),n=t.Pos,r={"(":")>",")":"(<","[":"]>","]":"[<","{":"}>","}":"{<","<":">>",">":"<<"};function i(t){return t&&t.bracketRegex||/[(){}[\]]/}function c(t,e,c){var o=t.getLineHandle(e.line),h=e.ch-1,l=c&&c.afterCursor;null==l&&(l=/(^| )cm-fat-cursor($| )/.test(t.getWrapperElement().className));var s=i(c),f=!l&&h>=0&&s.test(o.text.charAt(h))&&r[o.text.charAt(h)]||s.test(o.text.charAt(h+1))&&r[o.text.charAt(++h)];if(!f)return null;var u=">"==f.charAt(1)?1:-1;if(c&&c.strict&&u>0!=(h==e.ch))return null;var m=t.getTokenTypeAt(n(e.line,h+1)),g=a(t,n(e.line,h+(u>0?1:0)),u,m,c);return null==g?null:{from:n(e.line,h),to:g&&g.pos,match:g&&g.ch==f.charAt(0),forward:u>0}}function a(t,e,c,a,o){for(var h=o&&o.maxScanLineLength||1e4,l=o&&o.maxScanLines||1e3,s=[],f=i(o),u=c>0?Math.min(e.line+l,t.lastLine()+1):Math.max(t.firstLine()-1,e.line-l),m=e.line;m!=u;m+=c){var g=t.getLine(m);if(g){var d=c>0?0:g.length-1,k=c>0?g.length:-1;if(!(g.length>h))for(m==e.line&&(d=e.ch-(c<0?1:0));d!=k;d+=c){var p=g.charAt(d);if(f.test(p)&&(void 0===a||(t.getTokenTypeAt(n(m,d+1))||"")==(a||""))){var v=r[p];if(v&&">"==v.charAt(1)==c>0)s.push(p);else{if(!s.length)return{pos:n(m,d),ch:p};s.pop()}}}}}return m-c!=(c>0?t.lastLine():t.firstLine())&&null}function o(t,r,i){for(var a=t.state.matchBrackets.maxHighlightLineLength||1e3,o=i&&i.highlightNonMatching,h=[],l=t.listSelections(),s=0;s<l.length;s++){var f=l[s].empty()&&c(t,l[s].head,i);if(f&&(f.match||!1!==o)&&t.getLine(f.from.line).length<=a){var u=f.match?"CodeMirror-matchingbracket":"CodeMirror-nonmatchingbracket";h.push(t.markText(f.from,n(f.from.line,f.from.ch+1),{className:u})),f.to&&t.getLine(f.to.line).length<=a&&h.push(t.markText(f.to,n(f.to.line,f.to.ch+1),{className:u}))}}if(h.length){e&&t.state.focused&&t.focus();var m=function(){t.operation((function(){for(var t=0;t<h.length;t++)h[t].clear()}))};if(!r)return m;setTimeout(m,800)}}function h(t){t.operation((function(){t.state.matchBrackets.currentlyHighlighted&&(t.state.matchBrackets.currentlyHighlighted(),t.state.matchBrackets.currentlyHighlighted=null),t.state.matchBrackets.currentlyHighlighted=o(t,!1,t.state.matchBrackets)}))}function l(t){t.state.matchBrackets&&t.state.matchBrackets.currentlyHighlighted&&(t.state.matchBrackets.currentlyHighlighted(),t.state.matchBrackets.currentlyHighlighted=null)}t.defineOption("matchBrackets",!1,(function(e,n,r){r&&r!=t.Init&&(e.off("cursorActivity",h),e.off("focus",h),e.off("blur",l),l(e)),n&&(e.state.matchBrackets="object"==typeof n?n:{},e.on("cursorActivity",h),e.on("focus",h),e.on("blur",l))})),t.defineExtension("matchBrackets",(function(){o(this,!0)})),t.defineExtension("findMatchingBracket",(function(t,e,n){return(n||"boolean"==typeof e)&&(n?(n.strict=e,e=n):e=e?{strict:!0}:null),c(this,t,e)})),t.defineExtension("scanForBracket",(function(t,e,n,r){return a(this,t,e,n,r)}))}));
|
||||
@@ -0,0 +1 @@
|
||||
!function(t){"object"==typeof exports&&"object"==typeof module?t(require("../../lib/codemirror"),require("../fold/xml-fold")):"function"==typeof define&&define.amd?define(["../../lib/codemirror","../fold/xml-fold"],t):t(CodeMirror)}((function(t){"use strict";function e(t){t.state.tagHit&&t.state.tagHit.clear(),t.state.tagOther&&t.state.tagOther.clear(),t.state.tagHit=t.state.tagOther=null}function a(a){a.state.failedTagMatch=!1,a.operation((function(){if(e(a),!a.somethingSelected()){var o=a.getCursor(),i=a.getViewport();i.from=Math.min(i.from,o.line),i.to=Math.max(o.line+1,i.to);var r=t.findMatchingTag(a,o,i);if(r){if(a.state.matchBothTags){var n="open"==r.at?r.open:r.close;n&&(a.state.tagHit=a.markText(n.from,n.to,{className:"CodeMirror-matchingtag"}))}var c="close"==r.at?r.open:r.close;c?a.state.tagOther=a.markText(c.from,c.to,{className:"CodeMirror-matchingtag"}):a.state.failedTagMatch=!0}}}))}function o(t){t.state.failedTagMatch&&a(t)}t.defineOption("matchTags",!1,(function(i,r,n){n&&n!=t.Init&&(i.off("cursorActivity",a),i.off("viewportChange",o),e(i)),r&&(i.state.matchBothTags="object"==typeof r&&r.bothTags,i.on("cursorActivity",a),i.on("viewportChange",o),a(i))})),t.commands.toMatchingTag=function(e){var a=t.findMatchingTag(e,e.getCursor());if(a){var o="close"==a.at?a.open:a.close;o&&e.extendSelection(o.to,o.from)}}}));
|
||||
+1
@@ -0,0 +1 @@
|
||||
!function(e){"object"==typeof exports&&"object"==typeof module?e(require("../../lib/codemirror")):"function"==typeof define&&define.amd?define(["../../lib/codemirror"],e):e(CodeMirror)}((function(e){e.defineOption("showTrailingSpace",!1,(function(i,n,o){o==e.Init&&(o=!1),o&&!n?i.removeOverlay("trailingspace"):!o&&n&&i.addOverlay({token:function(e){for(var i=e.string.length,n=i;n&&/\s/.test(e.string.charAt(n-1));--n);return n>e.pos?(e.pos=n,null):(e.pos=i,"trailingspace")},name:"trailingspace"})}))}));
|
||||
@@ -0,0 +1 @@
|
||||
!function(e){"object"==typeof exports&&"object"==typeof module?e(require("../../lib/codemirror")):"function"==typeof define&&define.amd?define(["../../lib/codemirror"],e):e(CodeMirror)}((function(e){"use strict";e.registerHelper("fold","brace",(function(r,n){var t,i=n.line,o=r.getLine(i);function l(l){for(var f=n.ch,s=0;;){var u=f<=0?-1:o.lastIndexOf(l,f-1);if(-1!=u){if(1==s&&u<n.ch)break;if(t=r.getTokenTypeAt(e.Pos(i,u+1)),!/^(comment|string)/.test(t))return u+1;f=u-1}else{if(1==s)break;s=1,f=o.length}}}var f,s,u,a=l("{"),d=l("[");if(null!=a&&(null==d||d>a))u=a,f="{",s="}";else{if(null==d)return;u=d,f="[",s="]"}var c,g,v=1,p=r.lastLine();e:for(var m=i;m<=p;++m)for(var P=r.getLine(m),k=m==i?u:0;;){var b=P.indexOf(f,k),h=P.indexOf(s,k);if(b<0&&(b=P.length),h<0&&(h=P.length),(k=Math.min(b,h))==P.length)break;if(r.getTokenTypeAt(e.Pos(m,k+1))==t)if(k==b)++v;else if(!--v){c=m,g=k;break e}++k}if(null!=c&&i!=c)return{from:e.Pos(i,u),to:e.Pos(c,g)}})),e.registerHelper("fold","import",(function(r,n){function t(n){if(n<r.firstLine()||n>r.lastLine())return null;var t=r.getTokenAt(e.Pos(n,1));if(/\S/.test(t.string)||(t=r.getTokenAt(e.Pos(n,t.end+1))),"keyword"!=t.type||"import"!=t.string)return null;for(var i=n,o=Math.min(r.lastLine(),n+10);i<=o;++i){var l=r.getLine(i).indexOf(";");if(-1!=l)return{startCh:t.end,end:e.Pos(i,l)}}}var i,o=n.line,l=t(o);if(!l||t(o-1)||(i=t(o-2))&&i.end.line==o-1)return null;for(var f=l.end;;){var s=t(f.line+1);if(null==s)break;f=s.end}return{from:r.clipPos(e.Pos(o,l.startCh+1)),to:f}})),e.registerHelper("fold","include",(function(r,n){function t(n){if(n<r.firstLine()||n>r.lastLine())return null;var t=r.getTokenAt(e.Pos(n,1));return/\S/.test(t.string)||(t=r.getTokenAt(e.Pos(n,t.end+1))),"meta"==t.type&&"#include"==t.string.slice(0,8)?t.start+8:void 0}var i=n.line,o=t(i);if(null==o||null!=t(i-1))return null;for(var l=i;;){if(null==t(l+1))break;++l}return{from:e.Pos(i,o+1),to:r.clipPos(e.Pos(l))}}))}));
|
||||
+1
@@ -0,0 +1 @@
|
||||
!function(e){"object"==typeof exports&&"object"==typeof module?e(require("../../lib/codemirror")):"function"==typeof define&&define.amd?define(["../../lib/codemirror"],e):e(CodeMirror)}((function(e){"use strict";e.registerGlobalHelper("fold","comment",(function(e){return e.blockCommentStart&&e.blockCommentEnd}),(function(t,n){var o=t.getModeAt(n),r=o.blockCommentStart,i=o.blockCommentEnd;if(r&&i){for(var f,l=n.line,c=t.getLine(l),m=n.ch,a=0;;){var d=m<=0?-1:c.lastIndexOf(r,m-1);if(-1!=d){if(1==a&&d<n.ch)return;if(/comment/.test(t.getTokenTypeAt(e.Pos(l,d+1)))&&(0==d||c.slice(d-i.length,d)==i||!/comment/.test(t.getTokenTypeAt(e.Pos(l,d))))){f=d+r.length;break}m=d-1}else{if(1==a)return;a=1,m=c.length}}var s,u,b=1,g=t.lastLine();e:for(var h=l;h<=g;++h)for(var k=t.getLine(h),p=h==l?f:0;;){var v=k.indexOf(r,p),y=k.indexOf(i,p);if(v<0&&(v=k.length),y<0&&(y=k.length),(p=Math.min(v,y))==k.length)break;if(p==v)++b;else if(!--b){s=h,u=p;break e}++p}if(null!=s&&(l!=s||u!=f))return{from:e.Pos(l,f),to:e.Pos(s,u)}}}))}));
|
||||
@@ -0,0 +1 @@
|
||||
!function(n){"object"==typeof exports&&"object"==typeof module?n(require("../../lib/codemirror")):"function"==typeof define&&define.amd?define(["../../lib/codemirror"],n):n(CodeMirror)}((function(n){"use strict";function o(o,e,t,i){if(t&&t.call){var l=t;t=null}else l=r(o,t,"rangeFinder");"number"==typeof e&&(e=n.Pos(e,0));var f=r(o,t,"minFoldSize");function d(n){var r=l(o,e);if(!r||r.to.line-r.from.line<f)return null;for(var t=o.findMarksAt(r.from),d=0;d<t.length;++d)if(t[d].__isFold&&"fold"!==i){if(!n)return null;r.cleared=!0,t[d].clear()}return r}var u=d(!0);if(r(o,t,"scanUp"))for(;!u&&e.line>o.firstLine();)e=n.Pos(e.line-1,0),u=d(!1);if(u&&!u.cleared&&"unfold"!==i){var a=function(n,o,e){var t=r(n,o,"widget");"function"==typeof t&&(t=t(e.from,e.to));if("string"==typeof t){var i=document.createTextNode(t);(t=document.createElement("span")).appendChild(i),t.className="CodeMirror-foldmarker"}else t&&(t=t.cloneNode(!0));return t}(o,t,u);n.on(a,"mousedown",(function(o){c.clear(),n.e_preventDefault(o)}));var c=o.markText(u.from,u.to,{replacedWith:a,clearOnEnter:r(o,t,"clearOnEnter"),__isFold:!0});c.on("clear",(function(e,r){n.signal(o,"unfold",o,e,r)})),n.signal(o,"fold",o,u.from,u.to)}}n.newFoldFunction=function(n,e){return function(r,t){o(r,t,{rangeFinder:n,widget:e})}},n.defineExtension("foldCode",(function(n,e,r){o(this,n,e,r)})),n.defineExtension("isFolded",(function(n){for(var o=this.findMarksAt(n),e=0;e<o.length;++e)if(o[e].__isFold)return!0})),n.commands.toggleFold=function(n){n.foldCode(n.getCursor())},n.commands.fold=function(n){n.foldCode(n.getCursor(),null,"fold")},n.commands.unfold=function(n){n.foldCode(n.getCursor(),null,"unfold")},n.commands.foldAll=function(o){o.operation((function(){for(var e=o.firstLine(),r=o.lastLine();e<=r;e++)o.foldCode(n.Pos(e,0),null,"fold")}))},n.commands.unfoldAll=function(o){o.operation((function(){for(var e=o.firstLine(),r=o.lastLine();e<=r;e++)o.foldCode(n.Pos(e,0),null,"unfold")}))},n.registerHelper("fold","combine",(function(){var n=Array.prototype.slice.call(arguments,0);return function(o,e){for(var r=0;r<n.length;++r){var t=n[r](o,e);if(t)return t}}})),n.registerHelper("fold","auto",(function(n,o){for(var e=n.getHelpers(o,"fold"),r=0;r<e.length;r++){var t=e[r](n,o);if(t)return t}}));var e={rangeFinder:n.fold.auto,widget:"↔",minFoldSize:0,scanUp:!1,clearOnEnter:!0};function r(n,o,r){if(o&&void 0!==o[r])return o[r];var t=n.options.foldOptions;return t&&void 0!==t[r]?t[r]:e[r]}n.defineOption("foldOptions",null),n.defineExtension("foldOption",(function(n,o){return r(this,n,o)}))}));
|
||||
+20
@@ -0,0 +1,20 @@
|
||||
.CodeMirror-foldmarker {
|
||||
color: blue;
|
||||
text-shadow: #b9f 1px 1px 2px, #b9f -1px -1px 2px, #b9f 1px -1px 2px, #b9f -1px 1px 2px;
|
||||
font-family: arial;
|
||||
line-height: .3;
|
||||
cursor: pointer;
|
||||
}
|
||||
.CodeMirror-foldgutter {
|
||||
width: .7em;
|
||||
}
|
||||
.CodeMirror-foldgutter-open,
|
||||
.CodeMirror-foldgutter-folded {
|
||||
cursor: pointer;
|
||||
}
|
||||
.CodeMirror-foldgutter-open:after {
|
||||
content: "\25BE";
|
||||
}
|
||||
.CodeMirror-foldgutter-folded:after {
|
||||
content: "\25B8";
|
||||
}
|
||||
@@ -0,0 +1 @@
|
||||
!function(t){"object"==typeof exports&&"object"==typeof module?t(require("../../lib/codemirror"),require("./foldcode")):"function"==typeof define&&define.amd?define(["../../lib/codemirror","./foldcode"],t):t(CodeMirror)}((function(t){"use strict";t.defineOption("foldGutter",!1,(function(o,r,n){n&&n!=t.Init&&(o.clearGutter(o.state.foldGutter.options.gutter),o.state.foldGutter=null,o.off("gutterClick",d),o.off("changes",u),o.off("viewportChange",l),o.off("fold",c),o.off("unfold",c),o.off("swapDoc",u)),r&&(o.state.foldGutter=new e(function(t){!0===t&&(t={});null==t.gutter&&(t.gutter="CodeMirror-foldgutter");null==t.indicatorOpen&&(t.indicatorOpen="CodeMirror-foldgutter-open");null==t.indicatorFolded&&(t.indicatorFolded="CodeMirror-foldgutter-folded");return t}(r)),a(o),o.on("gutterClick",d),o.on("changes",u),o.on("viewportChange",l),o.on("fold",c),o.on("unfold",c),o.on("swapDoc",u))}));var o=t.Pos;function e(t){this.options=t,this.from=this.to=0}function r(t,e){for(var r=t.findMarks(o(e,0),o(e+1,0)),n=0;n<r.length;++n)if(r[n].__isFold){var i=r[n].find(-1);if(i&&i.line===e)return r[n]}}function n(t){if("string"==typeof t){var o=document.createElement("div");return o.className=t+" CodeMirror-guttermarker-subtle",o}return t.cloneNode(!0)}function i(t,e,i){var a=t.state.foldGutter.options,d=e-1,u=t.foldOption(a,"minFoldSize"),l=t.foldOption(a,"rangeFinder"),c="string"==typeof a.indicatorFolded&&f(a.indicatorFolded),s="string"==typeof a.indicatorOpen&&f(a.indicatorOpen);t.eachLine(e,i,(function(e){++d;var i=null,f=e.gutterMarkers;if(f&&(f=f[a.gutter]),r(t,d)){if(c&&f&&c.test(f.className))return;i=n(a.indicatorFolded)}else{var p=o(d,0),m=l&&l(t,p);if(m&&m.to.line-m.from.line>=u){if(s&&f&&s.test(f.className))return;i=n(a.indicatorOpen)}}(i||f)&&t.setGutterMarker(e,a.gutter,i)}))}function f(t){return new RegExp("(^|\\s)"+t+"(?:$|\\s)\\s*")}function a(t){var o=t.getViewport(),e=t.state.foldGutter;e&&(t.operation((function(){i(t,o.from,o.to)})),e.from=o.from,e.to=o.to)}function d(t,e,n){var i=t.state.foldGutter;if(i){var f=i.options;if(n==f.gutter){var a=r(t,e);a?a.clear():t.foldCode(o(e,0),f)}}}function u(t){var o=t.state.foldGutter;if(o){var e=o.options;o.from=o.to=0,clearTimeout(o.changeUpdate),o.changeUpdate=setTimeout((function(){a(t)}),e.foldOnChangeTimeSpan||600)}}function l(t){var o=t.state.foldGutter;if(o){var e=o.options;clearTimeout(o.changeUpdate),o.changeUpdate=setTimeout((function(){var e=t.getViewport();o.from==o.to||e.from-o.to>20||o.from-e.to>20?a(t):t.operation((function(){e.from<o.from&&(i(t,e.from,o.from),o.from=e.from),e.to>o.to&&(i(t,o.to,e.to),o.to=e.to)}))}),e.updateViewportTimeSpan||400)}}function c(t,o){var e=t.state.foldGutter;if(e){var r=o.line;r>=e.from&&r<e.to&&i(t,r,r+1)}}}));
|
||||
@@ -0,0 +1 @@
|
||||
!function(e){"object"==typeof exports&&"object"==typeof module?e(require("../../lib/codemirror")):"function"==typeof define&&define.amd?define(["../../lib/codemirror"],e):e(CodeMirror)}((function(e){"use strict";function n(n,t){var i=n.getLine(t),o=i.search(/\S/);return-1==o||/\bcomment\b/.test(n.getTokenTypeAt(e.Pos(t,o+1)))?-1:e.countColumn(i,null,n.getOption("tabSize"))}e.registerHelper("fold","indent",(function(t,i){var o=n(t,i.line);if(!(o<0)){for(var r=null,l=i.line+1,f=t.lastLine();l<=f;++l){var u=n(t,l);if(-1==u);else{if(!(u>o))break;r=l}}return r?{from:e.Pos(i.line,t.getLine(i.line).length),to:e.Pos(r,t.getLine(r).length)}:void 0}}))}));
|
||||
+1
@@ -0,0 +1 @@
|
||||
!function(e){"object"==typeof exports&&"object"==typeof module?e(require("../../lib/codemirror")):"function"==typeof define&&define.amd?define(["../../lib/codemirror"],e):e(CodeMirror)}((function(e){"use strict";e.registerHelper("fold","markdown",(function(n,t){function r(t){var r=n.getTokenTypeAt(e.Pos(t,0));return r&&/\bheader\b/.test(r)}function i(e,n,t){var i=n&&n.match(/^#+/);return i&&r(e)?i[0].length:(i=t&&t.match(/^[=\-]+\s*$/))&&r(e+1)?"="==t[0]?1:2:100}var o=n.getLine(t.line),f=n.getLine(t.line+1),l=i(t.line,o,f);if(100!==l){for(var c=n.lastLine(),u=t.line,d=n.getLine(u+2);u<c&&!(i(u+1,f,d)<=l);)++u,f=d,d=n.getLine(u+2);return{from:e.Pos(t.line,o.length),to:e.Pos(u,n.getLine(u).length)}}}))}));
|
||||
@@ -0,0 +1 @@
|
||||
!function(e){"object"==typeof exports&&"object"==typeof module?e(require("../../lib/codemirror")):"function"==typeof define&&define.amd?define(["../../lib/codemirror"],e):e(CodeMirror)}((function(e){"use strict";var n=e.Pos;function t(e,n){return e.line-n.line||e.ch-n.ch}var i="A-Z_a-z\\u00C0-\\u00D6\\u00D8-\\u00F6\\u00F8-\\u02FF\\u0370-\\u037D\\u037F-\\u1FFF\\u200C-\\u200D\\u2070-\\u218F\\u2C00-\\u2FEF\\u3001-\\uD7FF\\uF900-\\uFDCF\\uFDF0-\\uFFFD",r=new RegExp("<(/?)(["+i+"][A-Z_a-z\\u00C0-\\u00D6\\u00D8-\\u00F6\\u00F8-\\u02FF\\u0370-\\u037D\\u037F-\\u1FFF\\u200C-\\u200D\\u2070-\\u218F\\u2C00-\\u2FEF\\u3001-\\uD7FF\\uF900-\\uFDCF\\uFDF0-\\uFFFD-:.0-9\\u00B7\\u0300-\\u036F\\u203F-\\u2040]*)","g");function u(e,n,t,i){this.line=n,this.ch=t,this.cm=e,this.text=e.getLine(n),this.min=i?Math.max(i.from,e.firstLine()):e.firstLine(),this.max=i?Math.min(i.to-1,e.lastLine()):e.lastLine()}function f(e,t){var i=e.cm.getTokenTypeAt(n(e.line,t));return i&&/\btag\b/.test(i)}function o(e){if(!(e.line>=e.max))return e.ch=0,e.text=e.cm.getLine(++e.line),!0}function l(e){if(!(e.line<=e.min))return e.text=e.cm.getLine(--e.line),e.ch=e.text.length,!0}function c(e){for(;;){var n=e.text.indexOf(">",e.ch);if(-1==n){if(o(e))continue;return}if(f(e,n+1)){var t=e.text.lastIndexOf("/",n),i=t>-1&&!/\S/.test(e.text.slice(t+1,n));return e.ch=n+1,i?"selfClose":"regular"}e.ch=n+1}}function a(e){for(;;){var n=e.ch?e.text.lastIndexOf("<",e.ch-1):-1;if(-1==n){if(l(e))continue;return}if(f(e,n+1)){r.lastIndex=n,e.ch=n;var t=r.exec(e.text);if(t&&t.index==n)return t}else e.ch=n}}function s(e){for(;;){r.lastIndex=e.ch;var n=r.exec(e.text);if(!n){if(o(e))continue;return}if(f(e,n.index+1))return e.ch=n.index+n[0].length,n;e.ch=n.index+1}}function h(e){for(;;){var n=e.ch?e.text.lastIndexOf(">",e.ch-1):-1;if(-1==n){if(l(e))continue;return}if(f(e,n+1)){var t=e.text.lastIndexOf("/",n),i=t>-1&&!/\S/.test(e.text.slice(t+1,n));return e.ch=n+1,i?"selfClose":"regular"}e.ch=n}}function F(e,t){for(var i=[];;){var r,u=s(e),f=e.line,o=e.ch-(u?u[0].length:0);if(!u||!(r=c(e)))return;if("selfClose"!=r)if(u[1]){for(var l=i.length-1;l>=0;--l)if(i[l]==u[2]){i.length=l;break}if(l<0&&(!t||t==u[2]))return{tag:u[2],from:n(f,o),to:n(e.line,e.ch)}}else i.push(u[2])}}function x(e,t){for(var i=[];;){var r=h(e);if(!r)return;if("selfClose"!=r){var u=e.line,f=e.ch,o=a(e);if(!o)return;if(o[1])i.push(o[2]);else{for(var l=i.length-1;l>=0;--l)if(i[l]==o[2]){i.length=l;break}if(l<0&&(!t||t==o[2]))return{tag:o[2],from:n(e.line,e.ch),to:n(u,f)}}}else a(e)}}e.registerHelper("fold","xml",(function(e,i){for(var r=new u(e,i.line,0);;){var f=s(r);if(!f||r.line!=i.line)return;var o=c(r);if(!o)return;if(!f[1]&&"selfClose"!=o){var l=n(r.line,r.ch),a=F(r,f[2]);return a&&t(a.from,l)>0?{from:l,to:a.from}:null}}})),e.findMatchingTag=function(e,i,r){var f=new u(e,i.line,i.ch,r);if(-1!=f.text.indexOf(">")||-1!=f.text.indexOf("<")){var o=c(f),l=o&&n(f.line,f.ch),s=o&&a(f);if(o&&s&&!(t(f,i)>0)){var h={from:n(f.line,f.ch),to:l,tag:s[2]};return"selfClose"==o?{open:h,close:null,at:"open"}:s[1]?{open:x(f,s[2]),close:h,at:"close"}:{open:h,close:F(f=new u(e,l.line,l.ch,r),s[2]),at:"open"}}}},e.findEnclosingTag=function(e,n,t,i){for(var r=new u(e,n.line,n.ch,t);;){var f=x(r,i);if(!f)break;var o=F(new u(e,n.line,n.ch,t),f.tag);if(o)return{open:f,close:o}}},e.scanForClosingTag=function(e,n,t,i){return F(new u(e,n.line,n.ch,i?{from:0,to:i}:null),t)}}));
|
||||
+1
@@ -0,0 +1 @@
|
||||
!function(e){"object"==typeof exports&&"object"==typeof module?e(require("../../lib/codemirror")):"function"==typeof define&&define.amd?define(["../../lib/codemirror"],e):e(CodeMirror)}((function(e){"use strict";var r=/[\w$]+/;e.registerHelper("hint","anyword",(function(t,o){for(var i=o&&o.word||r,n=o&&o.range||500,f=t.getCursor(),s=t.getLine(f.line),a=f.ch,c=a;c&&i.test(s.charAt(c-1));)--c;for(var l=c!=a&&s.slice(c,a),d=o&&o.list||[],u={},p=new RegExp(i.source,"g"),g=-1;g<=1;g+=2)for(var h=f.line,m=Math.min(Math.max(h+g*n,t.firstLine()),t.lastLine())+g;h!=m;h+=g)for(var y,b=t.getLine(h);y=p.exec(b);)h==f.line&&y[0]===l||l&&0!=y[0].lastIndexOf(l,0)||Object.prototype.hasOwnProperty.call(u,y[0])||(u[y[0]]=!0,d.push(y[0]));return{list:d,from:e.Pos(f.line,c),to:e.Pos(f.line,a)}}))}));
|
||||
@@ -0,0 +1 @@
|
||||
!function(e){"object"==typeof exports&&"object"==typeof module?e(require("../../lib/codemirror"),require("../../mode/css/css")):"function"==typeof define&&define.amd?define(["../../lib/codemirror","../../mode/css/css"],e):e(CodeMirror)}((function(e){"use strict";var t={active:1,after:1,before:1,checked:1,default:1,disabled:1,empty:1,enabled:1,"first-child":1,"first-letter":1,"first-line":1,"first-of-type":1,focus:1,hover:1,"in-range":1,indeterminate:1,invalid:1,lang:1,"last-child":1,"last-of-type":1,link:1,not:1,"nth-child":1,"nth-last-child":1,"nth-last-of-type":1,"nth-of-type":1,"only-of-type":1,"only-child":1,optional:1,"out-of-range":1,placeholder:1,"read-only":1,"read-write":1,required:1,root:1,selection:1,target:1,valid:1,visited:1};e.registerHelper("hint","css",(function(r){var o=r.getCursor(),i=r.getTokenAt(o),s=e.innerMode(r.getMode(),i.state);if("css"==s.mode.name){if("keyword"==i.type&&0=="!important".indexOf(i.string))return{list:["!important"],from:e.Pos(o.line,i.start),to:e.Pos(o.line,i.end)};var n=i.start,a=o.ch,d=i.string.slice(0,a-n);/[^\w$_-]/.test(d)&&(d="",n=a=o.ch);var l=e.resolveMode("text/css"),c=[],f=s.state.state;return"pseudo"==f||"variable-3"==i.type?p(t):"block"==f||"maybeprop"==f?p(l.propertyKeywords):"prop"==f||"parens"==f||"at"==f||"params"==f?(p(l.valueKeywords),p(l.colorKeywords)):"media"!=f&&"media_parens"!=f||(p(l.mediaTypes),p(l.mediaFeatures)),c.length?{list:c,from:e.Pos(o.line,n),to:e.Pos(o.line,a)}:void 0}function p(e){for(var t in e)d&&0!=t.lastIndexOf(d,0)||c.push(t)}}))}));
|
||||
@@ -0,0 +1 @@
|
||||
!function(l){"object"==typeof exports&&"object"==typeof module?l(require("../../lib/codemirror"),require("./xml-hint")):"function"==typeof define&&define.amd?define(["../../lib/codemirror","./xml-hint"],l):l(CodeMirror)}((function(l){"use strict";var t="ab aa af ak sq am ar an hy as av ae ay az bm ba eu be bn bh bi bs br bg my ca ch ce ny zh cv kw co cr hr cs da dv nl dz en eo et ee fo fj fi fr ff gl ka de el gn gu ht ha he hz hi ho hu ia id ie ga ig ik io is it iu ja jv kl kn kr ks kk km ki rw ky kv kg ko ku kj la lb lg li ln lo lt lu lv gv mk mg ms ml mt mi mr mh mn na nv nb nd ne ng nn no ii nr oc oj cu om or os pa pi fa pl ps pt qu rm rn ro ru sa sc sd se sm sg sr gd sn si sk sl so st es su sw ss sv ta te tg th ti bo tk tl tn to tr ts tt tw ty ug uk ur uz ve vi vo wa cy wo fy xh yi yo za zu".split(" "),e=["_blank","_self","_top","_parent"],a=["ascii","utf-8","utf-16","latin1","latin1"],n=["get","post","put","delete"],r=["application/x-www-form-urlencoded","multipart/form-data","text/plain"],o=["all","screen","print","embossed","braille","handheld","print","projection","screen","tty","tv","speech","3d-glasses","resolution [>][<][=] [X]","device-aspect-ratio: X/Y","orientation:portrait","orientation:landscape","device-height: [X]","device-width: [X]"],s={attrs:{}},u={a:{attrs:{href:null,ping:null,type:null,media:o,target:e,hreflang:t}},abbr:s,acronym:s,address:s,applet:s,area:{attrs:{alt:null,coords:null,href:null,target:null,ping:null,media:o,hreflang:t,type:null,shape:["default","rect","circle","poly"]}},article:s,aside:s,audio:{attrs:{src:null,mediagroup:null,crossorigin:["anonymous","use-credentials"],preload:["none","metadata","auto"],autoplay:["","autoplay"],loop:["","loop"],controls:["","controls"]}},b:s,base:{attrs:{href:null,target:e}},basefont:s,bdi:s,bdo:s,big:s,blockquote:{attrs:{cite:null}},body:s,br:s,button:{attrs:{form:null,formaction:null,name:null,value:null,autofocus:["","autofocus"],disabled:["","autofocus"],formenctype:r,formmethod:n,formnovalidate:["","novalidate"],formtarget:e,type:["submit","reset","button"]}},canvas:{attrs:{width:null,height:null}},caption:s,center:s,cite:s,code:s,col:{attrs:{span:null}},colgroup:{attrs:{span:null}},command:{attrs:{type:["command","checkbox","radio"],label:null,icon:null,radiogroup:null,command:null,title:null,disabled:["","disabled"],checked:["","checked"]}},data:{attrs:{value:null}},datagrid:{attrs:{disabled:["","disabled"],multiple:["","multiple"]}},datalist:{attrs:{data:null}},dd:s,del:{attrs:{cite:null,datetime:null}},details:{attrs:{open:["","open"]}},dfn:s,dir:s,div:s,dialog:{attrs:{open:null}},dl:s,dt:s,em:s,embed:{attrs:{src:null,type:null,width:null,height:null}},eventsource:{attrs:{src:null}},fieldset:{attrs:{disabled:["","disabled"],form:null,name:null}},figcaption:s,figure:s,font:s,footer:s,form:{attrs:{action:null,name:null,"accept-charset":a,autocomplete:["on","off"],enctype:r,method:n,novalidate:["","novalidate"],target:e}},frame:s,frameset:s,h1:s,h2:s,h3:s,h4:s,h5:s,h6:s,head:{attrs:{},children:["title","base","link","style","meta","script","noscript","command"]},header:s,hgroup:s,hr:s,html:{attrs:{manifest:null},children:["head","body"]},i:s,iframe:{attrs:{src:null,srcdoc:null,name:null,width:null,height:null,sandbox:["allow-top-navigation","allow-same-origin","allow-forms","allow-scripts"],seamless:["","seamless"]}},img:{attrs:{alt:null,src:null,ismap:null,usemap:null,width:null,height:null,crossorigin:["anonymous","use-credentials"]}},input:{attrs:{alt:null,dirname:null,form:null,formaction:null,height:null,list:null,max:null,maxlength:null,min:null,name:null,pattern:null,placeholder:null,size:null,src:null,step:null,value:null,width:null,accept:["audio/*","video/*","image/*"],autocomplete:["on","off"],autofocus:["","autofocus"],checked:["","checked"],disabled:["","disabled"],formenctype:r,formmethod:n,formnovalidate:["","novalidate"],formtarget:e,multiple:["","multiple"],readonly:["","readonly"],required:["","required"],type:["hidden","text","search","tel","url","email","password","datetime","date","month","week","time","datetime-local","number","range","color","checkbox","radio","file","submit","image","reset","button"]}},ins:{attrs:{cite:null,datetime:null}},kbd:s,keygen:{attrs:{challenge:null,form:null,name:null,autofocus:["","autofocus"],disabled:["","disabled"],keytype:["RSA"]}},label:{attrs:{for:null,form:null}},legend:s,li:{attrs:{value:null}},link:{attrs:{href:null,type:null,hreflang:t,media:o,sizes:["all","16x16","16x16 32x32","16x16 32x32 64x64"]}},map:{attrs:{name:null}},mark:s,menu:{attrs:{label:null,type:["list","context","toolbar"]}},meta:{attrs:{content:null,charset:a,name:["viewport","application-name","author","description","generator","keywords"],"http-equiv":["content-language","content-type","default-style","refresh"]}},meter:{attrs:{value:null,min:null,low:null,high:null,max:null,optimum:null}},nav:s,noframes:s,noscript:s,object:{attrs:{data:null,type:null,name:null,usemap:null,form:null,width:null,heightLine truncated
|
||||
+1
@@ -0,0 +1 @@
|
||||
!function(t){"object"==typeof exports&&"object"==typeof module?t(require("../../lib/codemirror")):"function"==typeof define&&define.amd?define(["../../lib/codemirror"],t):t(CodeMirror)}((function(t){var e=t.Pos;function r(t,e){for(var r=0,n=t.length;r<n;++r)e(t[r])}function n(r,n,i,o){var s=r.getCursor(),a=i(r,s);if(!/\b(?:string|comment)\b/.test(a.type)){var l=t.innerMode(r.getMode(),a.state);if("json"!==l.mode.helperType){a.state=l.state,/^[\w$_]*$/.test(a.string)?a.end>s.ch&&(a.end=s.ch,a.string=a.string.slice(0,s.ch-a.start)):a={start:s.ch,end:s.ch,string:"",state:a.state,type:"."==a.string?"property":null};for(var f=a;"property"==f.type;){if("."!=(f=i(r,e(s.line,f.start))).string)return;if(f=i(r,e(s.line,f.start)),!p)var p=[];p.push(f)}return{list:c(a,p,n,o),from:e(s.line,a.start),to:e(s.line,a.end)}}}}function i(t,e){var r=t.getTokenAt(e);return e.ch==r.start+1&&"."==r.string.charAt(0)?(r.end=r.start,r.string=".",r.type="property"):/^\.[\w$_]*$/.test(r.string)&&(r.type="property",r.start++,r.string=r.string.replace(/\./,"")),r}t.registerHelper("hint","javascript",(function(t,e){return n(t,l,(function(t,e){return t.getTokenAt(e)}),e)})),t.registerHelper("hint","coffeescript",(function(t,e){return n(t,f,i,e)}));var o="charAt charCodeAt indexOf lastIndexOf substring substr slice trim trimLeft trimRight toUpperCase toLowerCase split concat match replace search".split(" "),s="length concat join splice push pop shift unshift slice reverse sort indexOf lastIndexOf every some filter forEach map reduce reduceRight ".split(" "),a="prototype apply call bind".split(" "),l="break case catch class const continue debugger default delete do else export extends false finally for function if in import instanceof new null return super switch this throw true try typeof var void while with yield".split(" "),f="and break catch class continue delete do else extends false finally for if in instanceof isnt new no not null of off on or return switch then throw true try typeof until void while with yes".split(" ");function c(t,e,n,i){var l=[],f=t.string,c=i&&i.globalScope||window;function p(t){0!=t.lastIndexOf(f,0)||function(t,e){if(!Array.prototype.indexOf){for(var r=t.length;r--;)if(t[r]===e)return!0;return!1}return-1!=t.indexOf(e)}(l,t)||l.push(t)}function u(t){"string"==typeof t?r(o,p):t instanceof Array?r(s,p):t instanceof Function&&r(a,p),function(t,e){if(Object.getOwnPropertyNames&&Object.getPrototypeOf)for(var r=t;r;r=Object.getPrototypeOf(r))Object.getOwnPropertyNames(r).forEach(e);else for(var n in t)e(n)}(t,p)}if(e&&e.length){var d,g=e.pop();for(g.type&&0===g.type.indexOf("variable")?(i&&i.additionalContext&&(d=i.additionalContext[g.string]),i&&!1===i.useGlobalScope||(d=d||c[g.string])):"string"==g.type?d="":"atom"==g.type?d=1:"function"==g.type&&(null==c.jQuery||"$"!=g.string&&"jQuery"!=g.string||"function"!=typeof c.jQuery?null!=c._&&"_"==g.string&&"function"==typeof c._&&(d=c._()):d=c.jQuery());null!=d&&e.length;)d=d[e.pop().string];null!=d&&u(d)}else{for(var y=t.state.localVars;y;y=y.next)p(y.name);for(var h=t.state.context;h;h=h.prev)for(y=h.vars;y;y=y.next)p(y.name);for(y=t.state.globalVars;y;y=y.next)p(y.name);if(i&&null!=i.additionalContext)for(var v in i.additionalContext)p(v);i&&!1===i.useGlobalScope||u(c),r(n,p)}return l}}));
|
||||
@@ -0,0 +1,36 @@
|
||||
.CodeMirror-hints {
|
||||
position: absolute;
|
||||
z-index: 10;
|
||||
overflow: hidden;
|
||||
list-style: none;
|
||||
|
||||
margin: 0;
|
||||
padding: 2px;
|
||||
|
||||
-webkit-box-shadow: 2px 3px 5px rgba(0,0,0,.2);
|
||||
-moz-box-shadow: 2px 3px 5px rgba(0,0,0,.2);
|
||||
box-shadow: 2px 3px 5px rgba(0,0,0,.2);
|
||||
border-radius: 3px;
|
||||
border: 1px solid silver;
|
||||
|
||||
background: white;
|
||||
font-size: 90%;
|
||||
font-family: monospace;
|
||||
|
||||
max-height: 20em;
|
||||
overflow-y: auto;
|
||||
}
|
||||
|
||||
.CodeMirror-hint {
|
||||
margin: 0;
|
||||
padding: 0 4px;
|
||||
border-radius: 2px;
|
||||
white-space: pre;
|
||||
color: black;
|
||||
cursor: pointer;
|
||||
}
|
||||
|
||||
li.CodeMirror-hint-active {
|
||||
background: #08f;
|
||||
color: white;
|
||||
}
|
||||
@@ -0,0 +1 @@
|
||||
!function(t){"object"==typeof exports&&"object"==typeof module?t(require("../../lib/codemirror")):"function"==typeof define&&define.amd?define(["../../lib/codemirror"],t):t(CodeMirror)}((function(t){"use strict";function i(t,i){if(this.cm=t,this.options=i,this.widget=null,this.debounce=0,this.tick=0,this.startPos=this.cm.getCursor("start"),this.startLen=this.cm.getLine(this.startPos.line).length-this.cm.getSelection().length,this.options.updateOnCursorActivity){var e=this;t.on("cursorActivity",this.activityFunc=function(){e.cursorActivity()})}}t.showHint=function(t,i,e){if(!i)return t.showHint(e);e&&e.async&&(i.async=!0);var n={hint:i};if(e)for(var o in e)n[o]=e[o];return t.showHint(n)},t.defineExtension("showHint",(function(e){e=function(t,i,e){var n=t.options.hintOptions,o={};for(var s in l)o[s]=l[s];if(n)for(var s in n)void 0!==n[s]&&(o[s]=n[s]);if(e)for(var s in e)void 0!==e[s]&&(o[s]=e[s]);o.hint.resolve&&(o.hint=o.hint.resolve(t,i));return o}(this,this.getCursor("start"),e);var n=this.listSelections();if(!(n.length>1)){if(this.somethingSelected()){if(!e.hint.supportsSelection)return;for(var o=0;o<n.length;o++)if(n[o].head.line!=n[o].anchor.line)return}this.state.completionActive&&this.state.completionActive.close();var s=this.state.completionActive=new i(this,e);s.options.hint&&(t.signal(this,"startCompletion",this),s.update(!0))}})),t.defineExtension("closeHint",(function(){this.state.completionActive&&this.state.completionActive.close()}));var e=window.requestAnimationFrame||function(t){return setTimeout(t,1e3/60)},n=window.cancelAnimationFrame||clearTimeout;function o(t){return"string"==typeof t?t:t.text}function s(t,i){for(;i&&i!=t;){if("LI"===i.nodeName.toUpperCase()&&i.parentNode==t)return i;i=i.parentNode}}function c(i,e){this.completion=i,this.data=e,this.picked=!1;var n=this,c=i.cm,r=c.getInputField().ownerDocument,l=r.defaultView||r.parentWindow,h=this.hints=r.createElement("ul"),a=i.cm.options.theme;h.className="CodeMirror-hints "+a,this.selectedHint=e.selectedHint||0;for(var f=e.list,u=0;u<f.length;++u){var p=h.appendChild(r.createElement("li")),d=f[u],m="CodeMirror-hint"+(u!=this.selectedHint?"":" CodeMirror-hint-active");null!=d.className&&(m=d.className+" "+m),p.className=m,d.render?d.render(p,e,d):p.appendChild(r.createTextNode(d.displayText||o(d))),p.hintId=u}var g=i.options.container||r.body,v=c.cursorCoords(i.options.alignWithWord?e.from:null),y=v.left,w=v.bottom,C=!0,H=0,b=0;if(g!==r.body){var k=-1!==["absolute","relative","fixed"].indexOf(l.getComputedStyle(g).position)?g:g.offsetParent,A=k.getBoundingClientRect(),S=r.body.getBoundingClientRect();H=A.left-S.left-k.scrollLeft,b=A.top-S.top-k.scrollTop}h.style.left=y-H+"px",h.style.top=w-b+"px";var x=l.innerWidth||Math.max(r.body.offsetWidth,r.documentElement.offsetWidth),T=l.innerHeight||Math.max(r.body.offsetHeight,r.documentElement.offsetHeight);g.appendChild(h);var M,O=i.options.moveOnOverlap?h.getBoundingClientRect():new DOMRect,F=!!i.options.paddingForScrollbar&&h.scrollHeight>h.clientHeight+1;if(setTimeout((function(){M=c.getScrollInfo()})),O.bottom-T>0){var N=O.bottom-O.top;if(v.top-(v.bottom-O.top)-N>0)h.style.top=(w=v.top-N-b)+"px",C=!1;else if(N>T){h.style.height=T-5+"px",h.style.top=(w=v.bottom-O.top-b)+"px";var P=c.getCursor();e.from.ch!=P.ch&&(v=c.cursorCoords(P),h.style.left=(y=v.left-H)+"px",O=h.getBoundingClientRect())}}var E,W=O.right-x;if(F&&(W+=c.display.nativeBarWidth),W>0&&(O.right-O.left>x&&(h.style.width=x-5+"px",W-=O.right-O.left-x),h.style.left=(y=v.left-W-H)+"px"),F)for(var I=h.firstChild;I;I=I.nextSibling)I.style.paddingRight=c.display.nativeBarWidth+"px";(c.addKeyMap(this.keyMap=function(t,i){var e={Up:function(){i.moveFocus(-1)},Down:function(){i.moveFocus(1)},PageUp:function(){i.moveFocus(1-i.menuSize(),!0)},PageDown:function(){i.moveFocus(i.menuSize()-1,!0)},Home:function(){i.setFocus(0)},End:function(){i.setFocus(i.length-1)},Enter:i.pick,Tab:i.pick,Esc:i.close};/Mac/.test(navigator.platform)&&(e["Ctrl-P"]=function(){i.moveFocus(-1)},e["Ctrl-N"]=function(){i.moveFocus(1)});var n=t.options.customKeys,o=n?{}:e;function s(t,n){var s;s="string"!=typeof n?function(t){return n(t,i)}:e.hasOwnProperty(n)?e[n]:n,o[t]=s}if(n)for(var c in n)n.hasOwnProperty(c)&&s(c,n[c]);var r=t.options.extraKeys;if(r)for(var c in r)r.hasOwnProperty(c)&&s(c,r[c]);return o}(i,{moveFocus:function(t,i){n.changeActive(n.selectedHint+t,i)},setFocus:function(t){n.changeActive(t)},menuSize:function(){return n.screenAmount()},length:f.length,close:function(){i.close()},pick:function(){n.pick()},data:e})),i.options.closeOnUnfocus)&&(c.on("blur",this.onBlur=function(){E=setTimeout((function(){i.close()}),100)}),c.on("focus",this.onFocus=function(){clearTimeout(E)}));c.on("scroll",this.onScroll=function(){var t=c.getScrollInfo(),e=c.getWrapperElement().getBoundingClientRect();M||(M=c.getScrollInfo());var n=w+M.top-t.top,o=n-(l.pageYOffset||(r.documentElement||r.body).scrollTop);if(C||(o+=h.offsetHeight),o<=e.top||o>=e.bottom)return i.cloLine truncated
|
||||
@@ -0,0 +1 @@
|
||||
!function(t){"object"==typeof exports&&"object"==typeof module?t(require("../../lib/codemirror"),require("../../mode/sql/sql")):"function"==typeof define&&define.amd?define(["../../lib/codemirror","../../mode/sql/sql"],t):t(CodeMirror)}((function(t){"use strict";var e,r,n,o,i=";",s="AS",a=t.Pos,u=t.cmpPos;function l(t){return"[object Array]"==Object.prototype.toString.call(t)}function f(t){return"string"==typeof t?t:t.text}function c(t,e){return l(e)&&(e={columns:e}),e.text||(e.text=t),e}function p(t){return e[t.toUpperCase()]}function d(t){var e={};for(var r in t)t.hasOwnProperty(r)&&(e[r]=t[r]);return e}function g(t,e){var r=t.length,n=f(e).substr(0,r);return t.toUpperCase()===n.toUpperCase()}function h(t,e,r,n){if(l(r))for(var o=0;o<r.length;o++)g(e,r[o])&&t.push(n(r[o]));else for(var i in r)if(r.hasOwnProperty(i)){var s=r[i];g(e,s=s&&!0!==s?s.displayText?{text:s.text,displayText:s.displayText}:s.text:i)&&t.push(n(s))}}function v(t){"."==t.charAt(0)&&(t=t.substr(1));for(var e=t.split(o+o),r=0;r<e.length;r++)e[r]=e[r].replace(new RegExp(o,"g"),"");return e.join(o)}function x(t){for(var e=f(t).split("."),r=0;r<e.length;r++)e[r]=o+e[r].replace(new RegExp(o,"g"),o+o)+o;var n=e.join(".");return"string"==typeof t?n:((t=d(t)).text=n,t)}function m(t,e){for(var r=t.split(/\s+/),n=0;n<r.length;n++)r[n]&&e(r[n].replace(/[`,;]/g,""))}function b(t,e){for(var r=e.doc,n=r.getValue(),o=t.toUpperCase(),l="",f="",c=[],d={start:a(0,0),end:a(e.lastLine(),e.getLineHandle(e.lastLine()).length)},g=n.indexOf(i);-1!=g;)c.push(r.posFromIndex(g)),g=n.indexOf(i,g+1);c.unshift(a(0,0)),c.push(a(e.lastLine(),e.getLineHandle(e.lastLine()).text.length));for(var h=null,v=e.getCursor(),x=0;x<c.length;x++){if((null==h||u(v,h)>0)&&u(v,c[x])<=0){d={start:h,end:c[x]};break}h=c[x]}if(d.start){var b=r.getRange(d.start,d.end,!1);for(x=0;x<b.length;x++){if(m(b[x],(function(t){var e=t.toUpperCase();e===o&&p(l)&&(f=l),e!==s&&(l=t)})),f)break}}return f}t.registerHelper("hint","sql",(function(i,s){e=function(t){var e={};if(l(t))for(var r=t.length-1;r>=0;r--){var n=t[r];e[f(n).toUpperCase()]=c(f(n),n)}else if(t)for(var o in t)e[o.toUpperCase()]=c(o,t[o]);return e}(s&&s.tables);var u=s&&s.defaultTable,g=s&&s.disableKeywords;r=u&&p(u),n=function(e){var r=e.doc.modeOption;return"sql"===r&&(r="text/x-sql"),t.resolveMode(r).keywords}(i),o=function(e){var r=e.doc.modeOption;return"sql"===r&&(r="text/x-sql"),t.resolveMode(r).identifierQuote||"`"}(i),u&&!r&&(r=b(u,i)),(r=r||[]).columns&&(r=r.columns);var m,y,C,q=i.getCursor(),A=[],j=i.getTokenAt(q);if(j.end>q.ch&&(j.end=q.ch,j.string=j.string.slice(0,q.ch-j.start)),j.string.match(/^[.`"'\w@][\w$#]*$/g)?(C=j.string,m=j.start,y=j.end):(m=y=q.ch,C=""),"."==C.charAt(0)||C.charAt(0)==o)m=function(t,n,i,s){for(var u=!1,l=[],f=n.start,c=!0;c;)c="."==n.string.charAt(0),u=u||n.string.charAt(0)==o,f=n.start,l.unshift(v(n.string)),"."==(n=s.getTokenAt(a(t.line,n.start))).string&&(c=!0,n=s.getTokenAt(a(t.line,n.start)));var g=l.join(".");h(i,g,e,(function(t){return u?x(t):t})),h(i,g,r,(function(t){return u?x(t):t})),g=l.pop();var m=l.join("."),y=!1,C=m;if(!p(m)){var q=m;(m=b(m,s))!==q&&(y=!0)}var A=p(m);return A&&A.columns&&(A=A.columns),A&&h(i,g,A,(function(t){var e=m;return 1==y&&(e=C),"string"==typeof t?t=e+"."+t:(t=d(t)).text=e+"."+t.text,u?x(t):t})),f}(q,j,A,i);else{var w=function(t,e){return"object"==typeof t?t.className=e:t={text:t,className:e},t};h(A,C,r,(function(t){return w(t,"CodeMirror-hint-table CodeMirror-hint-default-table")})),h(A,C,e,(function(t){return w(t,"CodeMirror-hint-table")})),g||h(A,C,n,(function(t){return w(t.toUpperCase(),"CodeMirror-hint-keyword")}))}return{list:A,from:a(q.line,m),to:a(q.line,y)}}))}));
|
||||
@@ -0,0 +1 @@
|
||||
!function(t){"object"==typeof exports&&"object"==typeof module?t(require("../../lib/codemirror")):"function"==typeof define&&define.amd?define(["../../lib/codemirror"],t):t(CodeMirror)}((function(t){"use strict";var e=t.Pos;function r(t,e,r){return r?t.indexOf(e)>=0:0==t.lastIndexOf(e,0)}t.registerHelper("hint","xml",(function(n,i){var s=i&&i.schemaInfo,a=i&&i.quoteChar||'"',o=i&&i.matchInMiddle;if(s){var l=n.getCursor(),f=n.getTokenAt(l);if(f.end>l.ch&&(f.end=l.ch,f.string=f.string.slice(0,l.ch-f.start)),(x=t.innerMode(n.getMode(),f.state)).mode.xmlCurrentTag){var g,c,h=[],u=!1,d=/\btag\b/.test(f.type)&&!/>$/.test(f.string),p=d&&/^\w/.test(f.string);if(p){var m=n.getLine(l.line).slice(Math.max(0,f.start-2),f.start),v=/<\/$/.test(m)?"close":/<$/.test(m)?"open":null;v&&(c=f.start-("close"==v?2:1))}else d&&"<"==f.string?v="open":d&&"</"==f.string&&(v="close");var y=x.mode.xmlCurrentTag(x.state);if(!d&&!y||v){p&&(g=f.string),u=v;var x,C=x.mode.xmlCurrentContext?x.mode.xmlCurrentContext(x.state):[],b=(x=C.length&&C[C.length-1])&&s[x],O=x?b&&b.children:s["!top"];if(O&&"close"!=v)for(var w=0;w<O.length;++w)g&&!r(O[w],g,o)||h.push("<"+O[w]);else if("close"!=v)for(var A in s)!s.hasOwnProperty(A)||"!top"==A||"!attrs"==A||g&&!r(A,g,o)||h.push("<"+A);x&&(!g||"close"==v&&r(x,g,o))&&h.push("</"+x+">")}else{var M=(b=y&&s[y.name])&&b.attrs,P=s["!attrs"];if(!M&&!P)return;if(M){if(P){var $={};for(var I in P)P.hasOwnProperty(I)&&($[I]=P[I]);for(var I in M)M.hasOwnProperty(I)&&($[I]=M[I]);M=$}}else M=P;if("string"==f.type||"="==f.string){var T,j=(m=n.getRange(e(l.line,Math.max(0,l.ch-60)),e(l.line,"string"==f.type?f.start:f.end))).match(/([^\s\u00a0=<>\"\']+)=$/);if(!j||!M.hasOwnProperty(j[1])||!(T=M[j[1]]))return;if("function"==typeof T&&(T=T.call(this,n)),"string"==f.type){g=f.string;var q=0;/['"]/.test(f.string.charAt(0))&&(a=f.string.charAt(0),g=f.string.slice(1),q++);var L=f.string.length;if(/['"]/.test(f.string.charAt(L-1))&&(a=f.string.charAt(L-1),g=f.string.substr(q,L-2)),q){var k=n.getLine(l.line);k.length>f.end&&k.charAt(f.end)==a&&f.end++}u=!0}var H=function(t){if(t)for(var e=0;e<t.length;++e)g&&!r(t[e],g,o)||h.push(a+t[e]+a);return z()};return T&&T.then?T.then(H):H(T)}for(var R in"attribute"==f.type&&(g=f.string,u=!0),M)!M.hasOwnProperty(R)||g&&!r(R,g,o)||h.push(R)}return z()}}function z(){return{list:h,from:u?e(l.line,null==c?f.start:c):l,to:u?e(l.line,f.end):l}}}))}));
|
||||
+1
@@ -0,0 +1 @@
|
||||
!function(e){"object"==typeof exports&&"object"==typeof module?e(require("../../lib/codemirror")):"function"==typeof define&&define.amd?define(["../../lib/codemirror"],e):e(CodeMirror)}((function(e){"use strict";e.registerHelper("lint","coffeescript",(function(o){var r=[];if(!window.coffeelint)return window.console&&window.console.error("Error: window.coffeelint not defined, CodeMirror CoffeeScript linting cannot run."),r;var i,n;try{for(var t=coffeelint.lint(o),f=0;f<t.length;f++)i=t[f],n=void 0,n=i.lineNumber,r.push({from:e.Pos(n-1,0),to:e.Pos(n,0),severity:i.level,message:i.message})}catch(o){r.push({from:e.Pos(o.location.first_line,0),to:e.Pos(o.location.last_line,o.location.last_column),severity:"error",message:o.message})}return r}))}));
|
||||
@@ -0,0 +1 @@
|
||||
!function(e){"object"==typeof exports&&"object"==typeof module?e(require("../../lib/codemirror")):"function"==typeof define&&define.amd?define(["../../lib/codemirror"],e):e(CodeMirror)}((function(e){"use strict";e.registerHelper("lint","css",(function(o,r){var n=[];if(!window.CSSLint)return window.console&&window.console.error("Error: window.CSSLint not defined, CodeMirror CSS linting cannot run."),n;for(var i=CSSLint.verify(o,r).messages,t=null,s=0;s<i.length;s++){var c=(t=i[s]).line-1,d=t.line-1,f=t.col-1,l=t.col;n.push({from:e.Pos(c,f),to:e.Pos(d,l),message:t.message,severity:t.type})}return n}))}));
|
||||
@@ -0,0 +1 @@
|
||||
!function(e){"object"==typeof exports&&"object"==typeof module?e(require("../../lib/codemirror"),require("htmlhint")):"function"==typeof define&&define.amd?define(["../../lib/codemirror","htmlhint"],e):e(CodeMirror,window.HTMLHint)}((function(e,r){"use strict";var o={"tagname-lowercase":!0,"attr-lowercase":!0,"attr-value-double-quotes":!0,"doctype-first":!1,"tag-pair":!0,"spec-char-escape":!0,"id-unique":!0,"src-not-empty":!0,"attr-no-duplication":!0};e.registerHelper("lint","html",(function(t,i){var n=[];if(r&&!r.verify&&(r=void 0!==r.default?r.default:r.HTMLHint),r||(r=window.HTMLHint),!r)return window.console&&window.console.error("Error: HTMLHint not found, not defined on window, or not available through define/require, CodeMirror HTML linting cannot run."),n;for(var a=r.verify(t,i&&i.rules||o),l=0;l<a.length;l++){var d=a[l],u=d.line-1,c=d.line-1,s=d.col-1,f=d.col;n.push({from:e.Pos(u,s),to:e.Pos(c,f),message:d.message,severity:d.type})}return n}))}));
|
||||
+1
@@ -0,0 +1 @@
|
||||
!function(e){"object"==typeof exports&&"object"==typeof module?e(require("../../lib/codemirror")):"function"==typeof define&&define.amd?define(["../../lib/codemirror"],e):e(CodeMirror)}((function(e){"use strict";e.registerHelper("lint","javascript",(function(r,n){if(!window.JSHINT)return window.console&&window.console.error("Error: window.JSHINT not defined, CodeMirror JavaScript linting cannot run."),[];n.indent||(n.indent=1),JSHINT(r,n,n.globals);var o=JSHINT.data().errors,i=[];return o&&function(r,n){for(var o=0;o<r.length;o++){var i=r[o];if(i){if(i.line<=0){window.console&&window.console.warn("Cannot display JSHint error (invalid line "+i.line+")",i);continue}var t=i.character-1,a=t+1;if(i.evidence){var d=i.evidence.substring(t).search(/.\b/);d>-1&&(a+=d)}var c={message:i.reason,severity:i.code&&i.code.startsWith("W")?"warning":"error",from:e.Pos(i.line-1,t),to:e.Pos(i.line-1,a)};n.push(c)}}}(o,i),i}))}));
|
||||
@@ -0,0 +1 @@
|
||||
!function(o){"object"==typeof exports&&"object"==typeof module?o(require("../../lib/codemirror")):"function"==typeof define&&define.amd?define(["../../lib/codemirror"],o):o(CodeMirror)}((function(o){"use strict";o.registerHelper("lint","json",(function(n){var r=[];if(!window.jsonlint)return window.console&&window.console.error("Error: window.jsonlint not defined, CodeMirror JSON linting cannot run."),r;var e=window.jsonlint.parser||window.jsonlint;e.parseError=function(n,e){var i=e.loc;r.push({from:o.Pos(i.first_line-1,i.first_column),to:o.Pos(i.last_line-1,i.last_column),message:n})};try{e.parse(n)}catch(o){}return r}))}));
|
||||
@@ -0,0 +1,79 @@
|
||||
/* The lint marker gutter */
|
||||
.CodeMirror-lint-markers {
|
||||
width: 16px;
|
||||
}
|
||||
|
||||
.CodeMirror-lint-tooltip {
|
||||
background-color: #ffd;
|
||||
border: 1px solid black;
|
||||
border-radius: 4px 4px 4px 4px;
|
||||
color: black;
|
||||
font-family: monospace;
|
||||
font-size: 10pt;
|
||||
overflow: hidden;
|
||||
padding: 2px 5px;
|
||||
position: fixed;
|
||||
white-space: pre;
|
||||
white-space: pre-wrap;
|
||||
z-index: 100;
|
||||
max-width: 600px;
|
||||
opacity: 0;
|
||||
transition: opacity .4s;
|
||||
-moz-transition: opacity .4s;
|
||||
-webkit-transition: opacity .4s;
|
||||
-o-transition: opacity .4s;
|
||||
-ms-transition: opacity .4s;
|
||||
}
|
||||
|
||||
.CodeMirror-lint-mark {
|
||||
background-position: left bottom;
|
||||
background-repeat: repeat-x;
|
||||
}
|
||||
|
||||
.CodeMirror-lint-mark-warning {
|
||||
background-image: url("data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAAQAAAADCAYAAAC09K7GAAAAAXNSR0IArs4c6QAAAAZiS0dEAP8A/wD/oL2nkwAAAAlwSFlzAAALEwAACxMBAJqcGAAAAAd0SU1FB9sJFhQXEbhTg7YAAAAZdEVYdENvbW1lbnQAQ3JlYXRlZCB3aXRoIEdJTVBXgQ4XAAAAMklEQVQI12NkgIIvJ3QXMjAwdDN+OaEbysDA4MPAwNDNwMCwiOHLCd1zX07o6kBVGQEAKBANtobskNMAAAAASUVORK5CYII=");
|
||||
}
|
||||
|
||||
.CodeMirror-lint-mark-error {
|
||||
background-image: url("data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAAQAAAADCAYAAAC09K7GAAAAAXNSR0IArs4c6QAAAAZiS0dEAP8A/wD/oL2nkwAAAAlwSFlzAAALEwAACxMBAJqcGAAAAAd0SU1FB9sJDw4cOCW1/KIAAAAZdEVYdENvbW1lbnQAQ3JlYXRlZCB3aXRoIEdJTVBXgQ4XAAAAHElEQVQI12NggIL/DAz/GdA5/xkY/qPKMDAwAADLZwf5rvm+LQAAAABJRU5ErkJggg==");
|
||||
}
|
||||
|
||||
.CodeMirror-lint-marker {
|
||||
background-position: center center;
|
||||
background-repeat: no-repeat;
|
||||
cursor: pointer;
|
||||
display: inline-block;
|
||||
height: 16px;
|
||||
width: 16px;
|
||||
vertical-align: middle;
|
||||
position: relative;
|
||||
}
|
||||
|
||||
.CodeMirror-lint-message {
|
||||
padding-left: 18px;
|
||||
background-position: top left;
|
||||
background-repeat: no-repeat;
|
||||
}
|
||||
|
||||
.CodeMirror-lint-marker-warning, .CodeMirror-lint-message-warning {
|
||||
background-image: url("data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAABAAAAAQCAMAAAAoLQ9TAAAANlBMVEX/uwDvrwD/uwD/uwD/uwD/uwD/uwD/uwD/uwD6twD/uwAAAADurwD2tQD7uAD+ugAAAAD/uwDhmeTRAAAADHRSTlMJ8mN1EYcbmiixgACm7WbuAAAAVklEQVR42n3PUQqAIBBFUU1LLc3u/jdbOJoW1P08DA9Gba8+YWJ6gNJoNYIBzAA2chBth5kLmG9YUoG0NHAUwFXwO9LuBQL1giCQb8gC9Oro2vp5rncCIY8L8uEx5ZkAAAAASUVORK5CYII=");
|
||||
}
|
||||
|
||||
.CodeMirror-lint-marker-error, .CodeMirror-lint-message-error {
|
||||
background-image: url("data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAABAAAAAQCAMAAAAoLQ9TAAAAHlBMVEW7AAC7AACxAAC7AAC7AAAAAAC4AAC5AAD///+7AAAUdclpAAAABnRSTlMXnORSiwCK0ZKSAAAATUlEQVR42mWPOQ7AQAgDuQLx/z8csYRmPRIFIwRGnosRrpamvkKi0FTIiMASR3hhKW+hAN6/tIWhu9PDWiTGNEkTtIOucA5Oyr9ckPgAWm0GPBog6v4AAAAASUVORK5CYII=");
|
||||
}
|
||||
|
||||
.CodeMirror-lint-marker-multiple {
|
||||
background-image: url("data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAAcAAAAHCAMAAADzjKfhAAAACVBMVEUAAAAAAAC/v7914kyHAAAAAXRSTlMAQObYZgAAACNJREFUeNo1ioEJAAAIwmz/H90iFFSGJgFMe3gaLZ0od+9/AQZ0ADosbYraAAAAAElFTkSuQmCC");
|
||||
background-repeat: no-repeat;
|
||||
background-position: right bottom;
|
||||
width: 100%; height: 100%;
|
||||
}
|
||||
|
||||
.CodeMirror-lint-line-error {
|
||||
background-color: rgba(183, 76, 81, 0.08);
|
||||
}
|
||||
|
||||
.CodeMirror-lint-line-warning {
|
||||
background-color: rgba(255, 211, 0, 0.1);
|
||||
}
|
||||
@@ -0,0 +1 @@
|
||||
!function(t){"object"==typeof exports&&"object"==typeof module?t(require("../../lib/codemirror")):"function"==typeof define&&define.amd?define(["../../lib/codemirror"],t):t(CodeMirror)}((function(t){"use strict";var e="CodeMirror-lint-markers";function n(t){t.parentNode&&t.parentNode.removeChild(t)}function o(e,o,r,i){var a=function(e,n,o){var r=document.createElement("div");function i(e){if(!r.parentNode)return t.off(document,"mousemove",i);r.style.top=Math.max(0,e.clientY-r.offsetHeight-5)+"px",r.style.left=e.clientX+5+"px"}return r.className="CodeMirror-lint-tooltip cm-s-"+e.options.theme,r.appendChild(o.cloneNode(!0)),e.state.lint.options.selfContain?e.getWrapperElement().appendChild(r):document.body.appendChild(r),t.on(document,"mousemove",i),i(n),null!=r.style.opacity&&(r.style.opacity=1),r}(e,o,r);function s(){var e;t.off(i,"mouseout",s),a&&((e=a).parentNode&&(null==e.style.opacity&&n(e),e.style.opacity=0,setTimeout((function(){n(e)}),600)),a=null)}var l=setInterval((function(){if(a)for(var t=i;;t=t.parentNode){if(t&&11==t.nodeType&&(t=t.host),t==document.body)return;if(!t){s();break}}if(!a)return clearInterval(l)}),400);t.on(i,"mouseout",s)}function r(t,e,n){this.marked=[],this.options=e,this.timeout=null,this.hasGutter=n,this.onMouseOver=function(e){!function(t,e){var n=e.target||e.srcElement;if(!/\bCodeMirror-lint-mark-/.test(n.className))return;for(var r=n.getBoundingClientRect(),i=(r.left+r.right)/2,a=(r.top+r.bottom)/2,s=t.findMarksAt(t.coordsChar({left:i,top:a},"client")),u=[],c=0;c<s.length;++c){var f=s[c].__annotation;f&&u.push(f)}u.length&&function(t,e,n){for(var r=n.target||n.srcElement,i=document.createDocumentFragment(),a=0;a<e.length;a++){var s=e[a];i.appendChild(l(s))}o(t,n,i,r)}(t,u,e)}(t,e)},this.waitingFor=0}function i(t){var n=t.state.lint;n.hasGutter&&t.clearGutter(e),a(n)&&function(t){t.eachLine((function(e){var n=e.wrapClass&&/\bCodeMirror-lint-line-\w+\b/.exec(e.wrapClass);n&&t.removeLineClass(e,"wrap",n[0])}))}(t);for(var o=0;o<n.marked.length;++o)n.marked[o].clear();n.marked.length=0}function a(t){return t.options.highlightLines}function s(e,n,r,i,a){var s=document.createElement("div"),l=s;return s.className="CodeMirror-lint-marker CodeMirror-lint-marker-"+r,i&&((l=s.appendChild(document.createElement("div"))).className="CodeMirror-lint-marker CodeMirror-lint-marker-multiple"),0!=a&&t.on(l,"mouseover",(function(t){o(e,t,n,l)})),s}function l(t){var e=t.severity;e||(e="error");var n=document.createElement("div");return n.className="CodeMirror-lint-message CodeMirror-lint-message-"+e,void 0!==t.messageHTML?n.innerHTML=t.messageHTML:n.appendChild(document.createTextNode(t.message)),n}function u(e){var n=e.state.lint;if(n){var o=n.options,r=o.options||o,i=o.getAnnotations||e.getHelper(t.Pos(0,0),"lint");if(i)if(o.async||i.async)!function(e,n,o){var r=e.state.lint,i=++r.waitingFor;function a(){i=-1,e.off("change",a)}e.on("change",a),n(e.getValue(),(function(n,o){e.off("change",a),r.waitingFor==i&&(o&&n instanceof t&&(n=o),e.operation((function(){c(e,n)})))}),o,e)}(e,i,r);else{var a=i(e.getValue(),r,e);if(!a)return;a.then?a.then((function(t){e.operation((function(){c(e,t)}))})):e.operation((function(){c(e,a)}))}}}function c(t,n){var o=t.state.lint;if(o){var r=o.options;i(t);for(var u,c,f=function(t){for(var e=[],n=0;n<t.length;++n){var o=t[n],r=o.from.line;(e[r]||(e[r]=[])).push(o)}return e}(n),m=0;m<f.length;++m){var d=f[m];if(d){var p=[];d=d.filter((function(t){return!(p.indexOf(t.message)>-1)&&p.push(t.message)}));for(var h=null,v=o.hasGutter&&document.createDocumentFragment(),g=0;g<d.length;++g){var C=d[g],M=C.severity;M||(M="error"),c=M,h="error"==(u=h)?u:c,r.formatAnnotation&&(C=r.formatAnnotation(C)),o.hasGutter&&v.appendChild(l(C)),C.to&&o.marked.push(t.markText(C.from,C.to,{className:"CodeMirror-lint-mark CodeMirror-lint-mark-"+M,__annotation:C}))}o.hasGutter&&t.setGutterMarker(m,e,s(t,v,h,f[m].length>1,o.options.tooltips)),a(o)&&t.addLineClass(m,"wrap","CodeMirror-lint-line-"+h)}}r.onUpdateLinting&&r.onUpdateLinting(n,f,t)}}function f(t){var e=t.state.lint;e&&(clearTimeout(e.timeout),e.timeout=setTimeout((function(){u(t)}),e.options.delay||500))}t.defineOption("lint",!1,(function(n,o,a){if(a&&a!=t.Init&&(i(n),!1!==n.state.lint.options.lintOnChange&&n.off("change",f),t.off(n.getWrapperElement(),"mouseover",n.state.lint.onMouseOver),clearTimeout(n.state.lint.timeout),delete n.state.lint),o){for(var s=n.getOption("gutters"),l=!1,c=0;c<s.length;++c)s[c]==e&&(l=!0);var m=n.state.lint=new r(n,(d=o)instanceof Function?{getAnnotations:d}:(d&&!0!==d||(d={}),d),l);!1!==m.options.lintOnChange&&n.on("change",f),0!=m.options.tooltips&&"gutter"!=m.options.tooltips&&t.on(n.getWrapperElement(),"mouseover",m.onMouseOver),u(n)}var d})),t.defineExtension("performLint",(function(){u(this)}))}));
|
||||
@@ -0,0 +1 @@
|
||||
!function(o){"object"==typeof exports&&"object"==typeof module?o(require("../../lib/codemirror")):"function"==typeof define&&define.amd?define(["../../lib/codemirror"],o):o(CodeMirror)}((function(o){"use strict";o.registerHelper("lint","yaml",(function(e){var r=[];if(!window.jsyaml)return window.console&&window.console.error("Error: window.jsyaml not defined, CodeMirror YAML linting cannot run."),r;try{jsyaml.loadAll(e)}catch(e){var n=e.mark,i=n?o.Pos(n.line,n.column):o.Pos(0,0),t=i;r.push({from:i,to:t,message:e.message})}return r}))}));
|
||||
@@ -0,0 +1,119 @@
|
||||
.CodeMirror-merge {
|
||||
position: relative;
|
||||
border: 1px solid #ddd;
|
||||
white-space: pre;
|
||||
}
|
||||
|
||||
.CodeMirror-merge, .CodeMirror-merge .CodeMirror {
|
||||
height: 350px;
|
||||
}
|
||||
|
||||
.CodeMirror-merge-2pane .CodeMirror-merge-pane { width: 47%; }
|
||||
.CodeMirror-merge-2pane .CodeMirror-merge-gap { width: 6%; }
|
||||
.CodeMirror-merge-3pane .CodeMirror-merge-pane { width: 31%; }
|
||||
.CodeMirror-merge-3pane .CodeMirror-merge-gap { width: 3.5%; }
|
||||
|
||||
.CodeMirror-merge-pane {
|
||||
display: inline-block;
|
||||
white-space: normal;
|
||||
vertical-align: top;
|
||||
}
|
||||
.CodeMirror-merge-pane-rightmost {
|
||||
position: absolute;
|
||||
right: 0px;
|
||||
z-index: 1;
|
||||
}
|
||||
|
||||
.CodeMirror-merge-gap {
|
||||
z-index: 2;
|
||||
display: inline-block;
|
||||
height: 100%;
|
||||
-moz-box-sizing: border-box;
|
||||
box-sizing: border-box;
|
||||
overflow: hidden;
|
||||
border-left: 1px solid #ddd;
|
||||
border-right: 1px solid #ddd;
|
||||
position: relative;
|
||||
background: #f8f8f8;
|
||||
}
|
||||
|
||||
.CodeMirror-merge-scrolllock-wrap {
|
||||
position: absolute;
|
||||
bottom: 0; left: 50%;
|
||||
}
|
||||
.CodeMirror-merge-scrolllock {
|
||||
position: relative;
|
||||
left: -50%;
|
||||
cursor: pointer;
|
||||
color: #555;
|
||||
line-height: 1;
|
||||
}
|
||||
.CodeMirror-merge-scrolllock:after {
|
||||
content: "\21db\00a0\00a0\21da";
|
||||
}
|
||||
.CodeMirror-merge-scrolllock.CodeMirror-merge-scrolllock-enabled:after {
|
||||
content: "\21db\21da";
|
||||
}
|
||||
|
||||
.CodeMirror-merge-copybuttons-left, .CodeMirror-merge-copybuttons-right {
|
||||
position: absolute;
|
||||
left: 0; top: 0;
|
||||
right: 0; bottom: 0;
|
||||
line-height: 1;
|
||||
}
|
||||
|
||||
.CodeMirror-merge-copy {
|
||||
position: absolute;
|
||||
cursor: pointer;
|
||||
color: #44c;
|
||||
z-index: 3;
|
||||
}
|
||||
|
||||
.CodeMirror-merge-copy-reverse {
|
||||
position: absolute;
|
||||
cursor: pointer;
|
||||
color: #44c;
|
||||
}
|
||||
|
||||
.CodeMirror-merge-copybuttons-left .CodeMirror-merge-copy { left: 2px; }
|
||||
.CodeMirror-merge-copybuttons-right .CodeMirror-merge-copy { right: 2px; }
|
||||
|
||||
.CodeMirror-merge-r-inserted, .CodeMirror-merge-l-inserted {
|
||||
background-image: url(data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAAMAAAACCAYAAACddGYaAAAAGUlEQVQI12MwuCXy3+CWyH8GBgYGJgYkAABZbAQ9ELXurwAAAABJRU5ErkJggg==);
|
||||
background-position: bottom left;
|
||||
background-repeat: repeat-x;
|
||||
}
|
||||
|
||||
.CodeMirror-merge-r-deleted, .CodeMirror-merge-l-deleted {
|
||||
background-image: url(data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAAMAAAACCAYAAACddGYaAAAAGUlEQVQI12M4Kyb2/6yY2H8GBgYGJgYkAABURgPz6Ks7wQAAAABJRU5ErkJggg==);
|
||||
background-position: bottom left;
|
||||
background-repeat: repeat-x;
|
||||
}
|
||||
|
||||
.CodeMirror-merge-r-chunk { background: #ffffe0; }
|
||||
.CodeMirror-merge-r-chunk-start { border-top: 1px solid #ee8; }
|
||||
.CodeMirror-merge-r-chunk-end { border-bottom: 1px solid #ee8; }
|
||||
.CodeMirror-merge-r-connect { fill: #ffffe0; stroke: #ee8; stroke-width: 1px; }
|
||||
|
||||
.CodeMirror-merge-l-chunk { background: #eef; }
|
||||
.CodeMirror-merge-l-chunk-start { border-top: 1px solid #88e; }
|
||||
.CodeMirror-merge-l-chunk-end { border-bottom: 1px solid #88e; }
|
||||
.CodeMirror-merge-l-connect { fill: #eef; stroke: #88e; stroke-width: 1px; }
|
||||
|
||||
.CodeMirror-merge-l-chunk.CodeMirror-merge-r-chunk { background: #dfd; }
|
||||
.CodeMirror-merge-l-chunk-start.CodeMirror-merge-r-chunk-start { border-top: 1px solid #4e4; }
|
||||
.CodeMirror-merge-l-chunk-end.CodeMirror-merge-r-chunk-end { border-bottom: 1px solid #4e4; }
|
||||
|
||||
.CodeMirror-merge-collapsed-widget:before {
|
||||
content: "(...)";
|
||||
}
|
||||
.CodeMirror-merge-collapsed-widget {
|
||||
cursor: pointer;
|
||||
color: #88b;
|
||||
background: #eef;
|
||||
border: 1px solid #ddf;
|
||||
font-size: 90%;
|
||||
padding: 0 3px;
|
||||
border-radius: 4px;
|
||||
}
|
||||
.CodeMirror-merge-collapsed-line .CodeMirror-gutter-elt { display: none; }
|
||||
@@ -0,0 +1 @@
|
||||
!function(e){"object"==typeof exports&&"object"==typeof module?e(require("../../lib/codemirror")):"function"==typeof define&&define.amd?define(["../../lib/codemirror","diff_match_patch"],e):e(CodeMirror)}((function(e){"use strict";var t=e.Pos,i="http://www.w3.org/2000/svg";function r(e,t){this.mv=e,this.type=t,this.classes="left"==t?{chunk:"CodeMirror-merge-l-chunk",start:"CodeMirror-merge-l-chunk-start",end:"CodeMirror-merge-l-chunk-end",insert:"CodeMirror-merge-l-inserted",del:"CodeMirror-merge-l-deleted",connect:"CodeMirror-merge-l-connect"}:{chunk:"CodeMirror-merge-r-chunk",start:"CodeMirror-merge-r-chunk-start",end:"CodeMirror-merge-r-chunk-end",insert:"CodeMirror-merge-r-inserted",del:"CodeMirror-merge-r-deleted",connect:"CodeMirror-merge-r-connect"}}function n(t){t.diffOutOfDate&&(t.diff=L(t.orig.getValue(),t.edit.getValue(),t.mv.options.ignoreWhitespace),t.chunks=D(t.diff),t.diffOutOfDate=!1,e.signal(t.edit,"updateDiff",t.diff))}r.prototype={constructor:r,init:function(t,i,r){this.edit=this.mv.edit,(this.edit.state.diffViews||(this.edit.state.diffViews=[])).push(this),this.orig=e(t,W({value:i,readOnly:!this.mv.options.allowEditingOriginals},W(r))),"align"==this.mv.options.connect&&(this.edit.state.trackAlignable||(this.edit.state.trackAlignable=new _(this.edit)),this.orig.state.trackAlignable=new _(this.orig)),this.lockButton.title=this.edit.phrase("Toggle locked scrolling"),this.orig.state.diffViews=[this];var n=r.chunkClassLocation||"background";"[object Array]"!=Object.prototype.toString.call(n)&&(n=[n]),this.classes.classLocation=n,this.diff=L(M(i),M(r.value),this.mv.options.ignoreWhitespace),this.chunks=D(this.diff),this.diffOutOfDate=this.dealigned=!1,this.needsScrollSync=null,this.showDifferences=!1!==r.showDifferences},registerEvents:function(t){this.forceUpdate=function(t){var i,r={from:0,to:0,marked:[]},a={from:0,to:0,marked:[]},s=!1;function c(e){o=!0,s=!1,"full"==e&&(t.svg&&N(t.svg),t.copyButtons&&N(t.copyButtons),h(t.edit,r.marked,t.classes),h(t.orig,a.marked,t.classes),r.from=r.to=a.from=a.to=0),n(t),t.showDifferences&&(f(t.edit,t.diff,r,DIFF_INSERT,t.classes),f(t.orig,t.diff,a,DIFF_DELETE,t.classes)),"align"==t.mv.options.connect&&k(t),u(t),null!=t.needsScrollSync&&l(t,t.needsScrollSync),o=!1}function g(e){o||(t.dealigned=!0,d(e))}function d(e){o||s||(clearTimeout(i),!0===e&&(s=!0),i=setTimeout(c,!0===e?20:250))}function m(e,i){t.diffOutOfDate||(t.diffOutOfDate=!0,r.from=r.to=a.from=a.to=0),g(i.text.length-1!=i.to.line-i.from.line)}function v(){t.diffOutOfDate=!0,t.dealigned=!0,c("full")}t.edit.on("change",m),t.orig.on("change",m),t.edit.on("swapDoc",v),t.orig.on("swapDoc",v),"align"==t.mv.options.connect&&(e.on(t.edit.state.trackAlignable,"realign",g),e.on(t.orig.state.trackAlignable,"realign",g));return t.edit.on("viewportChange",(function(){d(!1)})),t.orig.on("viewportChange",(function(){d(!1)})),c(),c}(this),s(this,!0,!1),function(e,t){e.edit.on("scroll",(function(){l(e,!0)&&u(e)})),e.orig.on("scroll",(function(){l(e,!1)&&u(e),t&&l(t,!0)&&u(t)}))}(this,t)},setShowDifferences:function(e){(e=!1!==e)!=this.showDifferences&&(this.showDifferences=e,this.forceUpdate("full"))}};var o=!1;function l(e,t){if(e.diffOutOfDate)return e.lockScroll&&null==e.needsScrollSync&&(e.needsScrollSync=t),!1;if(e.needsScrollSync=null,!e.lockScroll)return!0;var i,r,n=+new Date;if(t?(i=e.edit,r=e.orig):(i=e.orig,r=e.edit),i.state.scrollSetBy==e&&(i.state.scrollSetAt||0)+250>n)return!1;var o=i.getScrollInfo();if("align"==e.mv.options.connect)v=o.top;else{var l,s,c=.5*o.clientHeight,h=o.top+c,f=i.lineAtHeight(h,"local"),g=function(e,t,i){for(var r,n,o,l,a=0;a<e.length;a++){var s=e[a],c=i?s.editFrom:s.origFrom,h=i?s.editTo:s.origTo;null==n&&(c>t?(n=s.editFrom,l=s.origFrom):h>t&&(n=s.editTo,l=s.origTo)),h<=t?(r=s.editTo,o=s.origTo):c<=t&&(r=s.editFrom,o=s.origFrom)}return{edit:{before:r,after:n},orig:{before:o,after:l}}}(e.chunks,f,t),d=a(i,t?g.edit:g.orig),u=a(r,t?g.orig:g.edit),m=(h-d.top)/(d.bot-d.top),v=u.top-c+m*(u.bot-u.top);if(v>o.top&&(s=o.top/c)<1)v=v*s+o.top*(1-s);else if((l=o.height-o.clientHeight-o.top)<c){var p=r.getScrollInfo();p.height-p.clientHeight-v>l&&(s=l/c)<1&&(v=v*s+(p.height-p.clientHeight-l)*(1-s))}}return r.scrollTo(o.left,v),r.state.scrollSetAt=n,r.state.scrollSetBy=e,!0}function a(e,t){var i=t.after;return null==i&&(i=e.lastLine()+1),{top:e.heightAtLine(t.before||0,"local"),bot:e.heightAtLine(i,"local")}}function s(t,i,r){t.lockScroll=i,i&&0!=r&&l(t,DIFF_INSERT)&&u(t),(i?e.addClass:e.rmClass)(t.lockButton,"CodeMirror-merge-scrolllock-enabled")}function c(e,t,i){for(var r=i.classLocation,n=0;n<r.length;n++)e.removeLineClass(t,r[n],i.chunk),e.removeLineClass(t,r[n],i.start),e.removeLineClass(t,r[n],i.end)}function h(t,i,r){for(var n=0;n<i.length;++n){var o=i[n];o instanceof e.TextMarker?o.clear():o.parent&&c(t,o,r)}i.length=0}function f(e,t,i,r,n){var o=e.getViewport();e.operation((function(){i.from==i.to||o.from-i.to>20||i.from-o.to>20?(h(e,i.marked,n),d(e,t,r,i.marked,o.from,o.to,n),Line truncated
|
||||
@@ -0,0 +1 @@
|
||||
!function(e){"object"==typeof exports&&"object"==typeof module?e(require("../../lib/codemirror"),"cjs"):"function"==typeof define&&define.amd?define(["../../lib/codemirror"],(function(o){e(o,"amd")})):e(CodeMirror,"plain")}((function(e,o){e.modeURL||(e.modeURL="../mode/%N/%N.js");var r={};function n(o,r,n){var t=e.modes[o],i=t&&t.dependencies;if(!i)return r();for(var d=[],a=0;a<i.length;++a)e.modes.hasOwnProperty(i[a])||d.push(i[a]);if(!d.length)return r();var f=function(e,o){var r=o;return function(){0==--r&&e()}}(r,d.length);for(a=0;a<d.length;++a)e.requireMode(d[a],f,n)}e.requireMode=function(t,i,d){if("string"!=typeof t&&(t=t.name),e.modes.hasOwnProperty(t))return n(t,i,d);if(r.hasOwnProperty(t))return r[t].push(i);var a=d&&d.path?d.path(t):e.modeURL.replace(/%N/g,t);if(d&&d.loadMode)d.loadMode(a,(function(){n(t,i,d)}));else if("plain"==o){var f=document.createElement("script");f.src=a;var u=document.getElementsByTagName("script")[0],c=r[t]=[i];e.on(f,"load",(function(){n(t,(function(){for(var e=0;e<c.length;++e)c[e]()}),d)})),u.parentNode.insertBefore(f,u)}else"cjs"==o?(require(a),i()):"amd"==o&&requirejs([a],i)},e.autoLoadMode=function(o,r,n){e.modes.hasOwnProperty(r)||e.requireMode(r,(function(){o.setOption("mode",o.getOption("mode"))}),n)}}));
|
||||
@@ -0,0 +1 @@
|
||||
!function(e){"object"==typeof exports&&"object"==typeof module?e(require("../../lib/codemirror")):"function"==typeof define&&define.amd?define(["../../lib/codemirror"],e):e(CodeMirror)}((function(e){"use strict";e.multiplexingMode=function(n){var t=Array.prototype.slice.call(arguments,1);function r(e,n,t,r){if("string"==typeof n){var i=e.indexOf(n,t);return r&&i>-1?i+n.length:i}var o=n.exec(t?e.slice(t):e);return o?o.index+t+(r?o[0].length:0):-1}return{startState:function(){return{outer:e.startState(n),innerActive:null,inner:null,startingInner:!1}},copyState:function(t){return{outer:e.copyState(n,t.outer),innerActive:t.innerActive,inner:t.innerActive&&e.copyState(t.innerActive.mode,t.inner),startingInner:t.startingInner}},token:function(i,o){if(o.innerActive){var l=o.innerActive;a=i.string;if(!l.close&&i.sol())return o.innerActive=o.inner=null,this.token(i,o);if((v=l.close&&!o.startingInner?r(a,l.close,i.pos,l.parseDelimiters):-1)==i.pos&&!l.parseDelimiters)return i.match(l.close),o.innerActive=o.inner=null,l.delimStyle&&l.delimStyle+" "+l.delimStyle+"-close";v>-1&&(i.string=a.slice(0,v));var c=l.mode.token(i,o.inner);return v>-1?i.string=a:i.pos>i.start&&(o.startingInner=!1),v==i.pos&&l.parseDelimiters&&(o.innerActive=o.inner=null),l.innerStyle&&(c=c?c+" "+l.innerStyle:l.innerStyle),c}for(var s=1/0,a=i.string,u=0;u<t.length;++u){var v,d=t[u];if((v=r(a,d.open,i.pos))==i.pos){d.parseDelimiters||i.match(d.open),o.startingInner=!!d.parseDelimiters,o.innerActive=d;var f=0;if(n.indent){var m=n.indent(o.outer,"","");m!==e.Pass&&(f=m)}return o.inner=e.startState(d.mode,f),d.delimStyle&&d.delimStyle+" "+d.delimStyle+"-open"}-1!=v&&v<s&&(s=v)}s!=1/0&&(i.string=a.slice(0,s));var p=n.token(i,o.outer);return s!=1/0&&(i.string=a),p},indent:function(t,r,i){var o=t.innerActive?t.innerActive.mode:n;return o.indent?o.indent(t.innerActive?t.inner:t.outer,r,i):e.Pass},blankLine:function(r){var i=r.innerActive?r.innerActive.mode:n;if(i.blankLine&&i.blankLine(r.innerActive?r.inner:r.outer),r.innerActive)"\n"===r.innerActive.close&&(r.innerActive=r.inner=null);else for(var o=0;o<t.length;++o){var l=t[o];"\n"===l.open&&(r.innerActive=l,r.inner=e.startState(l.mode,i.indent?i.indent(r.outer,"",""):0))}},electricChars:n.electricChars,innerMode:function(e){return e.inner?{state:e.inner,mode:e.innerActive.mode}:{state:e.outer,mode:n}}}}}));
|
||||
+1
@@ -0,0 +1 @@
|
||||
!function(){CodeMirror.defineMode("markdown_with_stex",(function(){var e=CodeMirror.getMode({},"stex"),i=CodeMirror.getMode({},"markdown"),r={open:"$",close:"$",mode:e,delimStyle:"delim",innerStyle:"inner"};return CodeMirror.multiplexingMode(i,r)}));var e=CodeMirror.getMode({},"markdown_with_stex");!function(i){test.mode(i,e,Array.prototype.slice.call(arguments,1),"multiplexing")}("stexInsideMarkdown","[strong **Equation:**] [delim&delim-open $][inner&tag \\pi][delim&delim-close $]"),CodeMirror.defineMode("identical_delim_multiplex",(function(){return CodeMirror.multiplexingMode(CodeMirror.getMode({indentUnit:2},"javascript"),{open:"#",close:"#",mode:CodeMirror.getMode({},"markdown"),parseDelimiters:!0,innerStyle:"q"})}));var i=CodeMirror.getMode({},"identical_delim_multiplex");test.mode("identical_delimiters_with_parseDelimiters",i,["[keyword let] [def x] [operator =] [q #foo][q&em *bar*][q #];"],"multiplexing")}();
|
||||
@@ -0,0 +1 @@
|
||||
!function(e){"object"==typeof exports&&"object"==typeof module?e(require("../../lib/codemirror")):"function"==typeof define&&define.amd?define(["../../lib/codemirror"],e):e(CodeMirror)}((function(e){"use strict";e.overlayMode=function(o,r,a){return{startState:function(){return{base:e.startState(o),overlay:e.startState(r),basePos:0,baseCur:null,overlayPos:0,overlayCur:null,streamSeen:null}},copyState:function(a){return{base:e.copyState(o,a.base),overlay:e.copyState(r,a.overlay),basePos:a.basePos,baseCur:null,overlayPos:a.overlayPos,overlayCur:null}},token:function(e,n){return(e!=n.streamSeen||Math.min(n.basePos,n.overlayPos)<e.start)&&(n.streamSeen=e,n.basePos=n.overlayPos=e.start),e.start==n.basePos&&(n.baseCur=o.token(e,n.base),n.basePos=e.pos),e.start==n.overlayPos&&(e.pos=e.start,n.overlayCur=r.token(e,n.overlay),n.overlayPos=e.pos),e.pos=Math.min(n.basePos,n.overlayPos),null==n.overlayCur?n.baseCur:null!=n.baseCur&&n.overlay.combineTokens||a&&null==n.overlay.combineTokens?n.baseCur+" "+n.overlayCur:n.overlayCur},indent:o.indent&&function(e,r,a){return o.indent(e.base,r,a)},electricChars:o.electricChars,innerMode:function(e){return{state:e.base,mode:o}},blankLine:function(e){var n,t;return o.blankLine&&(n=o.blankLine(e.base)),r.blankLine&&(t=r.blankLine(e.overlay)),null==t?n:a&&null!=n?n+" "+t:t}}}}));
|
||||
@@ -0,0 +1 @@
|
||||
!function(e){"object"==typeof exports&&"object"==typeof module?e(require("../../lib/codemirror")):"function"==typeof define&&define.amd?define(["../../lib/codemirror"],e):e(CodeMirror)}((function(e){"use strict";function t(e,t){if(!e.hasOwnProperty(t))throw new Error("Undefined state "+t+" in simple mode")}function n(e,t){if(!e)return/(?:)/;var n="";return e instanceof RegExp?(e.ignoreCase&&(n="i"),e.unicode&&(n+="u"),e=e.source):e=String(e),new RegExp((!1===t?"":"^")+"(?:"+e+")",n)}function a(e,a){(e.next||e.push)&&t(a,e.next||e.push),this.regex=n(e.regex),this.token=function(e){if(!e)return null;if(e.apply)return e;if("string"==typeof e)return e.replace(/\./g," ");for(var t=[],n=0;n<e.length;n++)t.push(e[n]&&e[n].replace(/\./g," "));return t}(e.token),this.data=e}function r(e,t){return function(n,a){if(a.pending){var r=a.pending.shift();return 0==a.pending.length&&(a.pending=null),n.pos+=r.text.length,r.token}if(a.local){if(a.local.end&&n.match(a.local.end)){var o=a.local.endToken||null;return a.local=a.localState=null,o}var l;o=a.local.mode.token(n,a.localState);return a.local.endScan&&(l=a.local.endScan.exec(n.current()))&&(n.pos=n.start+l.index),o}for(var s=e[a.state],d=0;d<s.length;d++){var c=s[d],u=(!c.data.sol||n.sol())&&n.match(c.regex);if(u){c.data.next?a.state=c.data.next:c.data.push?((a.stack||(a.stack=[])).push(a.state),a.state=c.data.push):c.data.pop&&a.stack&&a.stack.length&&(a.state=a.stack.pop()),c.data.mode&&i(t,a,c.data.mode,c.token),c.data.indent&&a.indent.push(n.indentation()+t.indentUnit),c.data.dedent&&a.indent.pop();var p=c.token;if(p&&p.apply&&(p=p(u)),u.length>2&&c.token&&"string"!=typeof c.token){for(var f=2;f<u.length;f++)u[f]&&(a.pending||(a.pending=[])).push({text:u[f],token:c.token[f-1]});return n.backUp(u[0].length-(u[1]?u[1].length:0)),p[0]}return p&&p.join?p[0]:p}}return n.next(),null}}function o(e,t){if(e===t)return!0;if(!e||"object"!=typeof e||!t||"object"!=typeof t)return!1;var n=0;for(var a in e)if(e.hasOwnProperty(a)){if(!t.hasOwnProperty(a)||!o(e[a],t[a]))return!1;n++}for(var a in t)t.hasOwnProperty(a)&&n--;return 0==n}function i(t,a,r,i){var l;if(r.persistent)for(var s=a.persistentStates;s&&!l;s=s.next)(r.spec?o(r.spec,s.spec):r.mode==s.mode)&&(l=s);var d=l?l.mode:r.mode||e.getMode(t,r.spec),c=l?l.state:e.startState(d);r.persistent&&!l&&(a.persistentStates={mode:d,spec:r.spec,state:c,next:a.persistentStates}),a.localState=c,a.local={mode:d,end:r.end&&n(r.end),endScan:r.end&&!1!==r.forceEnd&&n(r.end,!1),endToken:i&&i.join?i[i.length-1]:i}}function l(t,n){return function(a,r,o){if(a.local&&a.local.mode.indent)return a.local.mode.indent(a.localState,r,o);if(null==a.indent||a.local||n.dontIndentStates&&function(e,t){for(var n=0;n<t.length;n++)if(t[n]===e)return!0}(a.state,n.dontIndentStates)>-1)return e.Pass;var i=a.indent.length-1,l=t[a.state];e:for(;;){for(var s=0;s<l.length;s++){var d=l[s];if(d.data.dedent&&!1!==d.data.dedentIfLineStart){var c=d.regex.exec(r);if(c&&c[0]){i--,(d.next||d.push)&&(l=t[d.next||d.push]),r=r.slice(c[0].length);continue e}}}break}return i<0?0:a.indent[i]}}e.defineSimpleMode=function(t,n){e.defineMode(t,(function(t){return e.simpleMode(t,n)}))},e.simpleMode=function(n,o){t(o,"start");var i={},s=o.meta||{},d=!1;for(var c in o)if(c!=s&&o.hasOwnProperty(c))for(var u=i[c]=[],p=o[c],f=0;f<p.length;f++){var h=p[f];u.push(new a(h,o)),(h.indent||h.dedent)&&(d=!0)}var g={startState:function(){return{state:"start",pending:null,local:null,localState:null,indent:d?[]:null}},copyState:function(t){var n={state:t.state,pending:t.pending,local:t.local,localState:null,indent:t.indent&&t.indent.slice(0)};t.localState&&(n.localState=e.copyState(t.local.mode,t.localState)),t.stack&&(n.stack=t.stack.slice(0));for(var a=t.persistentStates;a;a=a.next)n.persistentStates={mode:a.mode,spec:a.spec,state:a.state==t.localState?n.localState:e.copyState(a.mode,a.state),next:n.persistentStates};return n},token:r(i,n),innerMode:function(e){return e.local&&{mode:e.local.mode,state:e.localState}},indent:l(i,s)};if(s)for(var S in s)s.hasOwnProperty(S)&&(g[S]=s[S]);return g}}));
|
||||
@@ -0,0 +1 @@
|
||||
!function(e){"object"==typeof exports&&"object"==typeof module?e(require("../../lib/codemirror"),require("./runmode")):"function"==typeof define&&define.amd?define(["../../lib/codemirror","./runmode"],e):e(CodeMirror)}((function(e){"use strict";var o=/^(p|li|div|h\\d|pre|blockquote|td)$/;function r(e,n){if(3==e.nodeType)return n.push(e.nodeValue);for(var t=e.firstChild;t;t=t.nextSibling)r(t,n),o.test(e.nodeType)&&n.push("\n")}e.colorize=function(o,n){o||(o=document.body.getElementsByTagName("pre"));for(var t=0;t<o.length;++t){var i=o[t],d=i.getAttribute("data-lang")||n;if(d){var u=[];r(i,u),i.innerHTML="",e.runMode(u.join(""),d,i),i.className+=" cm-s-default"}}}}));
|
||||
+1
@@ -0,0 +1 @@
|
||||
!function(){"use strict";function t(t,e,r){for(var n in e||(e={}),t)!t.hasOwnProperty(n)||!1===r&&e.hasOwnProperty(n)||(e[n]=t[n]);return e}function e(t,e,r,n,i){null==e&&-1==(e=t.search(/[^\s\u00a0]/))&&(e=t.length);for(var o=n||0,s=i||0;;){var a=t.indexOf("\t",o);if(a<0||a>=e)return s+(e-o);s+=a-o,s+=r-s%r,o=a+1}}function r(){}var n=function(t,e,r){this.pos=this.start=0,this.string=t,this.tabSize=e||8,this.lastColumnPos=this.lastColumnValue=0,this.lineStart=0,this.lineOracle=r};n.prototype.eol=function(){return this.pos>=this.string.length},n.prototype.sol=function(){return this.pos==this.lineStart},n.prototype.peek=function(){return this.string.charAt(this.pos)||void 0},n.prototype.next=function(){if(this.pos<this.string.length)return this.string.charAt(this.pos++)},n.prototype.eat=function(t){var e=this.string.charAt(this.pos);if("string"==typeof t?e==t:e&&(t.test?t.test(e):t(e)))return++this.pos,e},n.prototype.eatWhile=function(t){for(var e=this.pos;this.eat(t););return this.pos>e},n.prototype.eatSpace=function(){for(var t=this.pos;/[\s\u00a0]/.test(this.string.charAt(this.pos));)++this.pos;return this.pos>t},n.prototype.skipToEnd=function(){this.pos=this.string.length},n.prototype.skipTo=function(t){var e=this.string.indexOf(t,this.pos);if(e>-1)return this.pos=e,!0},n.prototype.backUp=function(t){this.pos-=t},n.prototype.column=function(){return this.lastColumnPos<this.start&&(this.lastColumnValue=e(this.string,this.start,this.tabSize,this.lastColumnPos,this.lastColumnValue),this.lastColumnPos=this.start),this.lastColumnValue-(this.lineStart?e(this.string,this.lineStart,this.tabSize):0)},n.prototype.indentation=function(){return e(this.string,null,this.tabSize)-(this.lineStart?e(this.string,this.lineStart,this.tabSize):0)},n.prototype.match=function(t,e,r){if("string"!=typeof t){var n=this.string.slice(this.pos).match(t);return n&&n.index>0?null:(n&&!1!==e&&(this.pos+=n[0].length),n)}var i=function(t){return r?t.toLowerCase():t};if(i(this.string.substr(this.pos,t.length))==i(t))return!1!==e&&(this.pos+=t.length),!0},n.prototype.current=function(){return this.string.slice(this.start,this.pos)},n.prototype.hideFirstChars=function(t,e){this.lineStart+=t;try{return e()}finally{this.lineStart-=t}},n.prototype.lookAhead=function(t){var e=this.lineOracle;return e&&e.lookAhead(t)},n.prototype.baseToken=function(){var t=this.lineOracle;return t&&t.baseToken(this.pos)};var i={},o={};function s(e){if("string"==typeof e&&o.hasOwnProperty(e))e=o[e];else if(e&&"string"==typeof e.name&&o.hasOwnProperty(e.name)){var n=o[e.name];"string"==typeof n&&(n={name:n}),i=n,a=e,Object.create?p=Object.create(i):(r.prototype=i,p=new r),a&&t(a,p),(e=p).name=n.name}else{if("string"==typeof e&&/^[\w\-]+\/[\w\-]+\+xml$/.test(e))return s("application/xml");if("string"==typeof e&&/^[\w\-]+\/[\w\-]+\+json$/.test(e))return s("application/json")}var i,a,p;return"string"==typeof e?{name:e}:e||{name:"null"}}var a={};var p,l={__proto__:null,modes:i,mimeModes:o,defineMode:function(t,e){arguments.length>2&&(e.dependencies=Array.prototype.slice.call(arguments,2)),i[t]=e},defineMIME:function(t,e){o[t]=e},resolveMode:s,getMode:function t(e,r){r=s(r);var n=i[r.name];if(!n)return t(e,"text/plain");var o=n(e,r);if(a.hasOwnProperty(r.name)){var p=a[r.name];for(var l in p)p.hasOwnProperty(l)&&(o.hasOwnProperty(l)&&(o["_"+l]=o[l]),o[l]=p[l])}if(o.name=r.name,r.helperType&&(o.helperType=r.helperType),r.modeProps)for(var u in r.modeProps)o[u]=r.modeProps[u];return o},modeExtensions:a,extendMode:function(e,r){t(r,a.hasOwnProperty(e)?a[e]:a[e]={})},copyState:function(t,e){if(!0===e)return e;if(t.copyState)return t.copyState(e);var r={};for(var n in e){var i=e[n];i instanceof Array&&(i=i.concat([])),r[n]=i}return r},innerMode:function(t,e){for(var r;t.innerMode&&(r=t.innerMode(e))&&r.mode!=t;)e=r.state,t=r.mode;return r||{mode:t,state:e}},startState:function(t,e,r){return!t.startState||t.startState(e,r)}},u="undefined"!=typeof globalThis?globalThis:window;for(var h in u.CodeMirror={},CodeMirror.StringStream=n,l)CodeMirror[h]=l[h];CodeMirror.defineMode("null",(function(){return{token:function(t){return t.skipToEnd()}}})),CodeMirror.defineMIME("text/plain","null"),CodeMirror.registerHelper=CodeMirror.registerGlobalHelper=Math.min,CodeMirror.splitLines=function(t){return t.split(/\r?\n|\r/)},CodeMirror.countColumn=e,CodeMirror.defaults={indentUnit:2},p=function(t){t.runMode=function(e,r,n,i){var o=t.getMode(t.defaults,r),s=i&&i.tabSize||t.defaults.tabSize;if(n.appendChild){var a=/MSIE \d/.test(navigator.userAgent)&&(null==document.documentMode||document.documentMode<9),p=n,l=0;p.innerHTML="",n=function(t,e){if("\n"==t)return p.appendChild(document.createTextNode(a?"\r":t)),void(l=0);for(var r="",n=0;;){var i=t.indexOf("\t",n);if(-1==i){r+=t.slice(n),l+=t.length-n;break}l+=i-n,r+=t.slice(n,i);var o=s-l%s;l+=o;for(var u=0;u<o;++u)r+=" ";n=i+1}if(e){var h=p.appendChild(document.createElement("span"));h.className="cm-"+e.replace(/ +/g," cm-"),h.appendChild(documLine truncated
|
||||
@@ -0,0 +1 @@
|
||||
!function(e){"object"==typeof exports&&"object"==typeof module?e(require("../../lib/codemirror")):"function"==typeof define&&define.amd?define(["../../lib/codemirror"],e):e(CodeMirror)}((function(e){"use strict";e.runMode=function(t,n,r,o){var a=e.getMode(e.defaults,n),i=o&&o.tabSize||e.defaults.tabSize;if(r.appendChild){var d=/MSIE \d/.test(navigator.userAgent)&&(null==document.documentMode||document.documentMode<9),c=r,l=0;c.innerHTML="",r=function(e,t){if("\n"==e)return c.appendChild(document.createTextNode(d?"\r":e)),void(l=0);for(var n="",r=0;;){var o=e.indexOf("\t",r);if(-1==o){n+=e.slice(r),l+=e.length-r;break}l+=o-r,n+=e.slice(r,o);var a=i-l%i;l+=a;for(var u=0;u<a;++u)n+=" ";r=o+1}if(t){var f=c.appendChild(document.createElement("span"));f.className="cm-"+t.replace(/ +/g," cm-"),f.appendChild(document.createTextNode(n))}else c.appendChild(document.createTextNode(n))}}for(var u=e.splitLines(t),f=o&&o.state||e.startState(a),s=0,p=u.length;s<p;++s){s&&r("\n");var m=new e.StringStream(u[s],null,{lookAhead:function(e){return u[s+e]},baseToken:function(){}});for(!m.string&&a.blankLine&&a.blankLine(f);!m.eol();){var v=a.token(m,f);r(m.current(),v,s,m.start,f,a),m.start=m.pos}}}}));
|
||||
+1
@@ -0,0 +1 @@
|
||||
"use strict";function copyObj(t,e,n){for(var r in e||(e={}),t)!t.hasOwnProperty(r)||!1===n&&e.hasOwnProperty(r)||(e[r]=t[r]);return e}function countColumn(t,e,n,r,o){null==e&&-1==(e=t.search(/[^\s\u00a0]/))&&(e=t.length);for(var i=r||0,s=o||0;;){var a=t.indexOf("\t",i);if(a<0||a>=e)return s+(e-i);s+=a-i,s+=n-s%n,i=a+1}}function nothing(){}function createObj(t,e){var n;return Object.create?n=Object.create(t):(nothing.prototype=t,n=new nothing),e&©Obj(e,n),n}var StringStream=function(t,e,n){this.pos=this.start=0,this.string=t,this.tabSize=e||8,this.lastColumnPos=this.lastColumnValue=0,this.lineStart=0,this.lineOracle=n};StringStream.prototype.eol=function(){return this.pos>=this.string.length},StringStream.prototype.sol=function(){return this.pos==this.lineStart},StringStream.prototype.peek=function(){return this.string.charAt(this.pos)||void 0},StringStream.prototype.next=function(){if(this.pos<this.string.length)return this.string.charAt(this.pos++)},StringStream.prototype.eat=function(t){var e=this.string.charAt(this.pos);if("string"==typeof t?e==t:e&&(t.test?t.test(e):t(e)))return++this.pos,e},StringStream.prototype.eatWhile=function(t){for(var e=this.pos;this.eat(t););return this.pos>e},StringStream.prototype.eatSpace=function(){for(var t=this.pos;/[\s\u00a0]/.test(this.string.charAt(this.pos));)++this.pos;return this.pos>t},StringStream.prototype.skipToEnd=function(){this.pos=this.string.length},StringStream.prototype.skipTo=function(t){var e=this.string.indexOf(t,this.pos);if(e>-1)return this.pos=e,!0},StringStream.prototype.backUp=function(t){this.pos-=t},StringStream.prototype.column=function(){return this.lastColumnPos<this.start&&(this.lastColumnValue=countColumn(this.string,this.start,this.tabSize,this.lastColumnPos,this.lastColumnValue),this.lastColumnPos=this.start),this.lastColumnValue-(this.lineStart?countColumn(this.string,this.lineStart,this.tabSize):0)},StringStream.prototype.indentation=function(){return countColumn(this.string,null,this.tabSize)-(this.lineStart?countColumn(this.string,this.lineStart,this.tabSize):0)},StringStream.prototype.match=function(t,e,n){if("string"!=typeof t){var r=this.string.slice(this.pos).match(t);return r&&r.index>0?null:(r&&!1!==e&&(this.pos+=r[0].length),r)}var o=function(t){return n?t.toLowerCase():t};if(o(this.string.substr(this.pos,t.length))==o(t))return!1!==e&&(this.pos+=t.length),!0},StringStream.prototype.current=function(){return this.string.slice(this.start,this.pos)},StringStream.prototype.hideFirstChars=function(t,e){this.lineStart+=t;try{return e()}finally{this.lineStart-=t}},StringStream.prototype.lookAhead=function(t){var e=this.lineOracle;return e&&e.lookAhead(t)},StringStream.prototype.baseToken=function(){var t=this.lineOracle;return t&&t.baseToken(this.pos)};var modes={},mimeModes={};function defineMode(t,e){arguments.length>2&&(e.dependencies=Array.prototype.slice.call(arguments,2)),modes[t]=e}function defineMIME(t,e){mimeModes[t]=e}function resolveMode(t){if("string"==typeof t&&mimeModes.hasOwnProperty(t))t=mimeModes[t];else if(t&&"string"==typeof t.name&&mimeModes.hasOwnProperty(t.name)){var e=mimeModes[t.name];"string"==typeof e&&(e={name:e}),(t=createObj(e,t)).name=e.name}else{if("string"==typeof t&&/^[\w\-]+\/[\w\-]+\+xml$/.test(t))return resolveMode("application/xml");if("string"==typeof t&&/^[\w\-]+\/[\w\-]+\+json$/.test(t))return resolveMode("application/json")}return"string"==typeof t?{name:t}:t||{name:"null"}}function getMode(t,e){e=resolveMode(e);var n=modes[e.name];if(!n)return getMode(t,"text/plain");var r=n(t,e);if(modeExtensions.hasOwnProperty(e.name)){var o=modeExtensions[e.name];for(var i in o)o.hasOwnProperty(i)&&(r.hasOwnProperty(i)&&(r["_"+i]=r[i]),r[i]=o[i])}if(r.name=e.name,e.helperType&&(r.helperType=e.helperType),e.modeProps)for(var s in e.modeProps)r[s]=e.modeProps[s];return r}var modeExtensions={};function extendMode(t,e){copyObj(e,modeExtensions.hasOwnProperty(t)?modeExtensions[t]:modeExtensions[t]={})}function copyState(t,e){if(!0===e)return e;if(t.copyState)return t.copyState(e);var n={};for(var r in e){var o=e[r];o instanceof Array&&(o=o.concat([])),n[r]=o}return n}function innerMode(t,e){for(var n;t.innerMode&&(n=t.innerMode(e))&&n.mode!=t;)e=n.state,t=n.mode;return n||{mode:t,state:e}}function startState(t,e,n){return!t.startState||t.startState(e,n)}var modeMethods={__proto__:null,modes:modes,mimeModes:mimeModes,defineMode:defineMode,defineMIME:defineMIME,resolveMode:resolveMode,getMode:getMode,modeExtensions:modeExtensions,extendMode:extendMode,copyState:copyState,innerMode:innerMode,startState:startState};for(var exported in exports.StringStream=StringStream,exports.countColumn=countColumn,modeMethods)exports[exported]=modeMethods[exported];require.cache[require.resolve("../../lib/codemirror")]=require.cache[require.resolve("./runmode.node")],require.cache[require.resolve("../../addon/runmode/runmode")]=require.cache[require.resolve("./runmode.node")],exports.defineMode("null",(function(){return{tokeLine truncated
|
||||
+1
@@ -0,0 +1 @@
|
||||
!function(t){"object"==typeof exports&&"object"==typeof module?t(require("../../lib/codemirror")):"function"==typeof define&&define.amd?define(["../../lib/codemirror"],t):t(CodeMirror)}((function(t){"use strict";function e(t,e){function i(t){clearTimeout(n.doRedraw),n.doRedraw=setTimeout((function(){n.redraw()}),t)}this.cm=t,this.options=e,this.buttonHeight=e.scrollButtonHeight||t.getOption("scrollButtonHeight"),this.annotations=[],this.doRedraw=this.doUpdate=null,this.div=t.getWrapperElement().appendChild(document.createElement("div")),this.div.style.cssText="position: absolute; right: 0; top: 0; z-index: 7; pointer-events: none",this.computeScale();var n=this;t.on("refresh",this.resizeHandler=function(){clearTimeout(n.doUpdate),n.doUpdate=setTimeout((function(){n.computeScale()&&i(20)}),100)}),t.on("markerAdded",this.resizeHandler),t.on("markerCleared",this.resizeHandler),!1!==e.listenForChanges&&t.on("changes",this.changeHandler=function(){i(250)})}t.defineExtension("annotateScrollbar",(function(t){return"string"==typeof t&&(t={className:t}),new e(this,t)})),t.defineOption("scrollButtonHeight",0),e.prototype.computeScale=function(){var t=this.cm,e=(t.getWrapperElement().clientHeight-t.display.barHeight-2*this.buttonHeight)/t.getScrollerElement().scrollHeight;if(e!=this.hScale)return this.hScale=e,!0},e.prototype.update=function(t){this.annotations=t,this.redraw()},e.prototype.redraw=function(t){!1!==t&&this.computeScale();var e=this.cm,i=this.hScale,n=document.createDocumentFragment(),o=this.annotations,r=e.getOption("lineWrapping"),a=r&&1.5*e.defaultTextHeight(),s=null,h=null;function l(t,i){if(s!=t.line){s=t.line,h=e.getLineHandle(t.line);var n=e.getLineHandleVisualStart(h);n!=h&&(s=e.getLineNumber(n),h=n)}return h.widgets&&h.widgets.length||r&&h.height>a?e.charCoords(t,"local")[i?"top":"bottom"]:e.heightAtLine(h,"local")+(i?0:h.height)}var d=e.lastLine();if(e.display.barWidth)for(var c,p=0;p<o.length;p++){var u=o[p];if(!(u.to.line>d)){for(var f=c||l(u.from,!0)*i,m=l(u.to,!1)*i;p<o.length-1&&!(o[p+1].to.line>d)&&!((c=l(o[p+1].from,!0)*i)>m+.9);)m=l((u=o[++p]).to,!1)*i;if(m!=f){var g=Math.max(m-f,3),H=n.appendChild(document.createElement("div"));H.style.cssText="position: absolute; right: 0px; width: "+Math.max(e.display.barWidth-1,2)+"px; top: "+(f+this.buttonHeight)+"px; height: "+g+"px",H.className=this.options.className,u.id&&H.setAttribute("annotation-id",u.id)}}}this.div.textContent="",this.div.appendChild(n)},e.prototype.clear=function(){this.cm.off("refresh",this.resizeHandler),this.cm.off("markerAdded",this.resizeHandler),this.cm.off("markerCleared",this.resizeHandler),this.changeHandler&&this.cm.off("changes",this.changeHandler),this.div.parentNode.removeChild(this.div)}}));
|
||||
+1
@@ -0,0 +1 @@
|
||||
!function(e){"object"==typeof exports&&"object"==typeof module?e(require("../../lib/codemirror")):"function"==typeof define&&define.amd?define(["../../lib/codemirror"],e):e(CodeMirror)}((function(e){"use strict";function n(n,i){e.changeEnd(i).line==n.lastLine()&&t(n)}function t(e){var n="";e.lineCount()>1&&(n=e.display.scroller.clientHeight-30-e.getLineHandle(e.lastLine()).height+"px");e.state.scrollPastEndPadding!=n&&(e.state.scrollPastEndPadding=n,e.display.lineSpace.parentNode.style.paddingBottom=n,e.off("refresh",t),e.setSize(),e.on("refresh",t))}e.defineOption("scrollPastEnd",!1,(function(i,o,d){d&&d!=e.Init&&(i.off("change",n),i.off("refresh",t),i.display.lineSpace.parentNode.style.paddingBottom="",i.state.scrollPastEndPadding=null),o&&(i.on("change",n),i.on("refresh",t),t(i))}))}));
|
||||
+66
@@ -0,0 +1,66 @@
|
||||
.CodeMirror-simplescroll-horizontal div, .CodeMirror-simplescroll-vertical div {
|
||||
position: absolute;
|
||||
background: #ccc;
|
||||
-moz-box-sizing: border-box;
|
||||
box-sizing: border-box;
|
||||
border: 1px solid #bbb;
|
||||
border-radius: 2px;
|
||||
}
|
||||
|
||||
.CodeMirror-simplescroll-horizontal, .CodeMirror-simplescroll-vertical {
|
||||
position: absolute;
|
||||
z-index: 6;
|
||||
background: #eee;
|
||||
}
|
||||
|
||||
.CodeMirror-simplescroll-horizontal {
|
||||
bottom: 0; left: 0;
|
||||
height: 8px;
|
||||
}
|
||||
.CodeMirror-simplescroll-horizontal div {
|
||||
bottom: 0;
|
||||
height: 100%;
|
||||
}
|
||||
|
||||
.CodeMirror-simplescroll-vertical {
|
||||
right: 0; top: 0;
|
||||
width: 8px;
|
||||
}
|
||||
.CodeMirror-simplescroll-vertical div {
|
||||
right: 0;
|
||||
width: 100%;
|
||||
}
|
||||
|
||||
|
||||
.CodeMirror-overlayscroll .CodeMirror-scrollbar-filler, .CodeMirror-overlayscroll .CodeMirror-gutter-filler {
|
||||
display: none;
|
||||
}
|
||||
|
||||
.CodeMirror-overlayscroll-horizontal div, .CodeMirror-overlayscroll-vertical div {
|
||||
position: absolute;
|
||||
background: #bcd;
|
||||
border-radius: 3px;
|
||||
}
|
||||
|
||||
.CodeMirror-overlayscroll-horizontal, .CodeMirror-overlayscroll-vertical {
|
||||
position: absolute;
|
||||
z-index: 6;
|
||||
}
|
||||
|
||||
.CodeMirror-overlayscroll-horizontal {
|
||||
bottom: 0; left: 0;
|
||||
height: 6px;
|
||||
}
|
||||
.CodeMirror-overlayscroll-horizontal div {
|
||||
bottom: 0;
|
||||
height: 100%;
|
||||
}
|
||||
|
||||
.CodeMirror-overlayscroll-vertical {
|
||||
right: 0; top: 0;
|
||||
width: 6px;
|
||||
}
|
||||
.CodeMirror-overlayscroll-vertical div {
|
||||
right: 0;
|
||||
width: 100%;
|
||||
}
|
||||
+1
@@ -0,0 +1 @@
|
||||
!function(t){"object"==typeof exports&&"object"==typeof module?t(require("../../lib/codemirror")):"function"==typeof define&&define.amd?define(["../../lib/codemirror"],t):t(CodeMirror)}((function(t){"use strict";function e(e,o,i){this.orientation=o,this.scroll=i,this.screen=this.total=this.size=1,this.pos=0,this.node=document.createElement("div"),this.node.className=e+"-"+o,this.inner=this.node.appendChild(document.createElement("div"));var n=this;function s(e){var o=t.wheelEventPixels(e)["horizontal"==n.orientation?"x":"y"],i=n.pos;n.moveTo(n.pos+o),n.pos!=i&&t.e_preventDefault(e)}t.on(this.inner,"mousedown",(function(e){if(1==e.which){t.e_preventDefault(e);var o="horizontal"==n.orientation?"pageX":"pageY",i=e[o],s=n.pos;t.on(document,"mousemove",h),t.on(document,"mouseup",r)}function r(){t.off(document,"mousemove",h),t.off(document,"mouseup",r)}function h(t){if(1!=t.which)return r();n.moveTo(s+(t[o]-i)*(n.total/n.size))}})),t.on(this.node,"click",(function(e){t.e_preventDefault(e);var o,i=n.inner.getBoundingClientRect();o="horizontal"==n.orientation?e.clientX<i.left?-1:e.clientX>i.right?1:0:e.clientY<i.top?-1:e.clientY>i.bottom?1:0,n.moveTo(n.pos+o*n.screen)})),t.on(this.node,"mousewheel",s),t.on(this.node,"DOMMouseScroll",s)}e.prototype.setPos=function(t,e){return t<0&&(t=0),t>this.total-this.screen&&(t=this.total-this.screen),!(!e&&t==this.pos)&&(this.pos=t,this.inner.style["horizontal"==this.orientation?"left":"top"]=t*(this.size/this.total)+"px",!0)},e.prototype.moveTo=function(t){this.setPos(t)&&this.scroll(t,this.orientation)};function o(t,o,i){this.addClass=t,this.horiz=new e(t,"horizontal",i),o(this.horiz.node),this.vert=new e(t,"vertical",i),o(this.vert.node),this.width=null}e.prototype.update=function(t,e,o){var i=this.screen!=e||this.total!=t||this.size!=o;i&&(this.screen=e,this.total=t,this.size=o);var n=this.screen*(this.size/this.total);n<10&&(this.size-=10-n,n=10),this.inner.style["horizontal"==this.orientation?"width":"height"]=n+"px",this.setPos(this.pos,i)},o.prototype.update=function(t){if(null==this.width){var e=window.getComputedStyle?window.getComputedStyle(this.horiz.node):this.horiz.node.currentStyle;e&&(this.width=parseInt(e.height))}var o=this.width||0,i=t.scrollWidth>t.clientWidth+1,n=t.scrollHeight>t.clientHeight+1;return this.vert.node.style.display=n?"block":"none",this.horiz.node.style.display=i?"block":"none",n&&(this.vert.update(t.scrollHeight,t.clientHeight,t.viewHeight-(i?o:0)),this.vert.node.style.bottom=i?o+"px":"0"),i&&(this.horiz.update(t.scrollWidth,t.clientWidth,t.viewWidth-(n?o:0)-t.barLeft),this.horiz.node.style.right=n?o+"px":"0",this.horiz.node.style.left=t.barLeft+"px"),{right:n?o:0,bottom:i?o:0}},o.prototype.setScrollTop=function(t){this.vert.setPos(t)},o.prototype.setScrollLeft=function(t){this.horiz.setPos(t)},o.prototype.clear=function(){var t=this.horiz.node.parentNode;t.removeChild(this.horiz.node),t.removeChild(this.vert.node)},t.scrollbarModel.simple=function(t,e){return new o("CodeMirror-simplescroll",t,e)},t.scrollbarModel.overlay=function(t,e){return new o("CodeMirror-overlayscroll",t,e)}}));
|
||||
+1
@@ -0,0 +1 @@
|
||||
!function(e){"object"==typeof exports&&"object"==typeof module?e(require("../../lib/codemirror"),require("../dialog/dialog")):"function"==typeof define&&define.amd?define(["../../lib/codemirror","../dialog/dialog"],e):e(CodeMirror)}((function(e){"use strict";function o(e,o){var r=Number(o);return/^[-+]/.test(o)?e.getCursor().line+r:r-1}e.defineOption("search",{bottom:!1}),e.commands.jumpToLine=function(e){var r=e.getCursor();!function(e,o,r,t,i){e.openDialog?e.openDialog(o,i,{value:t,selectValueOnOpen:!0,bottom:e.options.search.bottom}):i(prompt(r,t))}(e,function(e){return e.phrase("Jump to line:")+' <input type="text" style="width: 10em" class="CodeMirror-search-field"/> <span style="color: #888" class="CodeMirror-search-hint">'+e.phrase("(Use line:column or scroll% syntax)")+"</span>"}(e),e.phrase("Jump to line:"),r.line+1+":"+r.ch,(function(t){var i;if(t)if(i=/^\s*([\+\-]?\d+)\s*\:\s*(\d+)\s*$/.exec(t))e.setCursor(o(e,i[1]),Number(i[2]));else if(i=/^\s*([\+\-]?\d+(\.\d+)?)\%\s*/.exec(t)){var n=Math.round(e.lineCount()*Number(i[1])/100);/^[-+]/.test(i[1])&&(n=r.line+n+1),e.setCursor(n-1,r.ch)}else(i=/^\s*\:?\s*([\+\-]?\d+)\s*/.exec(t))&&e.setCursor(o(e,i[1]),r.ch)}))},e.keyMap.default["Alt-G"]="jumpToLine"}));
|
||||
+1
@@ -0,0 +1 @@
|
||||
!function(t){"object"==typeof exports&&"object"==typeof module?t(require("../../lib/codemirror"),require("./matchesonscrollbar")):"function"==typeof define&&define.amd?define(["../../lib/codemirror","./matchesonscrollbar"],t):t(CodeMirror)}((function(t){"use strict";var e={style:"matchhighlight",minChars:2,delay:100,wordsOnly:!1,annotateScrollbar:!1,showToken:!1,trim:!0};function o(t){for(var o in this.options={},e)this.options[o]=(t&&t.hasOwnProperty(o)?t:e)[o];this.overlay=this.timeout=null,this.matchesonscroll=null,this.active=!1}function i(t){var e=t.state.matchHighlighter;(e.active||t.hasFocus())&&r(t,e)}function n(t){var e=t.state.matchHighlighter;e.active||(e.active=!0,r(t,e))}function r(t,e){clearTimeout(e.timeout),e.timeout=setTimeout((function(){c(t)}),e.options.delay)}function a(t,e,o,i){var n=t.state.matchHighlighter;if(t.addOverlay(n.overlay=function(t,e,o){return{token:function(i){if(i.match(t)&&(!e||function(t,e){return!(t.start&&e.test(t.string.charAt(t.start-1))||t.pos!=t.string.length&&e.test(t.string.charAt(t.pos)))}(i,e)))return o;i.next(),i.skipTo(t.charAt(0))||i.skipToEnd()}}}(e,o,i)),n.options.annotateScrollbar&&t.showMatchesOnScrollbar){var r=o?new RegExp((/\w/.test(e.charAt(0))?"\\b":"")+e.replace(/[\\\[.+*?(){|^$]/g,"\\$&")+(/\w/.test(e.charAt(e.length-1))?"\\b":"")):e;n.matchesonscroll=t.showMatchesOnScrollbar(r,!1,{className:"CodeMirror-selection-highlight-scrollbar"})}}function s(t){var e=t.state.matchHighlighter;e.overlay&&(t.removeOverlay(e.overlay),e.overlay=null,e.matchesonscroll&&(e.matchesonscroll.clear(),e.matchesonscroll=null))}function c(t){t.operation((function(){var e=t.state.matchHighlighter;if(s(t),t.somethingSelected()||!e.options.showToken){var o=t.getCursor("from"),i=t.getCursor("to");if(o.line==i.line&&(!e.options.wordsOnly||function(t,e,o){if(null!==t.getRange(e,o).match(/^\w+$/)){if(e.ch>0){var i={line:e.line,ch:e.ch-1};if(null===t.getRange(i,e).match(/\W/))return!1}if(o.ch<t.getLine(e.line).length){i={line:o.line,ch:o.ch+1};if(null===t.getRange(o,i).match(/\W/))return!1}return!0}return!1}(t,o,i))){var n=t.getRange(o,i);e.options.trim&&(n=n.replace(/^\s+|\s+$/g,"")),n.length>=e.options.minChars&&a(t,n,!1,e.options.style)}}else{for(var r=!0===e.options.showToken?/[\w$]/:e.options.showToken,c=t.getCursor(),l=t.getLine(c.line),h=c.ch,u=h;h&&r.test(l.charAt(h-1));)--h;for(;u<l.length&&r.test(l.charAt(u));)++u;h<u&&a(t,l.slice(h,u),r,e.options.style)}}))}t.defineOption("highlightSelectionMatches",!1,(function(e,r,a){if(a&&a!=t.Init&&(s(e),clearTimeout(e.state.matchHighlighter.timeout),e.state.matchHighlighter=null,e.off("cursorActivity",i),e.off("focus",n)),r){var l=e.state.matchHighlighter=new o(r);e.hasFocus()?(l.active=!0,c(e)):e.on("focus",n),e.on("cursorActivity",i)}}))}));
|
||||
+8
@@ -0,0 +1,8 @@
|
||||
.CodeMirror-search-match {
|
||||
background: gold;
|
||||
border-top: 1px solid orange;
|
||||
border-bottom: 1px solid orange;
|
||||
-moz-box-sizing: border-box;
|
||||
box-sizing: border-box;
|
||||
opacity: .5;
|
||||
}
|
||||
+1
@@ -0,0 +1 @@
|
||||
!function(t){"object"==typeof exports&&"object"==typeof module?t(require("../../lib/codemirror"),require("./searchcursor"),require("../scroll/annotatescrollbar")):"function"==typeof define&&define.amd?define(["../../lib/codemirror","./searchcursor","../scroll/annotatescrollbar"],t):t(CodeMirror)}((function(t){"use strict";function e(t,e,i,o){this.cm=t,this.options=o;var a={listenForChanges:!1};for(var n in o)a[n]=o[n];a.className||(a.className="CodeMirror-search-match"),this.annotation=t.annotateScrollbar(a),this.query=e,this.caseFold=i,this.gap={from:t.firstLine(),to:t.lastLine()+1},this.matches=[],this.update=null,this.findMatches(),this.annotation.update(this.matches);var s=this;t.on("change",this.changeHandler=function(t,e){s.onChange(e)})}t.defineExtension("showMatchesOnScrollbar",(function(t,i,o){return"string"==typeof o&&(o={className:o}),o||(o={}),new e(this,t,i,o)}));function i(t,e,i){return t<=e?t:Math.max(e,t+i)}e.prototype.findMatches=function(){if(this.gap){for(var e=0;e<this.matches.length;e++){if((a=this.matches[e]).from.line>=this.gap.to)break;a.to.line>=this.gap.from&&this.matches.splice(e--,1)}for(var i=this.cm.getSearchCursor(this.query,t.Pos(this.gap.from,0),{caseFold:this.caseFold,multiline:this.options.multiline}),o=this.options&&this.options.maxMatches||1e3;i.findNext();){var a;if((a={from:i.from(),to:i.to()}).from.line>=this.gap.to)break;if(this.matches.splice(e++,0,a),this.matches.length>o)break}this.gap=null}},e.prototype.onChange=function(e){var o=e.from.line,a=t.changeEnd(e).line,n=a-e.to.line;if(this.gap?(this.gap.from=Math.min(i(this.gap.from,o,n),e.from.line),this.gap.to=Math.max(i(this.gap.to,o,n),e.from.line)):this.gap={from:e.from.line,to:a+1},n)for(var s=0;s<this.matches.length;s++){var r=this.matches[s],h=i(r.from.line,o,n);h!=r.from.line&&(r.from=t.Pos(h,r.from.ch));var c=i(r.to.line,o,n);c!=r.to.line&&(r.to=t.Pos(c,r.to.ch))}clearTimeout(this.update);var f=this;this.update=setTimeout((function(){f.updateAfterChange()}),250)},e.prototype.updateAfterChange=function(){this.findMatches(),this.annotation.update(this.matches)},e.prototype.clear=function(){this.cm.off("change",this.changeHandler),this.annotation.clear()}}));
|
||||
@@ -0,0 +1 @@
|
||||
!function(e){"object"==typeof exports&&"object"==typeof module?e(require("../../lib/codemirror"),require("./searchcursor"),require("../dialog/dialog")):"function"==typeof define&&define.amd?define(["../../lib/codemirror","./searchcursor","../dialog/dialog"],e):e(CodeMirror)}((function(e){"use strict";function o(){this.posFrom=this.posTo=this.lastQuery=this.query=null,this.overlay=null}function n(e){return e.state.search||(e.state.search=new o)}function t(e){return"string"==typeof e&&e==e.toLowerCase()}function r(e,o,n){return e.getSearchCursor(o,n,{caseFold:t(o),multiline:!0})}function i(e,o,n,t,r){e.openDialog?e.openDialog(o,r,{value:t,selectValueOnOpen:!0,bottom:e.options.search.bottom}):r(prompt(n,t))}function a(e){return e.replace(/\\([nrt\\])/g,(function(e,o){return"n"==o?"\n":"r"==o?"\r":"t"==o?"\t":"\\"==o?"\\":e}))}function s(e){var o=e.match(/^\/(.*)\/([a-z]*)$/);if(o)try{e=new RegExp(o[1],-1==o[2].indexOf("i")?"":"i")}catch(e){}else e=a(e);return("string"==typeof e?""==e:e.test(""))&&(e=/x^/),e}function c(e,o,n){o.queryText=n,o.query=s(n),e.removeOverlay(o.overlay,t(o.query)),o.overlay=function(e,o){return"string"==typeof e?e=new RegExp(e.replace(/[\-\[\]\/\{\}\(\)\*\+\?\.\\\^\$\|]/g,"\\$&"),o?"gi":"g"):e.global||(e=new RegExp(e.source,e.ignoreCase?"gi":"g")),{token:function(o){e.lastIndex=o.pos;var n=e.exec(o.string);if(n&&n.index==o.pos)return o.pos+=n[0].length||1,"searching";n?o.pos=n.index:o.skipToEnd()}}}(o.query,t(o.query)),e.addOverlay(o.overlay),e.showMatchesOnScrollbar&&(o.annotate&&(o.annotate.clear(),o.annotate=null),o.annotate=e.showMatchesOnScrollbar(o.query,t(o.query)))}function l(o,t,r,a){var s=n(o);if(s.query)return u(o,t);var l=o.getSelection()||s.lastQuery;if(l instanceof RegExp&&"x^"==l.source&&(l=null),r&&o.openDialog){var d=null,m=function(n,t){e.e_stop(t),n&&(n!=s.queryText&&(c(o,s,n),s.posFrom=s.posTo=o.getCursor()),d&&(d.style.opacity=1),u(o,t.shiftKey,(function(e,n){var t;n.line<3&&document.querySelector&&(t=o.display.wrapper.querySelector(".CodeMirror-dialog"))&&t.getBoundingClientRect().bottom-4>o.cursorCoords(n,"window").top&&((d=t).style.opacity=.4)})))};!function(e,o,n,t,r){e.openDialog(o,t,{value:n,selectValueOnOpen:!0,closeOnEnter:!1,onClose:function(){f(e)},onKeyDown:r,bottom:e.options.search.bottom})}(o,p(o),l,m,(function(t,r){var i=e.keyName(t),a=o.getOption("extraKeys"),s=a&&a[i]||e.keyMap[o.getOption("keyMap")][i];"findNext"==s||"findPrev"==s||"findPersistentNext"==s||"findPersistentPrev"==s?(e.e_stop(t),c(o,n(o),r),o.execCommand(s)):"find"!=s&&"findPersistent"!=s||(e.e_stop(t),m(r,t))})),a&&l&&(c(o,s,l),u(o,t))}else i(o,p(o),"Search for:",l,(function(e){e&&!s.query&&o.operation((function(){c(o,s,e),s.posFrom=s.posTo=o.getCursor(),u(o,t)}))}))}function u(o,t,i){o.operation((function(){var a=n(o),s=r(o,a.query,t?a.posFrom:a.posTo);(s.find(t)||(s=r(o,a.query,t?e.Pos(o.lastLine()):e.Pos(o.firstLine(),0))).find(t))&&(o.setSelection(s.from(),s.to()),o.scrollIntoView({from:s.from(),to:s.to()},20),a.posFrom=s.from(),a.posTo=s.to(),i&&i(s.from(),s.to()))}))}function f(e){e.operation((function(){var o=n(e);o.lastQuery=o.query,o.query&&(o.query=o.queryText=null,e.removeOverlay(o.overlay),o.annotate&&(o.annotate.clear(),o.annotate=null))}))}function p(e){return'<span class="CodeMirror-search-label">'+e.phrase("Search:")+'</span> <input type="text" style="width: 10em" class="CodeMirror-search-field"/> <span style="color: #888" class="CodeMirror-search-hint">'+e.phrase("(Use /re/ syntax for regexp search)")+"</span>"}function d(e,o,n){e.operation((function(){for(var t=r(e,o);t.findNext();)if("string"!=typeof o){var i=e.getRange(t.from(),t.to()).match(o);t.replace(n.replace(/\$(\d)/g,(function(e,o){return i[o]})))}else t.replace(n)}))}function m(e,o){if(!e.getOption("readOnly")){var t=e.getSelection()||n(e).lastQuery,c='<span class="CodeMirror-search-label">'+(o?e.phrase("Replace all:"):e.phrase("Replace:"))+"</span>";i(e,c+function(e){return' <input type="text" style="width: 10em" class="CodeMirror-search-field"/> <span style="color: #888" class="CodeMirror-search-hint">'+e.phrase("(Use /re/ syntax for regexp search)")+"</span>"}(e),c,t,(function(n){n&&(n=s(n),i(e,function(e){return'<span class="CodeMirror-search-label">'+e.phrase("With:")+'</span> <input type="text" style="width: 10em" class="CodeMirror-search-field"/>'}(e),e.phrase("Replace with:"),"",(function(t){if(t=a(t),o)d(e,n,t);else{f(e);var i=r(e,n,e.getCursor("from")),s=function(){var o,a=i.from();!(o=i.findNext())&&(i=r(e,n),!(o=i.findNext())||a&&i.from().line==a.line&&i.from().ch==a.ch)||(e.setSelection(i.from(),i.to()),e.scrollIntoView({from:i.from(),to:i.to()}),function(e,o,n,t){e.openConfirm?e.openConfirm(o,t):confirm(n)&&t[0]()}(e,function(e){return'<span class="CodeMirror-search-label">'+e.phrase("Replace?")+"</span> <button>"+e.phrase("Yes")+"</button> <button>"+e.phrase("No")+"</button> <button>"+e.phrase("All")+"</button> <button>"+e.phrase("Stop")+"</button> "}(e),e.phrase("Replace?"),[function(){c(oLine truncated
|
||||
+1
@@ -0,0 +1 @@
|
||||
!function(t){"object"==typeof exports&&"object"==typeof module?t(require("../../lib/codemirror")):"function"==typeof define&&define.amd?define(["../../lib/codemirror"],t):t(CodeMirror)}((function(t){"use strict";var n,e,r=t.Pos;function i(t,n){for(var e=function(t){var n=t.flags;return null!=n?n:(t.ignoreCase?"i":"")+(t.global?"g":"")+(t.multiline?"m":"")}(t),r=e,i=0;i<n.length;i++)-1==r.indexOf(n.charAt(i))&&(r+=n.charAt(i));return e==r?t:new RegExp(t.source,r)}function o(t){return/\\s|\\n|\n|\\W|\\D|\[\^/.test(t.source)}function l(t,n,e){n=i(n,"g");for(var o=e.line,l=e.ch,h=t.lastLine();o<=h;o++,l=0){n.lastIndex=l;var s=t.getLine(o),f=n.exec(s);if(f)return{from:r(o,f.index),to:r(o,f.index+f[0].length),match:f}}}function h(t,n,e){if(!o(n))return l(t,n,e);n=i(n,"gm");for(var h,s=1,f=e.line,c=t.lastLine();f<=c;){for(var u=0;u<s&&!(f>c);u++){var a=t.getLine(f++);h=null==h?a:h+"\n"+a}s*=2,n.lastIndex=e.ch;var g=n.exec(h);if(g){var m=h.slice(0,g.index).split("\n"),d=g[0].split("\n"),v=e.line+m.length-1,p=m[m.length-1].length;return{from:r(v,p),to:r(v+d.length-1,1==d.length?p+d[0].length:d[d.length-1].length),match:g}}}}function s(t,n,e){for(var r,i=0;i<=t.length;){n.lastIndex=i;var o=n.exec(t);if(!o)break;var l=o.index+o[0].length;if(l>t.length-e)break;(!r||l>r.index+r[0].length)&&(r=o),i=o.index+1}return r}function f(t,n,e){n=i(n,"g");for(var o=e.line,l=e.ch,h=t.firstLine();o>=h;o--,l=-1){var f=t.getLine(o),c=s(f,n,l<0?0:f.length-l);if(c)return{from:r(o,c.index),to:r(o,c.index+c[0].length),match:c}}}function c(t,n,e){if(!o(n))return f(t,n,e);n=i(n,"gm");for(var l,h=1,c=t.getLine(e.line).length-e.ch,u=e.line,a=t.firstLine();u>=a;){for(var g=0;g<h&&u>=a;g++){var m=t.getLine(u--);l=null==l?m:m+"\n"+l}h*=2;var d=s(l,n,c);if(d){var v=l.slice(0,d.index).split("\n"),p=d[0].split("\n"),x=u+v.length,L=v[v.length-1].length;return{from:r(x,L),to:r(x+p.length-1,1==p.length?L+p[0].length:p[p.length-1].length),match:d}}}}function u(t,n,e,r){if(t.length==n.length)return e;for(var i=0,o=e+Math.max(0,t.length-n.length);;){if(i==o)return i;var l=i+o>>1,h=r(t.slice(0,l)).length;if(h==e)return l;h>e?o=l:i=l+1}}function a(t,i,o,l){if(!i.length)return null;var h=l?n:e,s=h(i).split(/\r|\n\r?/);t:for(var f=o.line,c=o.ch,a=t.lastLine()+1-s.length;f<=a;f++,c=0){var g=t.getLine(f).slice(c),m=h(g);if(1==s.length){var d=m.indexOf(s[0]);if(-1==d)continue t;o=u(g,m,d,h)+c;return{from:r(f,u(g,m,d,h)+c),to:r(f,u(g,m,d+s[0].length,h)+c)}}var v=m.length-s[0].length;if(m.slice(v)==s[0]){for(var p=1;p<s.length-1;p++)if(h(t.getLine(f+p))!=s[p])continue t;var x=t.getLine(f+s.length-1),L=h(x),C=s[s.length-1];if(L.slice(0,C.length)==C)return{from:r(f,u(g,m,v,h)+c),to:r(f+s.length-1,u(x,L,C.length,h))}}}}function g(t,i,o,l){if(!i.length)return null;var h=l?n:e,s=h(i).split(/\r|\n\r?/);t:for(var f=o.line,c=o.ch,a=t.firstLine()-1+s.length;f>=a;f--,c=-1){var g=t.getLine(f);c>-1&&(g=g.slice(0,c));var m=h(g);if(1==s.length){var d=m.lastIndexOf(s[0]);if(-1==d)continue t;return{from:r(f,u(g,m,d,h)),to:r(f,u(g,m,d+s[0].length,h))}}var v=s[s.length-1];if(m.slice(0,v.length)==v){var p=1;for(o=f-s.length+1;p<s.length-1;p++)if(h(t.getLine(o+p))!=s[p])continue t;var x=t.getLine(f+1-s.length),L=h(x);if(L.slice(L.length-s[0].length)==s[0])return{from:r(f+1-s.length,u(x,L,x.length-s[0].length,h)),to:r(f,u(g,m,v.length,h))}}}}function m(t,n,e,o){var s;this.atOccurrence=!1,this.doc=t,e=e?t.clipPos(e):r(0,0),this.pos={from:e,to:e},"object"==typeof o?s=o.caseFold:(s=o,o=null),"string"==typeof n?(null==s&&(s=!1),this.matches=function(e,r){return(e?g:a)(t,n,r,s)}):(n=i(n,"gm"),o&&!1===o.multiline?this.matches=function(e,r){return(e?f:l)(t,n,r)}:this.matches=function(e,r){return(e?c:h)(t,n,r)})}String.prototype.normalize?(n=function(t){return t.normalize("NFD").toLowerCase()},e=function(t){return t.normalize("NFD")}):(n=function(t){return t.toLowerCase()},e=function(t){return t}),m.prototype={findNext:function(){return this.find(!1)},findPrevious:function(){return this.find(!0)},find:function(n){for(var e=this.matches(n,this.doc.clipPos(n?this.pos.from:this.pos.to));e&&0==t.cmpPos(e.from,e.to);)n?e.from.ch?e.from=r(e.from.line,e.from.ch-1):e=e.from.line==this.doc.firstLine()?null:this.matches(n,this.doc.clipPos(r(e.from.line-1))):e.to.ch<this.doc.getLine(e.to.line).length?e.to=r(e.to.line,e.to.ch+1):e=e.to.line==this.doc.lastLine()?null:this.matches(n,r(e.to.line+1,0));if(e)return this.pos=e,this.atOccurrence=!0,this.pos.match||!0;var i=r(n?this.doc.firstLine():this.doc.lastLine()+1,0);return this.pos={from:i,to:i},this.atOccurrence=!1},from:function(){if(this.atOccurrence)return this.pos.from},to:function(){if(this.atOccurrence)return this.pos.to},replace:function(n,e){if(this.atOccurrence){var i=t.splitLines(n);this.doc.replaceRange(i,this.pos.from,this.pos.to,e),this.pos.to=r(this.pos.from.line+i.length-1,i[i.length-1].length+(1==i.length?this.pos.from.ch:0))}}},t.defineExtension("getSearchCursor",(function(t,n,e){return new m(this.doc,t,n,e)})),t.defineDocExtension("geLine truncated
|
||||
+1
@@ -0,0 +1 @@
|
||||
!function(e){"object"==typeof exports&&"object"==typeof module?e(require("../../lib/codemirror")):"function"==typeof define&&define.amd?define(["../../lib/codemirror"],e):e(CodeMirror)}((function(e){"use strict";var t="CodeMirror-activeline-background";function i(e){for(var i=0;i<e.state.activeLines.length;i++)e.removeLineClass(e.state.activeLines[i],"wrap","CodeMirror-activeline"),e.removeLineClass(e.state.activeLines[i],"background",t),e.removeLineClass(e.state.activeLines[i],"gutter","CodeMirror-activeline-gutter")}function n(e,n){for(var r=[],o=0;o<n.length;o++){var a=n[o],s=e.getOption("styleActiveLine");if("object"==typeof s&&s.nonEmpty?a.anchor.line==a.head.line:a.empty()){var c=e.getLineHandleVisualStart(a.head.line);r[r.length-1]!=c&&r.push(c)}}(function(e,t){if(e.length!=t.length)return!1;for(var i=0;i<e.length;i++)if(e[i]!=t[i])return!1;return!0})(e.state.activeLines,r)||e.operation((function(){i(e);for(var n=0;n<r.length;n++)e.addLineClass(r[n],"wrap","CodeMirror-activeline"),e.addLineClass(r[n],"background",t),e.addLineClass(r[n],"gutter","CodeMirror-activeline-gutter");e.state.activeLines=r}))}function r(e,t){n(e,t.ranges)}e.defineOption("styleActiveLine",!1,(function(t,o,a){var s=a!=e.Init&&a;o!=s&&(s&&(t.off("beforeSelectionChange",r),i(t),delete t.state.activeLines),o&&(t.state.activeLines=[],n(t,t.listSelections()),t.on("beforeSelectionChange",r)))}))}));
|
||||
+1
@@ -0,0 +1 @@
|
||||
!function(e){"object"==typeof exports&&"object"==typeof module?e(require("../../lib/codemirror")):"function"==typeof define&&define.amd?define(["../../lib/codemirror"],e):e(CodeMirror)}((function(e){"use strict";function t(e){e.state.markedSelection&&e.operation((function(){!function(e){if(!e.somethingSelected())return l(e);if(e.listSelections().length>1)return f(e);var t=e.getCursor("start"),n=e.getCursor("end"),o=e.state.markedSelection;if(!o.length)return i(e,t,n);var c=o[0].find(),a=o[o.length-1].find();if(!c||!a||n.line-t.line<=8||r(t,a.to)>=0||r(n,c.from)<=0)return f(e);for(;r(t,c.from)>0;)o.shift().clear(),c=o[0].find();r(t,c.from)<0&&(c.to.line-t.line<8?(o.shift().clear(),i(e,t,c.to,0)):i(e,t,c.from,0));for(;r(n,a.to)<0;)o.pop().clear(),a=o[o.length-1].find();r(n,a.to)>0&&(n.line-a.from.line<8?(o.pop().clear(),i(e,a.from,n)):i(e,a.to,n))}(e)}))}function n(e){e.state.markedSelection&&e.state.markedSelection.length&&e.operation((function(){l(e)}))}e.defineOption("styleSelectedText",!1,(function(o,r,i){var c=i&&i!=e.Init;r&&!c?(o.state.markedSelection=[],o.state.markedSelectionStyle="string"==typeof r?r:"CodeMirror-selectedtext",f(o),o.on("cursorActivity",t),o.on("change",n)):!r&&c&&(o.off("cursorActivity",t),o.off("change",n),l(o),o.state.markedSelection=o.state.markedSelectionStyle=null)}));var o=e.Pos,r=e.cmpPos;function i(e,t,n,i){if(0!=r(t,n))for(var l=e.state.markedSelection,f=e.state.markedSelectionStyle,c=t.line;;){var a=c==t.line?t:o(c,0),s=c+8,d=s>=n.line,m=d?n:o(s,0),u=e.markText(a,m,{className:f});if(null==i?l.push(u):l.splice(i++,0,u),d)break;c=s}}function l(e){for(var t=e.state.markedSelection,n=0;n<t.length;++n)t[n].clear();t.length=0}function f(e){l(e);for(var t=e.listSelections(),n=0;n<t.length;n++)i(e,t[n].from(),t[n].to())}}));
|
||||
+1
@@ -0,0 +1 @@
|
||||
!function(e){"object"==typeof exports&&"object"==typeof module?e(require("../../lib/codemirror")):"function"==typeof define&&define.amd?define(["../../lib/codemirror"],e):e(CodeMirror)}((function(e){"use strict";function t(e){e.state.selectionPointer.rects=null,o(e)}function o(e){e.state.selectionPointer.willUpdate||(e.state.selectionPointer.willUpdate=!0,setTimeout((function(){!function(e){var t=e.state.selectionPointer;if(!t)return;if(null==t.rects&&null!=t.mouseX&&(t.rects=[],e.somethingSelected()))for(var o=e.display.selectionDiv.firstChild;o;o=o.nextSibling)t.rects.push(o.getBoundingClientRect());var n=!1;if(null!=t.mouseX)for(var i=0;i<t.rects.length;i++){var l=t.rects[i];l.left<=t.mouseX&&l.right>=t.mouseX&&l.top<=t.mouseY&&l.bottom>=t.mouseY&&(n=!0)}var s=n?t.value:"";e.display.lineDiv.style.cursor!=s&&(e.display.lineDiv.style.cursor=s)}(e),e.state.selectionPointer.willUpdate=!1}),50))}e.defineOption("selectionPointer",!1,(function(n,i){var l=n.state.selectionPointer;l&&(e.off(n.getWrapperElement(),"mousemove",l.mousemove),e.off(n.getWrapperElement(),"mouseout",l.mouseout),e.off(window,"scroll",l.windowScroll),n.off("cursorActivity",t),n.off("scroll",t),n.state.selectionPointer=null,n.display.lineDiv.style.cursor=""),i&&(l=n.state.selectionPointer={value:"string"==typeof i?i:"default",mousemove:function(e){!function(e,t){var n=e.state.selectionPointer;(null==t.buttons?t.which:t.buttons)?n.mouseX=n.mouseY=null:(n.mouseX=t.clientX,n.mouseY=t.clientY);o(e)}(n,e)},mouseout:function(e){!function(e,t){if(!e.getWrapperElement().contains(t.relatedTarget)){var n=e.state.selectionPointer;n.mouseX=n.mouseY=null,o(e)}}(n,e)},windowScroll:function(){t(n)},rects:null,mouseX:null,mouseY:null,willUpdate:!1},e.on(n.getWrapperElement(),"mousemove",l.mousemove),e.on(n.getWrapperElement(),"mouseout",l.mouseout),e.on(window,"scroll",l.windowScroll),n.on("cursorActivity",t),n.on("scroll",t))}))}));
|
||||
@@ -0,0 +1,87 @@
|
||||
.CodeMirror-Tern-completion {
|
||||
padding-left: 22px;
|
||||
position: relative;
|
||||
line-height: 1.5;
|
||||
}
|
||||
.CodeMirror-Tern-completion:before {
|
||||
position: absolute;
|
||||
left: 2px;
|
||||
bottom: 2px;
|
||||
border-radius: 50%;
|
||||
font-size: 12px;
|
||||
font-weight: bold;
|
||||
height: 15px;
|
||||
width: 15px;
|
||||
line-height: 16px;
|
||||
text-align: center;
|
||||
color: white;
|
||||
-moz-box-sizing: border-box;
|
||||
box-sizing: border-box;
|
||||
}
|
||||
.CodeMirror-Tern-completion-unknown:before {
|
||||
content: "?";
|
||||
background: #4bb;
|
||||
}
|
||||
.CodeMirror-Tern-completion-object:before {
|
||||
content: "O";
|
||||
background: #77c;
|
||||
}
|
||||
.CodeMirror-Tern-completion-fn:before {
|
||||
content: "F";
|
||||
background: #7c7;
|
||||
}
|
||||
.CodeMirror-Tern-completion-array:before {
|
||||
content: "A";
|
||||
background: #c66;
|
||||
}
|
||||
.CodeMirror-Tern-completion-number:before {
|
||||
content: "1";
|
||||
background: #999;
|
||||
}
|
||||
.CodeMirror-Tern-completion-string:before {
|
||||
content: "S";
|
||||
background: #999;
|
||||
}
|
||||
.CodeMirror-Tern-completion-bool:before {
|
||||
content: "B";
|
||||
background: #999;
|
||||
}
|
||||
|
||||
.CodeMirror-Tern-completion-guess {
|
||||
color: #999;
|
||||
}
|
||||
|
||||
.CodeMirror-Tern-tooltip {
|
||||
border: 1px solid silver;
|
||||
border-radius: 3px;
|
||||
color: #444;
|
||||
padding: 2px 5px;
|
||||
font-size: 90%;
|
||||
font-family: monospace;
|
||||
background-color: white;
|
||||
white-space: pre-wrap;
|
||||
|
||||
max-width: 40em;
|
||||
position: absolute;
|
||||
z-index: 10;
|
||||
-webkit-box-shadow: 2px 3px 5px rgba(0,0,0,.2);
|
||||
-moz-box-shadow: 2px 3px 5px rgba(0,0,0,.2);
|
||||
box-shadow: 2px 3px 5px rgba(0,0,0,.2);
|
||||
|
||||
transition: opacity 1s;
|
||||
-moz-transition: opacity 1s;
|
||||
-webkit-transition: opacity 1s;
|
||||
-o-transition: opacity 1s;
|
||||
-ms-transition: opacity 1s;
|
||||
}
|
||||
|
||||
.CodeMirror-Tern-hint-doc {
|
||||
max-width: 25em;
|
||||
margin-top: -3px;
|
||||
}
|
||||
|
||||
.CodeMirror-Tern-fname { color: black; }
|
||||
.CodeMirror-Tern-farg { color: #70a; }
|
||||
.CodeMirror-Tern-farg-current { text-decoration: underline; }
|
||||
.CodeMirror-Tern-type { color: #07c; }
|
||||
.CodeMirror-Tern-fhint-guess { opacity: .7; }
|
||||
@@ -0,0 +1 @@
|
||||
!function(t){"object"==typeof exports&&"object"==typeof module?t(require("../../lib/codemirror")):"function"==typeof define&&define.amd?define(["../../lib/codemirror"],t):t(CodeMirror)}((function(t){"use strict";t.TernServer=function(r){var c=this;this.options=r||{};var l=this.options.plugins||(this.options.plugins={});l.doc_comment||(l.doc_comment=!0),this.docs=Object.create(null),this.options.useWorker?this.server=new k(this):this.server=new tern.Server({getFile:function(t,e){return o(c,t,e)},async:!0,defs:this.options.defs||[],plugins:l}),this.trackChange=function(t,e){!function(t,e,n){var o=i(t,e),r=t.cachedArgHints;r&&r.doc==e&&h(r.start,n.to)>=0&&(t.cachedArgHints=null);var a=o.changed;null==a&&(o.changed=a={from:n.from.line,to:n.from.line});var c=n.from.line+(n.text.length-1);n.from.line<a.to&&(a.to=a.to-(n.to.line-c));c>=a.to&&(a.to=c+1);a.from>n.from.line&&(a.from=n.from.line);e.lineCount()>250&&n.to-a.from>100&&setTimeout((function(){o.changed&&o.changed.to-o.changed.from>100&&s(t,o)}),200)}(c,t,e)},this.cachedArgHints=null,this.activeArgHints=null,this.jumpStack=[],this.getHint=function(o,i){return function(o,i,r){o.request(i,{type:"completions",types:!0,docs:!0,urls:!0},(function(s,c){if(s)return w(o,i,s);var l=[],u="",f=c.start,d=c.end;'["'==i.getRange(e(f.line,f.ch-2),f)&&'"]'!=i.getRange(d,e(d.line,d.ch+2))&&(u='"]');for(var p=0;p<c.completions.length;++p){var h=c.completions[p],g=a(h.type);c.guess&&(g+=" "+n+"guess"),l.push({text:h.name+u,displayText:h.displayName||h.name,className:g,data:h})}var m={from:f,to:d,list:l},v=null;t.on(m,"close",(function(){x(v)})),t.on(m,"update",(function(){x(v)})),t.on(m,"select",(function(t,e){x(v);var r=o.options.completionTip?o.options.completionTip(t.data):t.data.doc;r&&(v=C(e.parentNode.getBoundingClientRect().right+window.pageXOffset,e.getBoundingClientRect().top+window.pageYOffset,r,i,n+"hint-doc"))})),r(m)}))}(c,o,i)},this.getHint.async=!0},t.TernServer.prototype={addDoc:function(e,n){var o={doc:n,name:e,changed:null};return this.server.addFile(e,T(this,o)),t.on(n,"change",this.trackChange),this.docs[e]=o},delDoc:function(e){var n=r(this,e);n&&(t.off(n.doc,"change",this.trackChange),delete this.docs[n.name],this.server.delFile(n.name))},hideDoc:function(t){b(this);var e=r(this,t);e&&e.changed&&s(this,e)},complete:function(t){t.showHint({hint:this.getHint})},showType:function(t,e,n){c(this,t,e,"type",n)},showDocs:function(t,e,n){c(this,t,e,"documentation",n)},updateArgHints:function(n){!function(n,o){if(b(n),o.somethingSelected())return;var i=o.getTokenAt(o.getCursor()).state,r=t.innerMode(o.getMode(),i);if("javascript"!=r.mode.name)return;var s=r.state.lexical;if("call"!=s.info)return;for(var a,c=s.pos||0,f=o.getOption("tabSize"),d=o.getCursor().line,p=Math.max(0,d-9),g=!1;d>=p;--d){for(var m=o.getLine(d),v=0,y=0;;){var C=m.indexOf("\t",y);if(-1==C)break;v+=f-(C+v)%f-1,y=C+1}if(a=s.column-v,"("==m.charAt(a)){g=!0;break}}if(!g)return;var x=e(d,a),w=n.cachedArgHints;if(w&&w.doc==o.getDoc()&&0==h(x,w.start))return l(n,o,c);n.request(o,{type:"type",preferFunction:!0,end:x},(function(t,e){!t&&e.type&&/^fn\(/.test(e.type)&&(n.cachedArgHints={start:x,type:u(e.type),name:e.exprName||e.name||"fn",guess:e.guess,doc:o.getDoc()},l(n,o,c))}))}(this,n)},jumpToDef:function(t){!function(t,n){function o(o){var r={type:"definition",variable:o||null},s=i(t,n.getDoc());t.server.request(p(t,s,r),(function(o,i){if(o)return w(t,n,o);if(i.file||!i.url){if(i.file){var r,a=t.docs[i.file];if(a&&(r=function(t,n){for(var o=n.context.slice(0,n.contextOffset).split("\n"),i=n.start.line-(o.length-1),r=e(i,(1==o.length?n.start.ch:t.getLine(i).length)-o[0].length),s=t.getLine(i).slice(r.ch),a=i+1;a<t.lineCount()&&s.length<n.context.length;++a)s+="\n"+t.getLine(a);if(s.slice(0,n.context.length)==n.context)return n;var c,l=t.getSearchCursor(n.context,0,!1),u=1/0;for(;l.findNext();){var f=l.from(),d=1e4*Math.abs(f.line-r.line);d||(d=Math.abs(f.ch-r.ch)),d<u&&(c=f,u=d)}if(!c)return null;1==o.length?c.ch+=o[0].length:c=e(c.line+(o.length-1),o[o.length-1].length);if(n.start.line==n.end.line)var p=e(c.line,c.ch+(n.end.ch-n.start.ch));else p=e(c.line+(n.end.line-n.start.line),n.end.ch);return{start:c,end:p}}(a.doc,i)))return t.jumpStack.push({file:s.name,start:n.getCursor("from"),end:n.getCursor("to")}),void f(t,s,a,r.start,r.end)}w(t,n,"Could not find a definition.")}else window.open(i.url)}))}!function(t){var e=t.getCursor("end"),n=t.getTokenAt(e);return!(n.start<e.ch&&"comment"==n.type)&&/[\w)\]]/.test(t.getLine(e.line).slice(Math.max(e.ch-1,0),e.ch+1))}(n)?m(n,"Jump to variable",(function(t){t&&o(t)})):o()}(this,t)},jumpBack:function(t){!function(t,e){var n=t.jumpStack.pop(),o=n&&t.docs[n.file];if(!o)return;f(t,i(t,e.getDoc()),o,n.start,n.end)}(this,t)},rename:function(t){!function(t,e){var n=e.getTokenAt(e.getCursor());if(!/\w/.test(n.string))return w(t,e,"Not at a variable");m(e,"New name for "+n.string,(function(n){t.request(e,{type:"rename",newName:n,fullDocs:!0},(function(n,o){if(n)rLine truncated
|
||||
@@ -0,0 +1 @@
|
||||
var server;this.onmessage=function(e){var t=e.data;switch(t.type){case"init":return startServer(t.defs,t.plugins,t.scripts);case"add":return server.addFile(t.name,t.text);case"del":return server.delFile(t.name);case"req":return server.request(t.body,(function(e,r){postMessage({id:t.id,body:r,err:e&&String(e)})}));case"getFile":var r=pending[t.id];return delete pending[t.id],r(t.err,t.text);default:throw new Error("Unknown message type: "+t.type)}};var nextId=0,pending={};function getFile(e,t){postMessage({type:"getFile",name:e,id:++nextId}),pending[nextId]=t}function startServer(e,t,r){r&&importScripts.apply(null,r),server=new tern.Server({getFile:getFile,async:!0,defs:e,plugins:t})}this.console={log:function(e){postMessage({type:"debug",message:e})}};
|
||||
@@ -0,0 +1 @@
|
||||
!function(t){"object"==typeof exports&&"object"==typeof module?t(require("../../lib/codemirror")):"function"==typeof define&&define.amd?define(["../../lib/codemirror"],t):t(CodeMirror)}((function(t){"use strict";var r=t.Pos;function e(t,r,e){for(var n=e.paragraphStart||t.getHelper(r,"paragraphStart"),o=r.line,a=t.firstLine();o>a;--o){var i=t.getLine(o);if(n&&n.test(i))break;if(!/\S/.test(i)){++o;break}}for(var f=e.paragraphEnd||t.getHelper(r,"paragraphEnd"),l=r.line+1,h=t.lastLine();l<=h;++l){i=t.getLine(l);if(f&&f.test(i)){++l;break}if(!/\S/.test(i))break}return{from:o,to:l}}function n(t,r,e,n,o){for(var a=r;a<t.length&&" "==t.charAt(a);)a++;for(;a>0&&!e.test(t.slice(a-1,a+1));--a);if(!o&&a<=t.match(/^[ \t]*/)[0].length)for(a=r+1;a<t.length-1&&!e.test(t.slice(a-1,a+1));++a);for(var i=!0;;i=!1){var f=a;if(n)for(;" "==t.charAt(f-1);)--f;if(0!=f||!i)return{from:f,to:a};a=r}}function o(e,o,a,i){o=e.clipPos(o),a=e.clipPos(a);var f=i.column||80,l=i.wrapOn||/\s\S|-[^\.\d]/,h=!1!==i.forceBreak,s=!1!==i.killTrailingSpace,c=[],g="",p=o.line,m=e.getRange(o,a,!1);if(!m.length)return null;var u=m[0].match(/^[ \t]*/)[0];u.length>=f&&(f=u.length+1);for(var v=0;v<m.length;++v){var d=m[v],b=g.length,x=0;g&&d&&!l.test(g.charAt(g.length-1)+d.charAt(0))&&(g+=" ",x=1);var k="";if(v&&(k=d.match(/^\s*/)[0],d=d.slice(k.length)),g+=d,v){var S=g.length>f&&u==k&&n(g,f,l,s,h);S&&S.from==b&&S.to==b+x?(g=u+d,++p):c.push({text:[x?" ":""],from:r(p,b),to:r(p+1,k.length)})}for(;g.length>f;){var E=n(g,f,l,s,h);if(!(E.from!=E.to||h&&u!==g.slice(0,E.to)))break;c.push({text:["",u],from:r(p,E.from),to:r(p,E.to)}),g=u+g.slice(E.to),++p}}return c.length&&e.operation((function(){for(var r=0;r<c.length;++r){var n=c[r];(n.text||t.cmpPos(n.from,n.to))&&e.replaceRange(n.text,n.from,n.to)}})),c.length?{from:c[0].from,to:t.changeEnd(c[c.length-1])}:null}t.defineExtension("wrapParagraph",(function(t,n){n=n||{},t||(t=this.getCursor());var a=e(this,t,n);return o(this,r(a.from,0),r(a.to-1),n)})),t.commands.wrapLines=function(t){t.operation((function(){for(var n=t.listSelections(),a=t.lastLine()+1,i=n.length-1;i>=0;i--){var f,l=n[i];if(l.empty()){var h=e(t,l.head,{});f={from:r(h.from,0),to:r(h.to-1)}}else f={from:l.from(),to:l.to()};f.to.line>=a||(a=f.from.line,o(t,f.from,f.to,{}))}}))},t.defineExtension("wrapRange",(function(t,r,e){return o(this,t,r,e||{})})),t.defineExtension("wrapParagraphsInRange",(function(t,n,a){a=a||{};for(var i=this,f=[],l=t.line;l<=n.line;){var h=e(i,r(l,0),a);f.push(h),l=h.to}var s=!1;return f.length&&i.operation((function(){for(var t=f.length-1;t>=0;--t)s=s||o(i,r(f[t].from,0),r(f[t].to-1),a)})),s}))}));
|
||||
@@ -0,0 +1,48 @@
|
||||
#!/usr/bin/env node
|
||||
|
||||
// Simple command-line code highlighting tool. Reads code from stdin,
|
||||
// spits html to stdout. For example:
|
||||
//
|
||||
// echo 'function foo(a) { return a; }' | bin/source-highlight -s javascript
|
||||
// bin/source-highlight -s
|
||||
|
||||
var fs = require("fs");
|
||||
|
||||
var CodeMirror = require("../addon/runmode/runmode.node.js");
|
||||
require("../mode/meta.js");
|
||||
|
||||
var sPos = process.argv.indexOf("-s");
|
||||
if (sPos == -1 || sPos == process.argv.length - 1) {
|
||||
console.error("Usage: source-highlight -s language");
|
||||
process.exit(1);
|
||||
}
|
||||
var lang = process.argv[sPos + 1].toLowerCase(), modeName = lang;
|
||||
var found = CodeMirror.findModeByMIME(lang) || CodeMirror.findModeByName(lang)
|
||||
if (found) {
|
||||
modeName = found.mode
|
||||
lang = found.mime
|
||||
}
|
||||
|
||||
if (!CodeMirror.modes[modeName])
|
||||
require("../mode/" + modeName + "/" + modeName + ".js");
|
||||
|
||||
function esc(str) {
|
||||
return str.replace(/[<&]/g, function(ch) { return ch == "&" ? "&" : "<"; });
|
||||
}
|
||||
|
||||
var code = fs.readFileSync("/dev/stdin", "utf8");
|
||||
var curStyle = null, accum = "";
|
||||
function flush() {
|
||||
if (curStyle) process.stdout.write("<span class=\"" + curStyle.replace(/(^|\s+)/g, "$1cm-") + "\">" + esc(accum) + "</span>");
|
||||
else process.stdout.write(esc(accum));
|
||||
}
|
||||
|
||||
CodeMirror.runMode(code, lang, function(text, style) {
|
||||
if (style != curStyle) {
|
||||
flush();
|
||||
curStyle = style; accum = text;
|
||||
} else {
|
||||
accum += text;
|
||||
}
|
||||
});
|
||||
flush();
|
||||
@@ -0,0 +1 @@
|
||||
!function(e){"object"==typeof exports&&"object"==typeof module?e(require("../lib/codemirror")):"function"==typeof define&&define.amd?define(["../lib/codemirror"],e):e(CodeMirror)}((function(e){"use strict";var t=e.commands,n=e.Pos;function r(e,t){return e.line==t.line&&e.ch==t.ch}var a=[];function o(e){a.push(e),a.length>50&&a.shift()}function i(e){return a[a.length-(e?Math.min(e,1):1)]||""}var l=null;function c(e,t,n,i,c){null==c&&(c=e.getRange(t,n)),"grow"==i&&l&&l.cm==e&&r(t,l.pos)&&e.isClean(l.gen)?function(e){if(!a.length)return o(e);a[a.length-1]+=e}(c):!1!==i&&o(c),e.replaceRange("",t,n,"+delete"),l="grow"==i?{cm:e,pos:t,gen:e.changeGeneration()}:null}function s(e,t,n){return e.findPosH(t,n,"char",!0)}function u(e,t,n){return e.findPosH(t,n,"word",!0)}function d(e,t,n){return e.findPosV(t,n,"line",e.doc.sel.goalColumn)}function f(e,t,n){return e.findPosV(t,n,"page",e.doc.sel.goalColumn)}function p(e,t,r){for(var a=t.line,o=e.getLine(a),i=/\S/.test(r<0?o.slice(0,t.ch):o.slice(t.ch)),l=e.firstLine(),c=e.lastLine();;){if((a+=r)<l||a>c)return e.clipPos(n(a-r,r<0?0:null));if(o=e.getLine(a),/\S/.test(o))i=!0;else if(i)return n(a,0)}}function g(e,t,r){for(var a=t.line,o=t.ch,i=e.getLine(t.line),l=!1;;){var c=i.charAt(o+(r<0?-1:0));if(c){if(l&&/[!?.]/.test(c))return n(a,o+(r>0?1:0));l||(l=/\w/.test(c)),o+=r}else{if(a==(r<0?e.firstLine():e.lastLine()))return n(a,o);if(i=e.getLine(a+r),!/\S/.test(i))return n(a,o);a+=r,o=r<0?i.length:0}}}function C(e,t,a){var o;if(e.findMatchingBracket&&(o=e.findMatchingBracket(t,{strict:!0}))&&o.match&&(o.forward?1:-1)==a)return a>0?n(o.to.line,o.to.ch+1):o.to;for(var i=!0;;i=!1){var l=e.getTokenAt(t),c=n(t.line,a<0?l.start:l.end);if(!(i&&a>0&&l.end==t.ch)&&/\w/.test(l.string))return c;var s=e.findPosH(c,a,"char");if(r(c,s))return t;t=s}}function h(e,t){var n=e.state.emacsPrefix;return n?(L(e),"-"==n?-1:Number(n)):t?null:1}function w(e){var t="string"==typeof e?function(t){t.execCommand(e)}:e;return function(e){var n=h(e);t(e);for(var r=1;r<n;++r)t(e)}}function m(e,t,n,a){var o=h(e);o<0&&(a=-a,o=-o);for(var i=0;i<o;++i){var l=n(e,t,a);if(r(l,t))break;t=l}return t}function k(e,t){var n=function(n){n.extendSelection(m(n,n.getCursor(),e,t))};return n.motion=!0,n}function S(e,t,n,r){for(var a,o=e.listSelections(),i=o.length;i--;)c(e,a=o[i].head,m(e,a,t,n),r)}function v(e,t){if(e.somethingSelected()){for(var n,r=e.listSelections(),a=r.length;a--;)c(e,(n=r[a]).anchor,n.head,t);return!0}}function A(e,t){e.state.emacsPrefix?"-"!=t&&(e.state.emacsPrefix+=t):(e.state.emacsPrefix=t,e.on("keyHandled",x),e.on("inputRead",P))}var b={"Alt-G":!0,"Ctrl-X":!0,"Ctrl-Q":!0,"Ctrl-U":!0};function x(e,t){e.state.emacsPrefixMap||b.hasOwnProperty(t)||L(e)}function L(e){e.state.emacsPrefix=null,e.off("keyHandled",x),e.off("inputRead",P)}function P(e,t){var n=h(e);if(n>1&&"+input"==t.origin){for(var r=t.text.join("\n"),a="",o=1;o<n;++o)a+=r;e.replaceSelection(a)}}function R(e,t){("string"!=typeof t||!/^\d$/.test(t)&&"Ctrl-U"!=t)&&(e.removeKeyMap(D),e.state.emacsPrefixMap=!1,e.off("keyHandled",R),e.off("inputRead",R))}function y(e){e.setExtending(!1),e.setCursor(e.getCursor())}function W(e,t,n){e.openDialog?e.openDialog(function(e){var t=document.createDocumentFragment(),n=document.createElement("input");return n.setAttribute("type","text"),n.style.width="10em",t.appendChild(document.createTextNode(e+": ")),t.appendChild(n),t}(t),n,{bottom:!0}):n(prompt(t,""))}function U(e,t){var n=e.getCursor(),r=e.findPosH(n,1,"word");e.replaceRange(t(e.getRange(n,r)),n,r),e.setCursor(r)}t.setMark=function(e){e.setCursor(e.getCursor()),e.setExtending(!e.getExtending()),e.on("change",(function(){e.setExtending(!1)}))},t.killRegion=function(e){c(e,e.getCursor("start"),e.getCursor("end"),!0)},t.killLineEmacs=w((function(e){var t=e.getCursor(),r=e.clipPos(n(t.line)),a=e.getRange(t,r);/\S/.test(a)||(a+="\n",r=n(t.line+1,0)),c(e,t,r,"grow",a)})),t.killRingSave=function(e){o(e.getSelection()),y(e)},t.yank=function(e){var t=e.getCursor();e.replaceRange(i(h(e)),t,t,"paste"),e.setSelection(t,e.getCursor())},t.yankPop=function(e){e.replaceSelection((a.length>1&&a.pop(),i()),"around","paste")},t.forwardChar=k(s,1),t.backwardChar=k(s,-1),t.deleteChar=function(e){S(e,s,1,!1)},t.deleteForwardChar=function(e){v(e,!1)||S(e,s,1,!1)},t.deleteBackwardChar=function(e){v(e,!1)||S(e,s,-1,!1)},t.forwardWord=k(u,1),t.backwardWord=k(u,-1),t.killWord=function(e){S(e,u,1,"grow")},t.backwardKillWord=function(e){S(e,u,-1,"grow")},t.nextLine=k(d,1),t.previousLine=k(d,-1),t.scrollDownCommand=k(f,1),t.scrollUpCommand=k(f,-1),t.backwardParagraph=k(p,-1),t.forwardParagraph=k(p,1),t.backwardSentence=k(g,-1),t.forwardSentence=k(g,1),t.killSentence=function(e){S(e,g,1,"grow")},t.backwardKillSentence=function(e){c(e,e.getCursor(),g(e,e.getCursor(),1),"grow")},t.killSexp=function(e){S(e,C,1,"grow")},t.backwardKillSexp=function(e){S(e,C,-1,"grow")},t.forwardSexp=k(C,1),t.backwardSexp=k(C,-1),t.markSexp=function(e){var t=e.getCursor();e.setSelection(m(e,t,C,1Line truncated
|
||||
@@ -0,0 +1 @@
|
||||
!function(e){"object"==typeof exports&&"object"==typeof module?e(require("../lib/codemirror"),require("../addon/search/searchcursor"),require("../addon/edit/matchbrackets")):"function"==typeof define&&define.amd?define(["../lib/codemirror","../addon/search/searchcursor","../addon/edit/matchbrackets"],e):e(CodeMirror)}((function(e){"use strict";var t=e.commands,n=e.Pos;function r(t,r){t.extendSelectionsBy((function(o){return t.display.shift||t.doc.extend||o.empty()?function(t,r,o){if(o<0&&0==r.ch)return t.clipPos(n(r.line-1));var i=t.getLine(r.line);if(o>0&&r.ch>=i.length)return t.clipPos(n(r.line+1,0));for(var l,a="start",s=r.ch,c=s,f=o<0?0:i.length,u=0;c!=f;c+=o,u++){var d=i.charAt(o<0?c-1:c),m="_"!=d&&e.isWordChar(d)?"w":"o";if("w"==m&&d.toUpperCase()==d&&(m="W"),"start"==a)"o"!=m?(a="in",l=m):s=c+o;else if("in"==a&&l!=m){if("w"==l&&"W"==m&&o<0&&c--,"W"==l&&"w"==m&&o>0){if(c==s+1){l="w";continue}c--}break}}return n(r.line,c)}(t.doc,o.head,r):r<0?o.from():o.to()}))}function o(t,r){if(t.isReadOnly())return e.Pass;t.operation((function(){for(var e=t.listSelections().length,o=[],i=-1,l=0;l<e;l++){var a=t.listSelections()[l].head;if(!(a.line<=i)){var s=n(a.line+(r?0:1),0);t.replaceRange("\n",s,null,"+insertLine"),t.indentLine(s.line,null,!0),o.push({head:s,anchor:s}),i=a.line+1}}t.setSelections(o)})),t.execCommand("indentAuto")}function i(t,r){for(var o=r.ch,i=o,l=t.getLine(r.line);o&&e.isWordChar(l.charAt(o-1));)--o;for(;i<l.length&&e.isWordChar(l.charAt(i));)++i;return{from:n(r.line,o),to:n(r.line,i),word:l.slice(o,i)}}function l(e,t){for(var n=e.listSelections(),r=[],o=0;o<n.length;o++){var i=n[o],l=e.findPosV(i.anchor,t,"line",i.anchor.goalColumn),a=e.findPosV(i.head,t,"line",i.head.goalColumn);l.goalColumn=null!=i.anchor.goalColumn?i.anchor.goalColumn:e.cursorCoords(i.anchor,"div").left,a.goalColumn=null!=i.head.goalColumn?i.head.goalColumn:e.cursorCoords(i.head,"div").left;var s={anchor:l,head:a};r.push(i),r.push(s)}e.setSelections(r)}t.goSubwordLeft=function(e){r(e,-1)},t.goSubwordRight=function(e){r(e,1)},t.scrollLineUp=function(e){var t=e.getScrollInfo();if(!e.somethingSelected()){var n=e.lineAtHeight(t.top+t.clientHeight,"local");e.getCursor().line>=n&&e.execCommand("goLineUp")}e.scrollTo(null,t.top-e.defaultTextHeight())},t.scrollLineDown=function(e){var t=e.getScrollInfo();if(!e.somethingSelected()){var n=e.lineAtHeight(t.top,"local")+1;e.getCursor().line<=n&&e.execCommand("goLineDown")}e.scrollTo(null,t.top+e.defaultTextHeight())},t.splitSelectionByLine=function(e){for(var t=e.listSelections(),r=[],o=0;o<t.length;o++)for(var i=t[o].from(),l=t[o].to(),a=i.line;a<=l.line;++a)l.line>i.line&&a==l.line&&0==l.ch||r.push({anchor:a==i.line?i:n(a,0),head:a==l.line?l:n(a)});e.setSelections(r,0)},t.singleSelectionTop=function(e){var t=e.listSelections()[0];e.setSelection(t.anchor,t.head,{scroll:!1})},t.selectLine=function(e){for(var t=e.listSelections(),r=[],o=0;o<t.length;o++){var i=t[o];r.push({anchor:n(i.from().line,0),head:n(i.to().line+1,0)})}e.setSelections(r)},t.insertLineAfter=function(e){return o(e,!1)},t.insertLineBefore=function(e){return o(e,!0)},t.selectNextOccurrence=function(t){var r=t.getCursor("from"),o=t.getCursor("to"),l=t.state.sublimeFindFullWord==t.doc.sel;if(0==e.cmpPos(r,o)){var a=i(t,r);if(!a.word)return;t.setSelection(a.from,a.to),l=!0}else{var s=t.getRange(r,o),c=l?new RegExp("\\b"+s+"\\b"):s,f=t.getSearchCursor(c,o),u=f.findNext();if(u||(u=(f=t.getSearchCursor(c,n(t.firstLine(),0))).findNext()),!u||function(t,n,r){for(var o=0;o<t.length;o++)if(0==e.cmpPos(t[o].from(),n)&&0==e.cmpPos(t[o].to(),r))return!0;return!1}(t.listSelections(),f.from(),f.to()))return;t.addSelection(f.from(),f.to())}l&&(t.state.sublimeFindFullWord=t.doc.sel)},t.skipAndSelectNextOccurrence=function(n){var r=n.getCursor("anchor"),o=n.getCursor("head");t.selectNextOccurrence(n),0!=e.cmpPos(r,o)&&n.doc.setSelections(n.doc.listSelections().filter((function(e){return e.anchor!=r||e.head!=o})))},t.addCursorToPrevLine=function(e){l(e,-1)},t.addCursorToNextLine=function(e){l(e,1)};function a(t){for(var r=t.listSelections(),o=[],i=0;i<r.length;i++){var l=r[i],a=l.head,s=t.scanForBracket(a,-1);if(!s)return!1;for(;;){var c=t.scanForBracket(a,1);if(!c)return!1;if(c.ch=="(){}[]".charAt("(){}[]".indexOf(s.ch)+1)){var f=n(s.pos.line,s.pos.ch+1);if(0!=e.cmpPos(f,l.from())||0!=e.cmpPos(c.pos,l.to())){o.push({anchor:f,head:c.pos});break}if(!(s=t.scanForBracket(s.pos,-1)))return!1}a=n(c.pos.line,c.pos.ch+1)}}return t.setSelections(o),!0}function s(e){return e?/\bpunctuation\b/.test(e)?e:void 0:null}function c(t,r,o){if(t.isReadOnly())return e.Pass;for(var i,l=t.listSelections(),a=[],s=0;s<l.length;s++){var c=l[s];if(!c.empty()){for(var f=c.from().line,u=c.to().line;s<l.length-1&&l[s+1].from().line==u;)u=l[++s].to().line;l[s].to().ch||u--,a.push(f,u)}}a.length?i=!0:a.push(t.firstLine(),t.lastLine()),t.operation((function(){for(var e=[],l=0;l<a.length;l+=2){var s=a[l],c=a[l+1],f=n(s,0),u=n(c),d=t.getRange(f,u,!1);r?d.sort((functiLine truncated
|
||||
@@ -0,0 +1 @@
|
||||
!function(e){"object"==typeof exports&&"object"==typeof module?e(require("../lib/codemirror"),require("../addon/search/searchcursor"),require("../addon/dialog/dialog"),require("../addon/edit/matchbrackets.js")):"function"==typeof define&&define.amd?define(["../lib/codemirror","../addon/search/searchcursor","../addon/dialog/dialog","../addon/edit/matchbrackets"],e):e(CodeMirror)}((function(e){"use strict";var t=[{keys:"<Left>",type:"keyToKey",toKeys:"h"},{keys:"<Right>",type:"keyToKey",toKeys:"l"},{keys:"<Up>",type:"keyToKey",toKeys:"k"},{keys:"<Down>",type:"keyToKey",toKeys:"j"},{keys:"<Space>",type:"keyToKey",toKeys:"l"},{keys:"<BS>",type:"keyToKey",toKeys:"h",context:"normal"},{keys:"<Del>",type:"keyToKey",toKeys:"x",context:"normal"},{keys:"<C-Space>",type:"keyToKey",toKeys:"W"},{keys:"<C-BS>",type:"keyToKey",toKeys:"B",context:"normal"},{keys:"<S-Space>",type:"keyToKey",toKeys:"w"},{keys:"<S-BS>",type:"keyToKey",toKeys:"b",context:"normal"},{keys:"<C-n>",type:"keyToKey",toKeys:"j"},{keys:"<C-p>",type:"keyToKey",toKeys:"k"},{keys:"<C-[>",type:"keyToKey",toKeys:"<Esc>"},{keys:"<C-c>",type:"keyToKey",toKeys:"<Esc>"},{keys:"<C-[>",type:"keyToKey",toKeys:"<Esc>",context:"insert"},{keys:"<C-c>",type:"keyToKey",toKeys:"<Esc>",context:"insert"},{keys:"s",type:"keyToKey",toKeys:"cl",context:"normal"},{keys:"s",type:"keyToKey",toKeys:"c",context:"visual"},{keys:"S",type:"keyToKey",toKeys:"cc",context:"normal"},{keys:"S",type:"keyToKey",toKeys:"VdO",context:"visual"},{keys:"<Home>",type:"keyToKey",toKeys:"0"},{keys:"<End>",type:"keyToKey",toKeys:"$"},{keys:"<PageUp>",type:"keyToKey",toKeys:"<C-b>"},{keys:"<PageDown>",type:"keyToKey",toKeys:"<C-f>"},{keys:"<CR>",type:"keyToKey",toKeys:"j^",context:"normal"},{keys:"<Ins>",type:"action",action:"toggleOverwrite",context:"insert"},{keys:"H",type:"motion",motion:"moveToTopLine",motionArgs:{linewise:!0,toJumplist:!0}},{keys:"M",type:"motion",motion:"moveToMiddleLine",motionArgs:{linewise:!0,toJumplist:!0}},{keys:"L",type:"motion",motion:"moveToBottomLine",motionArgs:{linewise:!0,toJumplist:!0}},{keys:"h",type:"motion",motion:"moveByCharacters",motionArgs:{forward:!1}},{keys:"l",type:"motion",motion:"moveByCharacters",motionArgs:{forward:!0}},{keys:"j",type:"motion",motion:"moveByLines",motionArgs:{forward:!0,linewise:!0}},{keys:"k",type:"motion",motion:"moveByLines",motionArgs:{forward:!1,linewise:!0}},{keys:"gj",type:"motion",motion:"moveByDisplayLines",motionArgs:{forward:!0}},{keys:"gk",type:"motion",motion:"moveByDisplayLines",motionArgs:{forward:!1}},{keys:"w",type:"motion",motion:"moveByWords",motionArgs:{forward:!0,wordEnd:!1}},{keys:"W",type:"motion",motion:"moveByWords",motionArgs:{forward:!0,wordEnd:!1,bigWord:!0}},{keys:"e",type:"motion",motion:"moveByWords",motionArgs:{forward:!0,wordEnd:!0,inclusive:!0}},{keys:"E",type:"motion",motion:"moveByWords",motionArgs:{forward:!0,wordEnd:!0,bigWord:!0,inclusive:!0}},{keys:"b",type:"motion",motion:"moveByWords",motionArgs:{forward:!1,wordEnd:!1}},{keys:"B",type:"motion",motion:"moveByWords",motionArgs:{forward:!1,wordEnd:!1,bigWord:!0}},{keys:"ge",type:"motion",motion:"moveByWords",motionArgs:{forward:!1,wordEnd:!0,inclusive:!0}},{keys:"gE",type:"motion",motion:"moveByWords",motionArgs:{forward:!1,wordEnd:!0,bigWord:!0,inclusive:!0}},{keys:"{",type:"motion",motion:"moveByParagraph",motionArgs:{forward:!1,toJumplist:!0}},{keys:"}",type:"motion",motion:"moveByParagraph",motionArgs:{forward:!0,toJumplist:!0}},{keys:"(",type:"motion",motion:"moveBySentence",motionArgs:{forward:!1}},{keys:")",type:"motion",motion:"moveBySentence",motionArgs:{forward:!0}},{keys:"<C-f>",type:"motion",motion:"moveByPage",motionArgs:{forward:!0}},{keys:"<C-b>",type:"motion",motion:"moveByPage",motionArgs:{forward:!1}},{keys:"<C-d>",type:"motion",motion:"moveByScroll",motionArgs:{forward:!0,explicitRepeat:!0}},{keys:"<C-u>",type:"motion",motion:"moveByScroll",motionArgs:{forward:!1,explicitRepeat:!0}},{keys:"gg",type:"motion",motion:"moveToLineOrEdgeOfDocument",motionArgs:{forward:!1,explicitRepeat:!0,linewise:!0,toJumplist:!0}},{keys:"G",type:"motion",motion:"moveToLineOrEdgeOfDocument",motionArgs:{forward:!0,explicitRepeat:!0,linewise:!0,toJumplist:!0}},{keys:"0",type:"motion",motion:"moveToStartOfLine"},{keys:"^",type:"motion",motion:"moveToFirstNonWhiteSpaceCharacter"},{keys:"+",type:"motion",motion:"moveByLines",motionArgs:{forward:!0,toFirstChar:!0}},{keys:"-",type:"motion",motion:"moveByLines",motionArgs:{forward:!1,toFirstChar:!0}},{keys:"_",type:"motion",motion:"moveByLines",motionArgs:{forward:!0,toFirstChar:!0,repeatOffset:-1}},{keys:"$",type:"motion",motion:"moveToEol",motionArgs:{inclusive:!0}},{keys:"%",type:"motion",motion:"moveToMatchedSymbol",motionArgs:{inclusive:!0,toJumplist:!0}},{keys:"f<character>",type:"motion",motion:"moveToCharacter",motionArgs:{forward:!0,inclusive:!0}},{keys:"F<character>",type:"motion",motion:"moveToCharacter",motionArgs:{forward:!1}},{keys:"t<character>",type:"motion",motion:"moveTillCharacter",motLine truncated
|
||||
@@ -0,0 +1,350 @@
|
||||
/* BASICS */
|
||||
|
||||
.CodeMirror {
|
||||
/* Set height, width, borders, and global font properties here */
|
||||
font-family: monospace;
|
||||
height: 300px;
|
||||
color: black;
|
||||
direction: ltr;
|
||||
}
|
||||
|
||||
/* PADDING */
|
||||
|
||||
.CodeMirror-lines {
|
||||
padding: 4px 0; /* Vertical padding around content */
|
||||
}
|
||||
.CodeMirror pre.CodeMirror-line,
|
||||
.CodeMirror pre.CodeMirror-line-like {
|
||||
padding: 0 4px; /* Horizontal padding of content */
|
||||
}
|
||||
|
||||
.CodeMirror-scrollbar-filler, .CodeMirror-gutter-filler {
|
||||
background-color: white; /* The little square between H and V scrollbars */
|
||||
}
|
||||
|
||||
/* GUTTER */
|
||||
|
||||
.CodeMirror-gutters {
|
||||
border-right: 1px solid #ddd;
|
||||
background-color: #f7f7f7;
|
||||
white-space: nowrap;
|
||||
}
|
||||
.CodeMirror-linenumbers {}
|
||||
.CodeMirror-linenumber {
|
||||
padding: 0 3px 0 5px;
|
||||
min-width: 20px;
|
||||
text-align: right;
|
||||
color: #999;
|
||||
white-space: nowrap;
|
||||
}
|
||||
|
||||
.CodeMirror-guttermarker { color: black; }
|
||||
.CodeMirror-guttermarker-subtle { color: #999; }
|
||||
|
||||
/* CURSOR */
|
||||
|
||||
.CodeMirror-cursor {
|
||||
border-left: 1px solid black;
|
||||
border-right: none;
|
||||
width: 0;
|
||||
}
|
||||
/* Shown when moving in bi-directional text */
|
||||
.CodeMirror div.CodeMirror-secondarycursor {
|
||||
border-left: 1px solid silver;
|
||||
}
|
||||
.cm-fat-cursor .CodeMirror-cursor {
|
||||
width: auto;
|
||||
border: 0 !important;
|
||||
background: #7e7;
|
||||
}
|
||||
.cm-fat-cursor div.CodeMirror-cursors {
|
||||
z-index: 1;
|
||||
}
|
||||
.cm-fat-cursor-mark {
|
||||
background-color: rgba(20, 255, 20, 0.5);
|
||||
-webkit-animation: blink 1.06s steps(1) infinite;
|
||||
-moz-animation: blink 1.06s steps(1) infinite;
|
||||
animation: blink 1.06s steps(1) infinite;
|
||||
}
|
||||
.cm-animate-fat-cursor {
|
||||
width: auto;
|
||||
border: 0;
|
||||
-webkit-animation: blink 1.06s steps(1) infinite;
|
||||
-moz-animation: blink 1.06s steps(1) infinite;
|
||||
animation: blink 1.06s steps(1) infinite;
|
||||
background-color: #7e7;
|
||||
}
|
||||
@-moz-keyframes blink {
|
||||
0% {}
|
||||
50% { background-color: transparent; }
|
||||
100% {}
|
||||
}
|
||||
@-webkit-keyframes blink {
|
||||
0% {}
|
||||
50% { background-color: transparent; }
|
||||
100% {}
|
||||
}
|
||||
@keyframes blink {
|
||||
0% {}
|
||||
50% { background-color: transparent; }
|
||||
100% {}
|
||||
}
|
||||
|
||||
/* Can style cursor different in overwrite (non-insert) mode */
|
||||
.CodeMirror-overwrite .CodeMirror-cursor {}
|
||||
|
||||
.cm-tab { display: inline-block; text-decoration: inherit; }
|
||||
|
||||
.CodeMirror-rulers {
|
||||
position: absolute;
|
||||
left: 0; right: 0; top: -50px; bottom: 0;
|
||||
overflow: hidden;
|
||||
}
|
||||
.CodeMirror-ruler {
|
||||
border-left: 1px solid #ccc;
|
||||
top: 0; bottom: 0;
|
||||
position: absolute;
|
||||
}
|
||||
|
||||
/* DEFAULT THEME */
|
||||
|
||||
.cm-s-default .cm-header {color: blue;}
|
||||
.cm-s-default .cm-quote {color: #090;}
|
||||
.cm-negative {color: #d44;}
|
||||
.cm-positive {color: #292;}
|
||||
.cm-header, .cm-strong {font-weight: bold;}
|
||||
.cm-em {font-style: italic;}
|
||||
.cm-link {text-decoration: underline;}
|
||||
.cm-strikethrough {text-decoration: line-through;}
|
||||
|
||||
.cm-s-default .cm-keyword {color: #708;}
|
||||
.cm-s-default .cm-atom {color: #219;}
|
||||
.cm-s-default .cm-number {color: #164;}
|
||||
.cm-s-default .cm-def {color: #00f;}
|
||||
.cm-s-default .cm-variable,
|
||||
.cm-s-default .cm-punctuation,
|
||||
.cm-s-default .cm-property,
|
||||
.cm-s-default .cm-operator {}
|
||||
.cm-s-default .cm-variable-2 {color: #05a;}
|
||||
.cm-s-default .cm-variable-3, .cm-s-default .cm-type {color: #085;}
|
||||
.cm-s-default .cm-comment {color: #a50;}
|
||||
.cm-s-default .cm-string {color: #a11;}
|
||||
.cm-s-default .cm-string-2 {color: #f50;}
|
||||
.cm-s-default .cm-meta {color: #555;}
|
||||
.cm-s-default .cm-qualifier {color: #555;}
|
||||
.cm-s-default .cm-builtin {color: #30a;}
|
||||
.cm-s-default .cm-bracket {color: #997;}
|
||||
.cm-s-default .cm-tag {color: #170;}
|
||||
.cm-s-default .cm-attribute {color: #00c;}
|
||||
.cm-s-default .cm-hr {color: #999;}
|
||||
.cm-s-default .cm-link {color: #00c;}
|
||||
|
||||
.cm-s-default .cm-error {color: #f00;}
|
||||
.cm-invalidchar {color: #f00;}
|
||||
|
||||
.CodeMirror-composing { border-bottom: 2px solid; }
|
||||
|
||||
/* Default styles for common addons */
|
||||
|
||||
div.CodeMirror span.CodeMirror-matchingbracket {color: #0b0;}
|
||||
div.CodeMirror span.CodeMirror-nonmatchingbracket {color: #a22;}
|
||||
.CodeMirror-matchingtag { background: rgba(255, 150, 0, .3); }
|
||||
.CodeMirror-activeline-background {background: #e8f2ff;}
|
||||
|
||||
/* STOP */
|
||||
|
||||
/* The rest of this file contains styles related to the mechanics of
|
||||
the editor. You probably shouldn't touch them. */
|
||||
|
||||
.CodeMirror {
|
||||
position: relative;
|
||||
overflow: hidden;
|
||||
background: white;
|
||||
}
|
||||
|
||||
.CodeMirror-scroll {
|
||||
overflow: scroll !important; /* Things will break if this is overridden */
|
||||
/* 50px is the magic margin used to hide the element's real scrollbars */
|
||||
/* See overflow: hidden in .CodeMirror */
|
||||
margin-bottom: -50px; margin-right: -50px;
|
||||
padding-bottom: 50px;
|
||||
height: 100%;
|
||||
outline: none; /* Prevent dragging from highlighting the element */
|
||||
position: relative;
|
||||
}
|
||||
.CodeMirror-sizer {
|
||||
position: relative;
|
||||
border-right: 50px solid transparent;
|
||||
}
|
||||
|
||||
/* The fake, visible scrollbars. Used to force redraw during scrolling
|
||||
before actual scrolling happens, thus preventing shaking and
|
||||
flickering artifacts. */
|
||||
.CodeMirror-vscrollbar, .CodeMirror-hscrollbar, .CodeMirror-scrollbar-filler, .CodeMirror-gutter-filler {
|
||||
position: absolute;
|
||||
z-index: 6;
|
||||
display: none;
|
||||
outline: none;
|
||||
}
|
||||
.CodeMirror-vscrollbar {
|
||||
right: 0; top: 0;
|
||||
overflow-x: hidden;
|
||||
overflow-y: scroll;
|
||||
}
|
||||
.CodeMirror-hscrollbar {
|
||||
bottom: 0; left: 0;
|
||||
overflow-y: hidden;
|
||||
overflow-x: scroll;
|
||||
}
|
||||
.CodeMirror-scrollbar-filler {
|
||||
right: 0; bottom: 0;
|
||||
}
|
||||
.CodeMirror-gutter-filler {
|
||||
left: 0; bottom: 0;
|
||||
}
|
||||
|
||||
.CodeMirror-gutters {
|
||||
position: absolute; left: 0; top: 0;
|
||||
min-height: 100%;
|
||||
z-index: 3;
|
||||
}
|
||||
.CodeMirror-gutter {
|
||||
white-space: normal;
|
||||
height: 100%;
|
||||
display: inline-block;
|
||||
vertical-align: top;
|
||||
margin-bottom: -50px;
|
||||
}
|
||||
.CodeMirror-gutter-wrapper {
|
||||
position: absolute;
|
||||
z-index: 4;
|
||||
background: none !important;
|
||||
border: none !important;
|
||||
}
|
||||
.CodeMirror-gutter-background {
|
||||
position: absolute;
|
||||
top: 0; bottom: 0;
|
||||
z-index: 4;
|
||||
}
|
||||
.CodeMirror-gutter-elt {
|
||||
position: absolute;
|
||||
cursor: default;
|
||||
z-index: 4;
|
||||
}
|
||||
.CodeMirror-gutter-wrapper ::selection { background-color: transparent }
|
||||
.CodeMirror-gutter-wrapper ::-moz-selection { background-color: transparent }
|
||||
|
||||
.CodeMirror-lines {
|
||||
cursor: text;
|
||||
min-height: 1px; /* prevents collapsing before first draw */
|
||||
}
|
||||
.CodeMirror pre.CodeMirror-line,
|
||||
.CodeMirror pre.CodeMirror-line-like {
|
||||
/* Reset some styles that the rest of the page might have set */
|
||||
-moz-border-radius: 0; -webkit-border-radius: 0; border-radius: 0;
|
||||
border-width: 0;
|
||||
background: transparent;
|
||||
font-family: inherit;
|
||||
font-size: inherit;
|
||||
margin: 0;
|
||||
white-space: pre;
|
||||
word-wrap: normal;
|
||||
line-height: inherit;
|
||||
color: inherit;
|
||||
z-index: 2;
|
||||
position: relative;
|
||||
overflow: visible;
|
||||
-webkit-tap-highlight-color: transparent;
|
||||
-webkit-font-variant-ligatures: contextual;
|
||||
font-variant-ligatures: contextual;
|
||||
}
|
||||
.CodeMirror-wrap pre.CodeMirror-line,
|
||||
.CodeMirror-wrap pre.CodeMirror-line-like {
|
||||
word-wrap: break-word;
|
||||
white-space: pre-wrap;
|
||||
word-break: normal;
|
||||
}
|
||||
|
||||
.CodeMirror-linebackground {
|
||||
position: absolute;
|
||||
left: 0; right: 0; top: 0; bottom: 0;
|
||||
z-index: 0;
|
||||
}
|
||||
|
||||
.CodeMirror-linewidget {
|
||||
position: relative;
|
||||
z-index: 2;
|
||||
padding: 0.1px; /* Force widget margins to stay inside of the container */
|
||||
}
|
||||
|
||||
.CodeMirror-widget {}
|
||||
|
||||
.CodeMirror-rtl pre { direction: rtl; }
|
||||
|
||||
.CodeMirror-code {
|
||||
outline: none;
|
||||
}
|
||||
|
||||
/* Force content-box sizing for the elements where we expect it */
|
||||
.CodeMirror-scroll,
|
||||
.CodeMirror-sizer,
|
||||
.CodeMirror-gutter,
|
||||
.CodeMirror-gutters,
|
||||
.CodeMirror-linenumber {
|
||||
-moz-box-sizing: content-box;
|
||||
box-sizing: content-box;
|
||||
}
|
||||
|
||||
.CodeMirror-measure {
|
||||
position: absolute;
|
||||
width: 100%;
|
||||
height: 0;
|
||||
overflow: hidden;
|
||||
visibility: hidden;
|
||||
}
|
||||
|
||||
.CodeMirror-cursor {
|
||||
position: absolute;
|
||||
pointer-events: none;
|
||||
}
|
||||
.CodeMirror-measure pre { position: static; }
|
||||
|
||||
div.CodeMirror-cursors {
|
||||
visibility: hidden;
|
||||
position: relative;
|
||||
z-index: 3;
|
||||
}
|
||||
div.CodeMirror-dragcursors {
|
||||
visibility: visible;
|
||||
}
|
||||
|
||||
.CodeMirror-focused div.CodeMirror-cursors {
|
||||
visibility: visible;
|
||||
}
|
||||
|
||||
.CodeMirror-selected { background: #d9d9d9; }
|
||||
.CodeMirror-focused .CodeMirror-selected { background: #d7d4f0; }
|
||||
.CodeMirror-crosshair { cursor: crosshair; }
|
||||
.CodeMirror-line::selection, .CodeMirror-line > span::selection, .CodeMirror-line > span > span::selection { background: #d7d4f0; }
|
||||
.CodeMirror-line::-moz-selection, .CodeMirror-line > span::-moz-selection, .CodeMirror-line > span > span::-moz-selection { background: #d7d4f0; }
|
||||
|
||||
.cm-searching {
|
||||
background-color: #ffa;
|
||||
background-color: rgba(255, 255, 0, .4);
|
||||
}
|
||||
|
||||
/* Used to force a border model for a node */
|
||||
.cm-force-border { padding-right: .1px; }
|
||||
|
||||
@media print {
|
||||
/* Hide the cursor when printing */
|
||||
.CodeMirror div.CodeMirror-cursors {
|
||||
visibility: hidden;
|
||||
}
|
||||
}
|
||||
|
||||
/* See issue #2901 */
|
||||
.cm-tab-wrap-hack:after { content: ''; }
|
||||
|
||||
/* Help users use markselection to safely style text background */
|
||||
span.CodeMirror-selectedtext { background: none; }
|
||||
@@ -0,0 +1 @@
|
||||
!function(e,t){"object"==typeof exports&&"undefined"!=typeof module?module.exports=t():"function"==typeof define&&define.amd?define(t):(e=e||self).CodeMirror=t()}(this,(function(){"use strict";var e=navigator.userAgent,t=navigator.platform,r=/gecko\/\d/i.test(e),n=/MSIE \d/.test(e),i=/Trident\/(?:[7-9]|\d{2,})\..*rv:(\d+)/.exec(e),o=/Edge\/(\d+)/.exec(e),l=n||i||o,s=l&&(n?document.documentMode||6:+(o||i)[1]),a=!o&&/WebKit\//.test(e),u=a&&/Qt\/\d+\.\d+/.test(e),c=!o&&/Chrome\//.test(e),h=/Opera\//.test(e),f=/Apple Computer/.test(navigator.vendor),d=/Mac OS X 1\d\D([8-9]|\d\d)\D/.test(e),p=/PhantomJS/.test(e),g=f&&(/Mobile\/\w+/.test(e)||navigator.maxTouchPoints>2),v=/Android/.test(e),m=g||v||/webOS|BlackBerry|Opera Mini|Opera Mobi|IEMobile/i.test(e),y=g||/Mac/.test(t),b=/\bCrOS\b/.test(e),w=/win/i.test(t),x=h&&e.match(/Version\/(\d*\.\d*)/);x&&(x=Number(x[1])),x&&x>=15&&(h=!1,a=!0);var C=y&&(u||h&&(null==x||x<12.11)),S=r||l&&s>=9;function L(e){return new RegExp("(^|\\s)"+e+"(?:$|\\s)\\s*")}var k,T=function(e,t){var r=e.className,n=L(t).exec(r);if(n){var i=r.slice(n.index+n[0].length);e.className=r.slice(0,n.index)+(i?n[1]+i:"")}};function M(e){for(var t=e.childNodes.length;t>0;--t)e.removeChild(e.firstChild);return e}function N(e,t){return M(e).appendChild(t)}function O(e,t,r,n){var i=document.createElement(e);if(r&&(i.className=r),n&&(i.style.cssText=n),"string"==typeof t)i.appendChild(document.createTextNode(t));else if(t)for(var o=0;o<t.length;++o)i.appendChild(t[o]);return i}function A(e,t,r,n){var i=O(e,t,r,n);return i.setAttribute("role","presentation"),i}function D(e,t){if(3==t.nodeType&&(t=t.parentNode),e.contains)return e.contains(t);do{if(11==t.nodeType&&(t=t.host),t==e)return!0}while(t=t.parentNode)}function W(){var e;try{e=document.activeElement}catch(t){e=document.body||null}for(;e&&e.shadowRoot&&e.shadowRoot.activeElement;)e=e.shadowRoot.activeElement;return e}function H(e,t){var r=e.className;L(t).test(r)||(e.className+=(r?" ":"")+t)}function F(e,t){for(var r=e.split(" "),n=0;n<r.length;n++)r[n]&&!L(r[n]).test(t)&&(t+=" "+r[n]);return t}k=document.createRange?function(e,t,r,n){var i=document.createRange();return i.setEnd(n||e,r),i.setStart(e,t),i}:function(e,t,r){var n=document.body.createTextRange();try{n.moveToElementText(e.parentNode)}catch(e){return n}return n.collapse(!0),n.moveEnd("character",r),n.moveStart("character",t),n};var P=function(e){e.select()};function E(e){var t=Array.prototype.slice.call(arguments,1);return function(){return e.apply(null,t)}}function I(e,t,r){for(var n in t||(t={}),e)!e.hasOwnProperty(n)||!1===r&&t.hasOwnProperty(n)||(t[n]=e[n]);return t}function z(e,t,r,n,i){null==t&&-1==(t=e.search(/[^\s\u00a0]/))&&(t=e.length);for(var o=n||0,l=i||0;;){var s=e.indexOf("\t",o);if(s<0||s>=t)return l+(t-o);l+=s-o,l+=r-l%r,o=s+1}}g?P=function(e){e.selectionStart=0,e.selectionEnd=e.value.length}:l&&(P=function(e){try{e.select()}catch(e){}});var R=function(){this.id=null,this.f=null,this.time=0,this.handler=E(this.onTimeout,this)};function B(e,t){for(var r=0;r<e.length;++r)if(e[r]==t)return r;return-1}R.prototype.onTimeout=function(e){e.id=0,e.time<=+new Date?e.f():setTimeout(e.handler,e.time-+new Date)},R.prototype.set=function(e,t){this.f=t;var r=+new Date+e;(!this.id||r<this.time)&&(clearTimeout(this.id),this.id=setTimeout(this.handler,e),this.time=r)};var G={toString:function(){return"CodeMirror.Pass"}},U={scroll:!1},V={origin:"*mouse"},K={origin:"+move"};function j(e,t,r){for(var n=0,i=0;;){var o=e.indexOf("\t",n);-1==o&&(o=e.length);var l=o-n;if(o==e.length||i+l>=t)return n+Math.min(l,t-i);if(i+=o-n,n=o+1,(i+=r-i%r)>=t)return n}}var X=[""];function Y(e){for(;X.length<=e;)X.push(_(X)+" ");return X[e]}function _(e){return e[e.length-1]}function $(e,t){for(var r=[],n=0;n<e.length;n++)r[n]=t(e[n],n);return r}function q(){}function Z(e,t){var r;return Object.create?r=Object.create(e):(q.prototype=e,r=new q),t&&I(t,r),r}var Q=/[\u00df\u0587\u0590-\u05f4\u0600-\u06ff\u3040-\u309f\u30a0-\u30ff\u3400-\u4db5\u4e00-\u9fcc\uac00-\ud7af]/;function J(e){return/\w/.test(e)||e>""&&(e.toUpperCase()!=e.toLowerCase()||Q.test(e))}function ee(e,t){return t?!!(t.source.indexOf("\\w")>-1&&J(e))||t.test(e):J(e)}function te(e){for(var t in e)if(e.hasOwnProperty(t)&&e[t])return!1;return!0}var re=/[\u0300-\u036f\u0483-\u0489\u0591-\u05bd\u05bf\u05c1\u05c2\u05c4\u05c5\u05c7\u0610-\u061a\u064b-\u065e\u0670\u06d6-\u06dc\u06de-\u06e4\u06e7\u06e8\u06ea-\u06ed\u0711\u0730-\u074a\u07a6-\u07b0\u07eb-\u07f3\u0816-\u0819\u081b-\u0823\u0825-\u0827\u0829-\u082d\u0900-\u0902\u093c\u0941-\u0948\u094d\u0951-\u0955\u0962\u0963\u0981\u09bc\u09be\u09c1-\u09c4\u09cd\u09d7\u09e2\u09e3\u0a01\u0a02\u0a3c\u0a41\u0a42\u0a47\u0a48\u0a4b-\u0a4d\u0a51\u0a70\u0a71\u0a75\u0a81\u0a82\u0abc\u0ac1-\u0ac5\u0ac7\u0ac8\u0acd\u0ae2\u0ae3\u0b01\u0b3c\u0b3e\u0b3f\u0b41-\u0b44\u0b4d\u0b56\u0b57\u0b62\u0b63\u0b82\u0bbe\u0bc0\u0bcd\u0bd7\u0c3e-\u0c40\u0c46-\u0c48\u0c4a-\u0c4d\u0c55\u0c56\u0c62\u0c63\u0cbc\u0cbf\u0cc2\u0cc6\u0ccc\u0ccd\uLine truncated
|
||||
@@ -0,0 +1 @@
|
||||
!function(e){"object"==typeof exports&&"object"==typeof module?e(require("../../lib/codemirror")):"function"==typeof define&&define.amd?define(["../../lib/codemirror"],e):e(CodeMirror)}((function(e){"use strict";e.defineMode("apl",(function(){var e={".":"innerProduct","\\":"scan","/":"reduce","⌿":"reduce1Axis","⍀":"scan1Axis","¨":"each","⍣":"power"},n={"+":["conjugate","add"],"−":["negate","subtract"],"×":["signOf","multiply"],"÷":["reciprocal","divide"],"⌈":["ceiling","greaterOf"],"⌊":["floor","lesserOf"],"∣":["absolute","residue"],"⍳":["indexGenerate","indexOf"],"?":["roll","deal"],"⋆":["exponentiate","toThePowerOf"],"⍟":["naturalLog","logToTheBase"],"○":["piTimes","circularFuncs"],"!":["factorial","binomial"],"⌹":["matrixInverse","matrixDivide"],"<":[null,"lessThan"],"≤":[null,"lessThanOrEqual"],"=":[null,"equals"],">":[null,"greaterThan"],"≥":[null,"greaterThanOrEqual"],"≠":[null,"notEqual"],"≡":["depth","match"],"≢":[null,"notMatch"],"∈":["enlist","membership"],"⍷":[null,"find"],"∪":["unique","union"],"∩":[null,"intersection"],"∼":["not","without"],"∨":[null,"or"],"∧":[null,"and"],"⍱":[null,"nor"],"⍲":[null,"nand"],"⍴":["shapeOf","reshape"],",":["ravel","catenate"],"⍪":[null,"firstAxisCatenate"],"⌽":["reverse","rotate"],"⊖":["axis1Reverse","axis1Rotate"],"⍉":["transpose",null],"↑":["first","take"],"↓":[null,"drop"],"⊂":["enclose","partitionWithAxis"],"⊃":["diclose","pick"],"⌷":[null,"index"],"⍋":["gradeUp",null],"⍒":["gradeDown",null],"⊤":["encode",null],"⊥":["decode",null],"⍕":["format","formatByExample"],"⍎":["execute",null],"⊣":["stop","left"],"⊢":["pass","right"]},t=/[\.\/⌿⍀¨⍣]/,l=/⍬/,r=/[\+−×÷⌈⌊∣⍳\?⋆⍟○!⌹<≤=>≥≠≡≢∈⍷∪∩∼∨∧⍱⍲⍴,⍪⌽⊖⍉↑↓⊂⊃⌷⍋⍒⊤⊥⍕⍎⊣⊢]/,a=/←/,i=/[⍝#].*$/;return{startState:function(){return{prev:!1,func:!1,op:!1,string:!1,escape:!1}},token:function(o,u){var s,c,p,d;return o.eatSpace()?null:'"'===(s=o.next())||"'"===s?(o.eatWhile((p=s,d=!1,function(e){return d=e,e!==p||"\\"===d})),o.next(),u.prev=!0,"string"):/[\[{\(]/.test(s)?(u.prev=!1,null):/[\]}\)]/.test(s)?(u.prev=!0,null):l.test(s)?(u.prev=!1,"niladic"):/[¯\d]/.test(s)?(u.func?(u.func=!1,u.prev=!1):u.prev=!0,o.eatWhile(/[\w\.]/),"number"):t.test(s)?"operator apl-"+e[s]:a.test(s)?"apl-arrow":r.test(s)?(c="apl-",null!=n[s]&&(u.prev?c+=n[s][1]:c+=n[s][0]),u.func=!0,u.prev=!1,"function "+c):i.test(s)?(o.skipToEnd(),"comment"):"∘"===s&&"."===o.peek()?(o.next(),"function jot-dot"):(o.eatWhile(/[\w\$_]/),u.prev=!0,"keyword")}}})),e.defineMIME("text/apl","apl")}));
|
||||
+1
@@ -0,0 +1 @@
|
||||
!function(e){"object"==typeof exports&&"object"==typeof module?e(require("../../lib/codemirror")):"function"==typeof define&&define.amd?define(["../../lib/codemirror"],e):e(CodeMirror)}((function(e){"use strict";function t(e){var t=e.match(/^\s*\S/);return e.skipToEnd(),t?"error":null}e.defineMode("asciiarmor",(function(){return{token:function(e,r){var a;if("top"==r.state)return e.sol()&&(a=e.match(/^-----BEGIN (.*)?-----\s*$/))?(r.state="headers",r.type=a[1],"tag"):t(e);if("headers"==r.state){if(e.sol()&&e.match(/^\w+:/))return r.state="header","atom";var i=t(e);return i&&(r.state="body"),i}return"header"==r.state?(e.skipToEnd(),r.state="headers","string"):"body"==r.state?e.sol()&&(a=e.match(/^-----END (.*)?-----\s*$/))?a[1]!=r.type?"error":(r.state="end","tag"):e.eatWhile(/[A-Za-z0-9+\/=]/)?null:(e.next(),"error"):"end"==r.state?t(e):void 0},blankLine:function(e){"headers"==e.state&&(e.state="body")},startState:function(){return{state:"top",type:null}}}})),e.defineMIME("application/pgp","asciiarmor"),e.defineMIME("application/pgp-encrypted","asciiarmor"),e.defineMIME("application/pgp-keys","asciiarmor"),e.defineMIME("application/pgp-signature","asciiarmor")}));
|
||||
@@ -0,0 +1 @@
|
||||
!function(e){"object"==typeof exports&&"object"==typeof module?e(require("../../lib/codemirror")):"function"==typeof define&&define.amd?define(["../../lib/codemirror"],e):e(CodeMirror)}((function(e){"use strict";function t(e){for(var t={},n=e.split(" "),r=0;r<n.length;++r)t[n[r]]=!0;return t}e.defineMode("asn.1",(function(e,t){var n,r=e.indentUnit,i=t.keywords||{},o=t.cmipVerbs||{},E=t.compareTypes||{},a=t.status||{},s=t.tags||{},I=t.storage||{},T=t.modifier||{},u=t.accessTypes||{},S=t.multiLineStrings,l=!1!==t.indentStatements,c=/[\|\^]/;function A(e,t){var r,l=e.next();if('"'==l||"'"==l)return t.tokenize=(r=l,function(e,t){for(var n,i=!1,o=!1;null!=(n=e.next());){if(n==r&&!i){var E=e.peek();E&&("b"!=(E=E.toLowerCase())&&"h"!=E&&"o"!=E||e.next()),o=!0;break}i=!i&&"\\"==n}return(o||!i&&!S)&&(t.tokenize=null),"string"}),t.tokenize(e,t);if(/[\[\]\(\){}:=,;]/.test(l))return n=l,"punctuation";if("-"==l&&e.eat("-"))return e.skipToEnd(),"comment";if(/\d/.test(l))return e.eatWhile(/[\w\.]/),"number";if(c.test(l))return e.eatWhile(c),"operator";e.eatWhile(/[\w\-]/);var A=e.current();return i.propertyIsEnumerable(A)?"keyword":o.propertyIsEnumerable(A)?"variable cmipVerbs":E.propertyIsEnumerable(A)?"atom compareTypes":a.propertyIsEnumerable(A)?"comment status":s.propertyIsEnumerable(A)?"variable-3 tags":I.propertyIsEnumerable(A)?"builtin storage":T.propertyIsEnumerable(A)?"string-2 modifier":u.propertyIsEnumerable(A)?"atom accessTypes":"variable"}function p(e,t,n,r,i){this.indented=e,this.column=t,this.type=n,this.align=r,this.prev=i}function N(e,t,n){var r=e.indented;return e.context&&"statement"==e.context.type&&(r=e.context.indented),e.context=new p(r,t,n,null,e.context)}function m(e){var t=e.context.type;return")"!=t&&"]"!=t&&"}"!=t||(e.indented=e.context.indented),e.context=e.context.prev}return{startState:function(e){return{tokenize:null,context:new p((e||0)-r,0,"top",!1),indented:0,startOfLine:!0}},token:function(e,t){var r=t.context;if(e.sol()&&(null==r.align&&(r.align=!1),t.indented=e.indentation(),t.startOfLine=!0),e.eatSpace())return null;n=null;var i=(t.tokenize||A)(e,t);if("comment"==i)return i;if(null==r.align&&(r.align=!0),";"!=n&&":"!=n&&","!=n||"statement"!=r.type)if("{"==n)N(t,e.column(),"}");else if("["==n)N(t,e.column(),"]");else if("("==n)N(t,e.column(),")");else if("}"==n){for(;"statement"==r.type;)r=m(t);for("}"==r.type&&(r=m(t));"statement"==r.type;)r=m(t)}else n==r.type?m(t):l&&(("}"==r.type||"top"==r.type)&&";"!=n||"statement"==r.type&&"newstatement"==n)&&N(t,e.column(),"statement");else m(t);return t.startOfLine=!1,i},electricChars:"{}",lineComment:"--",fold:"brace"}})),e.defineMIME("text/x-ttcn-asn",{name:"asn.1",keywords:t("DEFINITIONS OBJECTS IF DERIVED INFORMATION ACTION REPLY ANY NAMED CHARACTERIZED BEHAVIOUR REGISTERED WITH AS IDENTIFIED CONSTRAINED BY PRESENT BEGIN IMPORTS FROM UNITS SYNTAX MIN-ACCESS MAX-ACCESS MINACCESS MAXACCESS REVISION STATUS DESCRIPTION SEQUENCE SET COMPONENTS OF CHOICE DistinguishedName ENUMERATED SIZE MODULE END INDEX AUGMENTS EXTENSIBILITY IMPLIED EXPORTS"),cmipVerbs:t("ACTIONS ADD GET NOTIFICATIONS REPLACE REMOVE"),compareTypes:t("OPTIONAL DEFAULT MANAGED MODULE-TYPE MODULE_IDENTITY MODULE-COMPLIANCE OBJECT-TYPE OBJECT-IDENTITY OBJECT-COMPLIANCE MODE CONFIRMED CONDITIONAL SUBORDINATE SUPERIOR CLASS TRUE FALSE NULL TEXTUAL-CONVENTION"),status:t("current deprecated mandatory obsolete"),tags:t("APPLICATION AUTOMATIC EXPLICIT IMPLICIT PRIVATE TAGS UNIVERSAL"),storage:t("BOOLEAN INTEGER OBJECT IDENTIFIER BIT OCTET STRING UTCTime InterfaceIndex IANAifType CMIP-Attribute REAL PACKAGE PACKAGES IpAddress PhysAddress NetworkAddress BITS BMPString TimeStamp TimeTicks TruthValue RowStatus DisplayString GeneralString GraphicString IA5String NumericString PrintableString SnmpAdminString TeletexString UTF8String VideotexString VisibleString StringStore ISO646String T61String UniversalString Unsigned32 Integer32 Gauge Gauge32 Counter Counter32 Counter64"),modifier:t("ATTRIBUTE ATTRIBUTES MANDATORY-GROUP MANDATORY-GROUPS GROUP GROUPS ELEMENTS EQUALITY ORDERING SUBSTRINGS DEFINED"),accessTypes:t("not-accessible accessible-for-notify read-only read-create read-write"),multiLineStrings:!0})}));
|
||||
@@ -0,0 +1 @@
|
||||
!function(e){"object"==typeof exports&&"object"==typeof module?e(require("../../lib/codemirror")):"function"==typeof define&&define.amd?define(["../../lib/codemirror"],e):e(CodeMirror)}((function(e){"use strict";e.defineMode("asterisk",(function(){var e=["exten","same","include","ignorepat","switch"],t=["#include","#exec"],n=["addqueuemember","adsiprog","aelsub","agentlogin","agentmonitoroutgoing","agi","alarmreceiver","amd","answer","authenticate","background","backgrounddetect","bridge","busy","callcompletioncancel","callcompletionrequest","celgenuserevent","changemonitor","chanisavail","channelredirect","chanspy","clearhash","confbridge","congestion","continuewhile","controlplayback","dahdiacceptr2call","dahdibarge","dahdiras","dahdiscan","dahdisendcallreroutingfacility","dahdisendkeypadfacility","datetime","dbdel","dbdeltree","deadagi","dial","dictate","directory","disa","dumpchan","eagi","echo","endwhile","exec","execif","execiftime","exitwhile","extenspy","externalivr","festival","flash","followme","forkcdr","getcpeid","gosub","gosubif","goto","gotoif","gotoiftime","hangup","iax2provision","ices","importvar","incomplete","ivrdemo","jabberjoin","jabberleave","jabbersend","jabbersendgroup","jabberstatus","jack","log","macro","macroexclusive","macroexit","macroif","mailboxexists","meetme","meetmeadmin","meetmechanneladmin","meetmecount","milliwatt","minivmaccmess","minivmdelete","minivmgreet","minivmmwi","minivmnotify","minivmrecord","mixmonitor","monitor","morsecode","mp3player","mset","musiconhold","nbscat","nocdr","noop","odbc","odbc","odbcfinish","originate","ospauth","ospfinish","osplookup","ospnext","page","park","parkandannounce","parkedcall","pausemonitor","pausequeuemember","pickup","pickupchan","playback","playtones","privacymanager","proceeding","progress","queue","queuelog","raiseexception","read","readexten","readfile","receivefax","receivefax","receivefax","record","removequeuemember","resetcdr","retrydial","return","ringing","sayalpha","saycountedadj","saycountednoun","saycountpl","saydigits","saynumber","sayphonetic","sayunixtime","senddtmf","sendfax","sendfax","sendfax","sendimage","sendtext","sendurl","set","setamaflags","setcallerpres","setmusiconhold","sipaddheader","sipdtmfmode","sipremoveheader","skel","slastation","slatrunk","sms","softhangup","speechactivategrammar","speechbackground","speechcreate","speechdeactivategrammar","speechdestroy","speechloadgrammar","speechprocessingsound","speechstart","speechunloadgrammar","stackpop","startmusiconhold","stopmixmonitor","stopmonitor","stopmusiconhold","stopplaytones","system","testclient","testserver","transfer","tryexec","trysystem","unpausemonitor","unpausequeuemember","userevent","verbose","vmauthenticate","vmsayname","voicemail","voicemailmain","wait","waitexten","waitfornoise","waitforring","waitforsilence","waitmusiconhold","waituntil","while","zapateller"];return{startState:function(){return{blockComment:!1,extenStart:!1,extenSame:!1,extenInclude:!1,extenExten:!1,extenPriority:!1,extenApplication:!1}},token:function(i,a){var r="";return i.eatSpace()?null:a.extenStart?(i.eatWhile(/[^\s]/),r=i.current(),/^=>?$/.test(r)?(a.extenExten=!0,a.extenStart=!1,"strong"):(a.extenStart=!1,i.skipToEnd(),"error")):a.extenExten?(a.extenExten=!1,a.extenPriority=!0,i.eatWhile(/[^,]/),a.extenInclude&&(i.skipToEnd(),a.extenPriority=!1,a.extenInclude=!1),a.extenSame&&(a.extenPriority=!1,a.extenSame=!1,a.extenApplication=!0),"tag"):a.extenPriority?(a.extenPriority=!1,a.extenApplication=!0,i.next(),a.extenSame?null:(i.eatWhile(/[^,]/),"number")):a.extenApplication?(i.eatWhile(/,/),","===(r=i.current())?null:(i.eatWhile(/\w/),r=i.current().toLowerCase(),a.extenApplication=!1,-1!==n.indexOf(r)?"def strong":null)):function(n,i){var a="",r=n.next();if(i.blockComment)return"-"==r&&n.match("-;",!0)?i.blockComment=!1:n.skipTo("--;")?(n.next(),n.next(),n.next(),i.blockComment=!1):n.skipToEnd(),"comment";if(";"==r)return n.match("--",!0)&&!n.match("-",!1)?(i.blockComment=!0,"comment"):(n.skipToEnd(),"comment");if("["==r)return n.skipTo("]"),n.eat("]"),"header";if('"'==r)return n.skipTo('"'),"string";if("'"==r)return n.skipTo("'"),"string-2";if("#"==r&&(n.eatWhile(/\w/),a=n.current(),-1!==t.indexOf(a)))return n.skipToEnd(),"strong";if("$"==r&&"{"==n.peek())return n.skipTo("}"),n.eat("}"),"variable-3";if(n.eatWhile(/\w/),a=n.current(),-1!==e.indexOf(a)){switch(i.extenStart=!0,a){case"same":i.extenSame=!0;break;case"include":case"switch":case"ignorepat":i.extenInclude=!0}return"atom"}}(i,a)},blockCommentStart:";--",blockCommentEnd:"--;",lineComment:";"}})),e.defineMIME("text/x-asterisk","asterisk")}));
|
||||
+1
@@ -0,0 +1 @@
|
||||
!function(e){"object"==typeof exports&&"object"==typeof module?e(require("../../lib/codemirror")):"function"==typeof define&&define.amd?define(["../../lib/codemirror"],e):e(CodeMirror)}((function(e){"use strict";var n="><+-.,[]".split("");e.defineMode("brainfuck",(function(){return{startState:function(){return{commentLine:!1,left:0,right:0,commentLoop:!1}},token:function(e,t){if(e.eatSpace())return null;e.sol()&&(t.commentLine=!1);var o=e.next().toString();return-1===n.indexOf(o)?(t.commentLine=!0,e.eol()&&(t.commentLine=!1),"comment"):!0===t.commentLine?(e.eol()&&(t.commentLine=!1),"comment"):"]"===o||"["===o?("["===o?t.left++:t.right++,"bracket"):"+"===o||"-"===o?"keyword":"<"===o||">"===o?"atom":"."===o||","===o?"def":void(e.eol()&&(t.commentLine=!1))}}})),e.defineMIME("text/x-brainfuck","brainfuck")}));
|
||||
@@ -0,0 +1 @@
|
||||
!function(e){"object"==typeof exports&&"object"==typeof module?e(require("../../lib/codemirror")):"function"==typeof define&&define.amd?define(["../../lib/codemirror"],e):e(CodeMirror)}((function(e){"use strict";function t(e,t,n,r,o,a){this.indented=e,this.column=t,this.type=n,this.info=r,this.align=o,this.prev=a}function n(e,n,r,o){var a=e.indented;return e.context&&"statement"==e.context.type&&"statement"!=r&&(a=e.context.indented),e.context=new t(a,n,r,o,null,e.context)}function r(e){var t=e.context.type;return")"!=t&&"]"!=t&&"}"!=t||(e.indented=e.context.indented),e.context=e.context.prev}function o(e,t,n){return"variable"==t.prevToken||"type"==t.prevToken||(!!/\S(?:[^- ]>|[*\]])\s*$|\*$/.test(e.string.slice(0,n))||(!(!t.typeAtEndOfLine||e.column()!=e.indentation())||void 0))}function a(e){for(;;){if(!e||"top"==e.type)return!0;if("}"==e.type&&"namespace"!=e.prev.info)return!1;e=e.prev}}function i(e){for(var t={},n=e.split(" "),r=0;r<n.length;++r)t[n[r]]=!0;return t}function l(e,t){return"function"==typeof e?e(t):e.propertyIsEnumerable(t)}e.defineMode("clike",(function(i,s){var c,u,d=i.indentUnit,f=s.statementIndentUnit||d,p=s.dontAlignCalls,m=s.keywords||{},h=s.types||{},y=s.builtin||{},g=s.blockKeywords||{},k=s.defKeywords||{},b=s.atoms||{},x=s.hooks||{},v=s.multiLineStrings,w=!1!==s.indentStatements,_=!1!==s.indentSwitch,S=s.namespaceSeparator,T=s.isPunctuationChar||/[\[\]{}\(\),;\:\.]/,C=s.numberStart||/[\d\.]/,I=s.number||/^(?:0x[a-f\d]+|0b[01]+|(?:\d+\.?\d*|\.\d+)(?:e[-+]?\d+)?)(u|ll?|l|f)?/i,N=s.isOperatorChar||/[+\-*&%=<>!?|\/]/,M=s.isIdentifierChar||/[\w\$_\xa1-\uffff]/,L=s.isReservedIdentifier||!1;function D(e,t){var n,r=e.next();if(x[r]){var o=x[r](e,t);if(!1!==o)return o}if('"'==r||"'"==r)return t.tokenize=(n=r,function(e,t){for(var r,o=!1,a=!1;null!=(r=e.next());){if(r==n&&!o){a=!0;break}o=!o&&"\\"==r}return(a||!o&&!v)&&(t.tokenize=null),"string"}),t.tokenize(e,t);if(C.test(r)){if(e.backUp(1),e.match(I))return"number";e.next()}if(T.test(r))return c=r,null;if("/"==r){if(e.eat("*"))return t.tokenize=P,P(e,t);if(e.eat("/"))return e.skipToEnd(),"comment"}if(N.test(r)){for(;!e.match(/^\/[\/*]/,!1)&&e.eat(N););return"operator"}if(e.eatWhile(M),S)for(;e.match(S);)e.eatWhile(M);var a=e.current();return l(m,a)?(l(g,a)&&(c="newstatement"),l(k,a)&&(u=!0),"keyword"):l(h,a)?"type":l(y,a)||L&&L(a)?(l(g,a)&&(c="newstatement"),"builtin"):l(b,a)?"atom":"variable"}function P(e,t){for(var n,r=!1;n=e.next();){if("/"==n&&r){t.tokenize=null;break}r="*"==n}return"comment"}function E(e,t){s.typeFirstDefinitions&&e.eol()&&a(t.context)&&(t.typeAtEndOfLine=o(e,t,e.pos))}return{startState:function(e){return{tokenize:null,context:new t((e||0)-d,0,"top",null,!1),indented:0,startOfLine:!0,prevToken:null}},token:function(e,t){var i=t.context;if(e.sol()&&(null==i.align&&(i.align=!1),t.indented=e.indentation(),t.startOfLine=!0),e.eatSpace())return E(e,t),null;c=u=null;var l=(t.tokenize||D)(e,t);if("comment"==l||"meta"==l)return l;if(null==i.align&&(i.align=!0),";"==c||":"==c||","==c&&e.match(/^\s*(?:\/\/.*)?$/,!1))for(;"statement"==t.context.type;)r(t);else if("{"==c)n(t,e.column(),"}");else if("["==c)n(t,e.column(),"]");else if("("==c)n(t,e.column(),")");else if("}"==c){for(;"statement"==i.type;)i=r(t);for("}"==i.type&&(i=r(t));"statement"==i.type;)i=r(t)}else c==i.type?r(t):w&&(("}"==i.type||"top"==i.type)&&";"!=c||"statement"==i.type&&"newstatement"==c)&&n(t,e.column(),"statement",e.current());if("variable"==l&&("def"==t.prevToken||s.typeFirstDefinitions&&o(e,t,e.start)&&a(t.context)&&e.match(/^\s*\(/,!1))&&(l="def"),x.token){var d=x.token(e,t,l);void 0!==d&&(l=d)}return"def"==l&&!1===s.styleDefs&&(l="variable"),t.startOfLine=!1,t.prevToken=u?"def":l||c,E(e,t),l},indent:function(t,n){if(t.tokenize!=D&&null!=t.tokenize||t.typeAtEndOfLine)return e.Pass;var r=t.context,o=n&&n.charAt(0),a=o==r.type;if("statement"==r.type&&"}"==o&&(r=r.prev),s.dontIndentStatements)for(;"statement"==r.type&&s.dontIndentStatements.test(r.info);)r=r.prev;if(x.indent){var i=x.indent(t,r,n,d);if("number"==typeof i)return i}var l=r.prev&&"switch"==r.prev.info;if(s.allmanIndentation&&/[{(]/.test(o)){for(;"top"!=r.type&&"}"!=r.type;)r=r.prev;return r.indented}return"statement"==r.type?r.indented+("{"==o?0:f):!r.align||p&&")"==r.type?")"!=r.type||a?r.indented+(a?0:d)+(a||!l||/^(?:case|default)\b/.test(n)?0:d):r.indented+f:r.column+(a?0:1)},electricInput:_?/^\s*(?:case .*?:|default:|\{\}?|\})$/:/^\s*[{}]$/,blockCommentStart:"/*",blockCommentEnd:"*/",blockCommentContinue:" * ",lineComment:"//",fold:"brace"}}));var s="auto if break case register continue return default do sizeof static else struct switch extern typedef union for goto while enum const volatile inline restrict asm fortran",c="alignas alignof and and_eq audit axiom bitand bitor catch class compl concept constexpr const_cast decltype delete dynamic_cast explicit export final friend import module mutable namespace new noexcept not not_eq operator or or_eq override private protected public reiLine truncated
|
||||
@@ -0,0 +1 @@
|
||||
!function(e){"object"==typeof exports&&"object"==typeof module?e(require("../../lib/codemirror")):"function"==typeof define&&define.amd?define(["../../lib/codemirror"],e):e(CodeMirror)}((function(e){"use strict";e.defineMode("clojure",(function(t){var n=["false","nil","true"],r=[".","catch","def","do","if","monitor-enter","monitor-exit","new","quote","recur","set!","throw","try","var"],a=["*","*'","*1","*2","*3","*agent*","*allow-unresolved-vars*","*assert*","*clojure-version*","*command-line-args*","*compile-files*","*compile-path*","*compiler-options*","*data-readers*","*default-data-reader-fn*","*e","*err*","*file*","*flush-on-newline*","*fn-loader*","*in*","*math-context*","*ns*","*out*","*print-dup*","*print-length*","*print-level*","*print-meta*","*print-namespace-maps*","*print-readably*","*read-eval*","*reader-resolver*","*source-path*","*suppress-read*","*unchecked-math*","*use-context-classloader*","*verbose-defrecords*","*warn-on-reflection*","+","+'","-","-'","->","->>","->ArrayChunk","->Eduction","->Vec","->VecNode","->VecSeq","-cache-protocol-fn","-reset-methods","..","/","<","<=","=","==",">",">=","EMPTY-NODE","Inst","StackTraceElement->vec","Throwable->map","accessor","aclone","add-classpath","add-watch","agent","agent-error","agent-errors","aget","alength","alias","all-ns","alter","alter-meta!","alter-var-root","amap","ancestors","and","any?","apply","areduce","array-map","as->","aset","aset-boolean","aset-byte","aset-char","aset-double","aset-float","aset-int","aset-long","aset-short","assert","assoc","assoc!","assoc-in","associative?","atom","await","await-for","await1","bases","bean","bigdec","bigint","biginteger","binding","bit-and","bit-and-not","bit-clear","bit-flip","bit-not","bit-or","bit-set","bit-shift-left","bit-shift-right","bit-test","bit-xor","boolean","boolean-array","boolean?","booleans","bound-fn","bound-fn*","bound?","bounded-count","butlast","byte","byte-array","bytes","bytes?","case","cast","cat","char","char-array","char-escape-string","char-name-string","char?","chars","chunk","chunk-append","chunk-buffer","chunk-cons","chunk-first","chunk-next","chunk-rest","chunked-seq?","class","class?","clear-agent-errors","clojure-version","coll?","comment","commute","comp","comparator","compare","compare-and-set!","compile","complement","completing","concat","cond","cond->","cond->>","condp","conj","conj!","cons","constantly","construct-proxy","contains?","count","counted?","create-ns","create-struct","cycle","dec","dec'","decimal?","declare","dedupe","default-data-readers","definline","definterface","defmacro","defmethod","defmulti","defn","defn-","defonce","defprotocol","defrecord","defstruct","deftype","delay","delay?","deliver","denominator","deref","derive","descendants","destructure","disj","disj!","dissoc","dissoc!","distinct","distinct?","doall","dorun","doseq","dosync","dotimes","doto","double","double-array","double?","doubles","drop","drop-last","drop-while","eduction","empty","empty?","ensure","ensure-reduced","enumeration-seq","error-handler","error-mode","eval","even?","every-pred","every?","ex-data","ex-info","extend","extend-protocol","extend-type","extenders","extends?","false?","ffirst","file-seq","filter","filterv","find","find-keyword","find-ns","find-protocol-impl","find-protocol-method","find-var","first","flatten","float","float-array","float?","floats","flush","fn","fn?","fnext","fnil","for","force","format","frequencies","future","future-call","future-cancel","future-cancelled?","future-done?","future?","gen-class","gen-interface","gensym","get","get-in","get-method","get-proxy-class","get-thread-bindings","get-validator","group-by","halt-when","hash","hash-combine","hash-map","hash-ordered-coll","hash-set","hash-unordered-coll","ident?","identical?","identity","if-let","if-not","if-some","ifn?","import","in-ns","inc","inc'","indexed?","init-proxy","inst-ms","inst-ms*","inst?","instance?","int","int-array","int?","integer?","interleave","intern","interpose","into","into-array","ints","io!","isa?","iterate","iterator-seq","juxt","keep","keep-indexed","key","keys","keyword","keyword?","last","lazy-cat","lazy-seq","let","letfn","line-seq","list","list*","list?","load","load-file","load-reader","load-string","loaded-libs","locking","long","long-array","longs","loop","macroexpand","macroexpand-1","make-array","make-hierarchy","map","map-entry?","map-indexed","map?","mapcat","mapv","max","max-key","memfn","memoize","merge","merge-with","meta","method-sig","methods","min","min-key","mix-collection-hash","mod","munge","name","namespace","namespace-munge","nat-int?","neg-int?","neg?","newline","next","nfirst","nil?","nnext","not","not-any?","not-empty","not-every?","not=","ns","ns-aliases","ns-imports","ns-interns","ns-map","ns-name","ns-publics","ns-refers","ns-resolve","ns-unalias","ns-unmap","nth","nthnext","nthrest","num","number?","numerator","object-array","odd?","or","parents","partial","partition","partition-all","partition-by","pcalls","peek","persistentLine truncated
|
||||
@@ -0,0 +1 @@
|
||||
!function(n){"object"==typeof exports&&"object"==typeof module?n(require("../../lib/codemirror")):"function"==typeof define&&define.amd?define(["../../lib/codemirror"],n):n(CodeMirror)}((function(n){"use strict";n.defineMode("cmake",(function(){var n=/({)?[a-zA-Z0-9_]+(})?/;function e(n,e){for(var t,i,r=!1;!n.eol()&&(t=n.next())!=e.pending;){if("$"===t&&"\\"!=i&&'"'==e.pending){r=!0;break}i=t}return r&&n.backUp(1),t==e.pending?e.continueString=!1:e.continueString=!0,"string"}return{startState:function(){var n={inDefinition:!1,inInclude:!1,continueString:!1,pending:!1};return n},token:function(t,i){return t.eatSpace()?null:function(t,i){var r=t.next();return"$"===r?t.match(n)?"variable-2":"variable":i.continueString?(t.backUp(1),e(t,i)):t.match(/(\s+)?\w+\(/)||t.match(/(\s+)?\w+\ \(/)?(t.backUp(1),"def"):"#"==r?(t.skipToEnd(),"comment"):"'"==r||'"'==r?(i.pending=r,e(t,i)):"("==r||")"==r?"bracket":r.match(/[0-9]/)?"number":(t.eatWhile(/[\w-]/),null)}(t,i)}}})),n.defineMIME("text/x-cmake","cmake")}));
|
||||
@@ -0,0 +1 @@
|
||||
!function(E){"object"==typeof exports&&"object"==typeof module?E(require("../../lib/codemirror")):"function"==typeof define&&define.amd?define(["../../lib/codemirror"],E):E(CodeMirror)}((function(E){"use strict";E.defineMode("cobol",(function(){function E(E){for(var T={},I=E.split(" "),N=0;N<I.length;++N)T[I[N]]=!0;return T}var T=E("TRUE FALSE ZEROES ZEROS ZERO SPACES SPACE LOW-VALUE LOW-VALUES "),I=E("ACCEPT ACCESS ACQUIRE ADD ADDRESS ADVANCING AFTER ALIAS ALL ALPHABET ALPHABETIC ALPHABETIC-LOWER ALPHABETIC-UPPER ALPHANUMERIC ALPHANUMERIC-EDITED ALSO ALTER ALTERNATE AND ANY ARE AREA AREAS ARITHMETIC ASCENDING ASSIGN AT ATTRIBUTE AUTHOR AUTO AUTO-SKIP AUTOMATIC B-AND B-EXOR B-LESS B-NOT B-OR BACKGROUND-COLOR BACKGROUND-COLOUR BEEP BEFORE BELL BINARY BIT BITS BLANK BLINK BLOCK BOOLEAN BOTTOM BY CALL CANCEL CD CF CH CHARACTER CHARACTERS CLASS CLOCK-UNITS CLOSE COBOL CODE CODE-SET COL COLLATING COLUMN COMMA COMMIT COMMITMENT COMMON COMMUNICATION COMP COMP-0 COMP-1 COMP-2 COMP-3 COMP-4 COMP-5 COMP-6 COMP-7 COMP-8 COMP-9 COMPUTATIONAL COMPUTATIONAL-0 COMPUTATIONAL-1 COMPUTATIONAL-2 COMPUTATIONAL-3 COMPUTATIONAL-4 COMPUTATIONAL-5 COMPUTATIONAL-6 COMPUTATIONAL-7 COMPUTATIONAL-8 COMPUTATIONAL-9 COMPUTE CONFIGURATION CONNECT CONSOLE CONTAINED CONTAINS CONTENT CONTINUE CONTROL CONTROL-AREA CONTROLS CONVERTING COPY CORR CORRESPONDING COUNT CRT CRT-UNDER CURRENCY CURRENT CURSOR DATA DATE DATE-COMPILED DATE-WRITTEN DAY DAY-OF-WEEK DB DB-ACCESS-CONTROL-KEY DB-DATA-NAME DB-EXCEPTION DB-FORMAT-NAME DB-RECORD-NAME DB-SET-NAME DB-STATUS DBCS DBCS-EDITED DE DEBUG-CONTENTS DEBUG-ITEM DEBUG-LINE DEBUG-NAME DEBUG-SUB-1 DEBUG-SUB-2 DEBUG-SUB-3 DEBUGGING DECIMAL-POINT DECLARATIVES DEFAULT DELETE DELIMITED DELIMITER DEPENDING DESCENDING DESCRIBED DESTINATION DETAIL DISABLE DISCONNECT DISPLAY DISPLAY-1 DISPLAY-2 DISPLAY-3 DISPLAY-4 DISPLAY-5 DISPLAY-6 DISPLAY-7 DISPLAY-8 DISPLAY-9 DIVIDE DIVISION DOWN DROP DUPLICATE DUPLICATES DYNAMIC EBCDIC EGI EJECT ELSE EMI EMPTY EMPTY-CHECK ENABLE END END. END-ACCEPT END-ACCEPT. END-ADD END-CALL END-COMPUTE END-DELETE END-DISPLAY END-DIVIDE END-EVALUATE END-IF END-INVOKE END-MULTIPLY END-OF-PAGE END-PERFORM END-READ END-RECEIVE END-RETURN END-REWRITE END-SEARCH END-START END-STRING END-SUBTRACT END-UNSTRING END-WRITE END-XML ENTER ENTRY ENVIRONMENT EOP EQUAL EQUALS ERASE ERROR ESI EVALUATE EVERY EXCEEDS EXCEPTION EXCLUSIVE EXIT EXTEND EXTERNAL EXTERNALLY-DESCRIBED-KEY FD FETCH FILE FILE-CONTROL FILE-STREAM FILES FILLER FINAL FIND FINISH FIRST FOOTING FOR FOREGROUND-COLOR FOREGROUND-COLOUR FORMAT FREE FROM FULL FUNCTION GENERATE GET GIVING GLOBAL GO GOBACK GREATER GROUP HEADING HIGH-VALUE HIGH-VALUES HIGHLIGHT I-O I-O-CONTROL ID IDENTIFICATION IF IN INDEX INDEX-1 INDEX-2 INDEX-3 INDEX-4 INDEX-5 INDEX-6 INDEX-7 INDEX-8 INDEX-9 INDEXED INDIC INDICATE INDICATOR INDICATORS INITIAL INITIALIZE INITIATE INPUT INPUT-OUTPUT INSPECT INSTALLATION INTO INVALID INVOKE IS JUST JUSTIFIED KANJI KEEP KEY LABEL LAST LD LEADING LEFT LEFT-JUSTIFY LENGTH LENGTH-CHECK LESS LIBRARY LIKE LIMIT LIMITS LINAGE LINAGE-COUNTER LINE LINE-COUNTER LINES LINKAGE LOCAL-STORAGE LOCALE LOCALLY LOCK MEMBER MEMORY MERGE MESSAGE METACLASS MODE MODIFIED MODIFY MODULES MOVE MULTIPLE MULTIPLY NATIONAL NATIVE NEGATIVE NEXT NO NO-ECHO NONE NOT NULL NULL-KEY-MAP NULL-MAP NULLS NUMBER NUMERIC NUMERIC-EDITED OBJECT OBJECT-COMPUTER OCCURS OF OFF OMITTED ON ONLY OPEN OPTIONAL OR ORDER ORGANIZATION OTHER OUTPUT OVERFLOW OWNER PACKED-DECIMAL PADDING PAGE PAGE-COUNTER PARSE PERFORM PF PH PIC PICTURE PLUS POINTER POSITION POSITIVE PREFIX PRESENT PRINTING PRIOR PROCEDURE PROCEDURE-POINTER PROCEDURES PROCEED PROCESS PROCESSING PROGRAM PROGRAM-ID PROMPT PROTECTED PURGE QUEUE QUOTE QUOTES RANDOM RD READ READY REALM RECEIVE RECONNECT RECORD RECORD-NAME RECORDS RECURSIVE REDEFINES REEL REFERENCE REFERENCE-MONITOR REFERENCES RELATION RELATIVE RELEASE REMAINDER REMOVAL RENAMES REPEATED REPLACE REPLACING REPORT REPORTING REPORTS REPOSITORY REQUIRED RERUN RESERVE RESET RETAINING RETRIEVAL RETURN RETURN-CODE RETURNING REVERSE-VIDEO REVERSED REWIND REWRITE RF RH RIGHT RIGHT-JUSTIFY ROLLBACK ROLLING ROUNDED RUN SAME SCREEN SD SEARCH SECTION SECURE SECURITY SEGMENT SEGMENT-LIMIT SELECT SEND SENTENCE SEPARATE SEQUENCE SEQUENTIAL SET SHARED SIGN SIZE SKIP1 SKIP2 SKIP3 SORT SORT-MERGE SORT-RETURN SOURCE SOURCE-COMPUTER SPACE-FILL SPECIAL-NAMES STANDARD STANDARD-1 STANDARD-2 START STARTING STATUS STOP STORE STRING SUB-QUEUE-1 SUB-QUEUE-2 SUB-QUEUE-3 SUB-SCHEMA SUBFILE SUBSTITUTE SUBTRACT SUM SUPPRESS SYMBOLIC SYNC SYNCHRONIZED SYSIN SYSOUT TABLE TALLYING TAPE TENANT TERMINAL TERMINATE TEST TEXT THAN THEN THROUGH THRU TIME TIMES TITLE TO TOP TRAILING TRAILING-SIGN TRANSACTION TYPE TYPEDEF UNDERLINE UNEQUAL UNIT UNSTRING UNTIL UP UPDATE UPON USAGE USAGE-MODE USE USING VALID VALIDATE VALUE VALUES VARYING VLR WAIT WHEN WHEN-COMPILED WITH WITHIN WORDS WORKING-STORAGE WRITE XML XML-CODE XML-EVENT XML-NTEXT XML-TEXT ZERO ZERO-FILL "),N=E("- * ** / + < <= = > >= "),R={digiLine truncated
|
||||
+1
@@ -0,0 +1 @@
|
||||
!function(e){"object"==typeof exports&&"object"==typeof module?e(require("../../lib/codemirror")):"function"==typeof define&&define.amd?define(["../../lib/codemirror"],e):e(CodeMirror)}((function(e){"use strict";e.defineMode("coffeescript",(function(e,t){function n(e){return new RegExp("^(("+e.join(")|(")+"))\\b")}var r=/^(?:->|=>|\+[+=]?|-[\-=]?|\*[\*=]?|\/[\/=]?|[=!]=|<[><]?=?|>>?=?|%=?|&=?|\|=?|\^=?|\~|!|\?|(or|and|\|\||&&|\?)=)/,o=/^(?:[()\[\]{},:`=;]|\.\.?\.?)/,i=/^[_A-Za-z$][_A-Za-z$0-9]*/,c=/^@[_A-Za-z$][_A-Za-z$0-9]*/,f=n(["and","or","not","is","isnt","in","instanceof","typeof"]),p=["for","while","loop","if","unless","else","switch","try","catch","finally","class"],a=n(p.concat(["break","by","continue","debugger","delete","do","in","of","new","return","then","this","@","throw","when","until","extends"]));p=n(p);var s=/^('{3}|\"{3}|['\"])/,u=/^(\/{3}|\/)/,l=n(["Infinity","NaN","undefined","null","true","false","on","off","yes","no"]);function d(e,t){if(e.sol()){null===t.scope.align&&(t.scope.align=!1);var n=t.scope.offset;if(e.eatSpace()){var p=e.indentation();return p>n&&"coffee"==t.scope.type?"indent":p<n?"dedent":null}n>0&&k(e,t)}if(e.eatSpace())return null;var d=e.peek();if(e.match("####"))return e.skipToEnd(),"comment";if(e.match("###"))return t.tokenize=h,t.tokenize(e,t);if("#"===d)return e.skipToEnd(),"comment";if(e.match(/^-?[0-9\.]/,!1)){var v=!1;if(e.match(/^-?\d*\.\d+(e[\+\-]?\d+)?/i)&&(v=!0),e.match(/^-?\d+\.\d*/)&&(v=!0),e.match(/^-?\.\d+/)&&(v=!0),v)return"."==e.peek()&&e.backUp(1),"number";var y=!1;if(e.match(/^-?0x[0-9a-f]+/i)&&(y=!0),e.match(/^-?[1-9]\d*(e[\+\-]?\d+)?/)&&(y=!0),e.match(/^-?0(?![\dx])/i)&&(y=!0),y)return"number"}if(e.match(s))return t.tokenize=m(e.current(),!1,"string"),t.tokenize(e,t);if(e.match(u)){if("/"!=e.current()||e.match(/^.*\//,!1))return t.tokenize=m(e.current(),!0,"string-2"),t.tokenize(e,t);e.backUp(1)}return e.match(r)||e.match(f)?"operator":e.match(o)?"punctuation":e.match(l)?"atom":e.match(c)||t.prop&&e.match(i)?"property":e.match(a)?"keyword":e.match(i)?"variable":(e.next(),"error")}function m(e,n,r){return function(o,i){for(;!o.eol();)if(o.eatWhile(/[^'"\/\\]/),o.eat("\\")){if(o.next(),n&&o.eol())return r}else{if(o.match(e))return i.tokenize=d,r;o.eat(/['"\/]/)}return n&&(t.singleLineStringErrors?r="error":i.tokenize=d),r}}function h(e,t){for(;!e.eol();){if(e.eatWhile(/[^#]/),e.match("###")){t.tokenize=d;break}e.eatWhile("#")}return"comment"}function v(t,n,r){r=r||"coffee";for(var o=0,i=!1,c=null,f=n.scope;f;f=f.prev)if("coffee"===f.type||"}"==f.type){o=f.offset+e.indentUnit;break}"coffee"!==r?(i=null,c=t.column()+t.current().length):n.scope.align&&(n.scope.align=!1),n.scope={offset:o,type:r,prev:n.scope,align:i,alignOffset:c}}function k(e,t){if(t.scope.prev){if("coffee"===t.scope.type){for(var n=e.indentation(),r=!1,o=t.scope;o;o=o.prev)if(n===o.offset){r=!0;break}if(!r)return!0;for(;t.scope.prev&&t.scope.offset!==n;)t.scope=t.scope.prev;return!1}return t.scope=t.scope.prev,!1}}return{startState:function(e){return{tokenize:d,scope:{offset:e||0,type:"coffee",prev:null,align:!1},prop:!1,dedent:0}},token:function(e,t){var n=null===t.scope.align&&t.scope;n&&e.sol()&&(n.align=!1);var r=function(e,t){var n=t.tokenize(e,t),r=e.current();"return"===r&&(t.dedent=!0),(("->"===r||"=>"===r)&&e.eol()||"indent"===n)&&v(e,t);var o="[({".indexOf(r);if(-1!==o&&v(e,t,"])}".slice(o,o+1)),p.exec(r)&&v(e,t),"then"==r&&k(e,t),"dedent"===n&&k(e,t))return"error";if(-1!==(o="])}".indexOf(r))){for(;"coffee"==t.scope.type&&t.scope.prev;)t.scope=t.scope.prev;t.scope.type==r&&(t.scope=t.scope.prev)}return t.dedent&&e.eol()&&("coffee"==t.scope.type&&t.scope.prev&&(t.scope=t.scope.prev),t.dedent=!1),n}(e,t);return r&&"comment"!=r&&(n&&(n.align=!0),t.prop="punctuation"==r&&"."==e.current()),r},indent:function(e,t){if(e.tokenize!=d)return 0;var n=e.scope,r=t&&"])}".indexOf(t.charAt(0))>-1;if(r)for(;"coffee"==n.type&&n.prev;)n=n.prev;var o=r&&n.type===t.charAt(0);return n.align?n.alignOffset-(o?1:0):(o?n.prev:n).offset},lineComment:"#",fold:"indent"}})),e.defineMIME("application/vnd.coffeescript","coffeescript"),e.defineMIME("text/x-coffeescript","coffeescript"),e.defineMIME("text/coffeescript","coffeescript")}));
|
||||
+1
@@ -0,0 +1 @@
|
||||
!function(t){"object"==typeof exports&&"object"==typeof module?t(require("../../lib/codemirror")):"function"==typeof define&&define.amd?define(["../../lib/codemirror"],t):t(CodeMirror)}((function(t){"use strict";t.defineMode("commonlisp",(function(t){var e,n=/^(block|let*|return-from|catch|load-time-value|setq|eval-when|locally|symbol-macrolet|flet|macrolet|tagbody|function|multiple-value-call|the|go|multiple-value-prog1|throw|if|progn|unwind-protect|labels|progv|let|quote)$/,r=/^with|^def|^do|^prog|case$|^cond$|bind$|when$|unless$/,o=/^(?:[+\-]?(?:\d+|\d*\.\d+)(?:[efd][+\-]?\d+)?|[+\-]?\d+(?:\/[+\-]?\d+)?|#b[+\-]?[01]+|#o[+\-]?[0-7]+|#x[+\-]?[\da-f]+)/,i=/[^\s'`,@()\[\]";]/;function c(t){for(var e;e=t.next();)if("\\"==e)t.next();else if(!i.test(e)){t.backUp(1);break}return t.current()}function l(t,i){if(t.eatSpace())return e="ws",null;if(t.match(o))return"number";var l;if("\\"==(l=t.next())&&(l=t.next()),'"'==l)return(i.tokenize=u)(t,i);if("("==l)return e="open","bracket";if(")"==l||"]"==l)return e="close","bracket";if(";"==l)return t.skipToEnd(),e="ws","comment";if(/['`,@]/.test(l))return null;if("|"==l)return t.skipTo("|")?(t.next(),"symbol"):(t.skipToEnd(),"error");if("#"==l)return"("==(l=t.next())?(e="open","bracket"):/[+\-=\.']/.test(l)||/\d/.test(l)&&t.match(/^\d*#/)?null:"|"==l?(i.tokenize=a)(t,i):":"==l?(c(t),"meta"):"\\"==l?(t.next(),c(t),"string-2"):"error";var s=c(t);return"."==s?null:(e="symbol","nil"==s||"t"==s||":"==s.charAt(0)?"atom":"open"==i.lastType&&(n.test(s)||r.test(s))?"keyword":"&"==s.charAt(0)?"variable-2":"variable")}function u(t,e){for(var n,r=!1;n=t.next();){if('"'==n&&!r){e.tokenize=l;break}r=!r&&"\\"==n}return"string"}function a(t,n){for(var r,o;r=t.next();){if("#"==r&&"|"==o){n.tokenize=l;break}o=r}return e="ws","comment"}return{startState:function(){return{ctx:{prev:null,start:0,indentTo:0},lastType:null,tokenize:l}},token:function(n,o){n.sol()&&"number"!=typeof o.ctx.indentTo&&(o.ctx.indentTo=o.ctx.start+1),e=null;var i=o.tokenize(n,o);return"ws"!=e&&(null==o.ctx.indentTo?"symbol"==e&&r.test(n.current())?o.ctx.indentTo=o.ctx.start+t.indentUnit:o.ctx.indentTo="next":"next"==o.ctx.indentTo&&(o.ctx.indentTo=n.column()),o.lastType=e),"open"==e?o.ctx={prev:o.ctx,start:n.column(),indentTo:null}:"close"==e&&(o.ctx=o.ctx.prev||o.ctx),i},indent:function(t,e){var n=t.ctx.indentTo;return"number"==typeof n?n:t.ctx.start+1},closeBrackets:{pairs:'()[]{}""'},lineComment:";;",blockCommentStart:"#|",blockCommentEnd:"|#"}})),t.defineMIME("text/x-common-lisp","commonlisp")}));
|
||||
@@ -0,0 +1 @@
|
||||
!function(e){"object"==typeof exports&&"object"==typeof module?e(require("../../lib/codemirror")):"function"==typeof define&&define.amd?define(["../../lib/codemirror"],e):e(CodeMirror)}((function(e){"use strict";e.defineMode("crystal",(function(e){function t(e,t){return new RegExp((t?"":"^")+"(?:"+e.join("|")+")"+(t?"$":"\\b"))}function n(e,t,n){return n.tokenize.push(e),e(t,n)}var r=/^(?:[-+/%|&^]|\*\*?|[<>]{2})/,a=/^(?:[=!]~|===|<=>|[<>=!]=?|[|&]{2}|~)/,u=/^(?:\[\][?=]?)/,i=/^(?:\.(?:\.{2})?|->|[?:])/,o=/^[a-z_\u009F-\uFFFF][a-zA-Z0-9_\u009F-\uFFFF]*/,c=/^[A-Z_\u009F-\uFFFF][a-zA-Z0-9_\u009F-\uFFFF]*/,s=t(["abstract","alias","as","asm","begin","break","case","class","def","do","else","elsif","end","ensure","enum","extend","for","fun","if","include","instance_sizeof","lib","macro","module","next","of","out","pointerof","private","protected","rescue","return","require","select","sizeof","struct","super","then","type","typeof","uninitialized","union","unless","until","when","while","with","yield","__DIR__","__END_LINE__","__FILE__","__LINE__"]),f=t(["true","false","nil","self"]),l=t(["def","fun","macro","class","module","struct","lib","enum","union","do","for"]),m=t(["if","unless","case","while","until","begin","then"]),h=["end","else","elsif","rescue","ensure"],p=t(h),d=["\\)","\\}","\\]"],k=new RegExp("^(?:"+d.join("|")+")$"),F={def:y,fun:y,macro:function(e,t){if(e.eatSpace())return null;var n;if(n=e.match(o)){if("def"==n)return"keyword";e.eat(/[?!]/)}return t.tokenize.pop(),"def"},class:g,module:g,struct:g,lib:g,enum:g,union:g},z={"[":"]","{":"}","(":")","<":">"};function _(e,t){if(e.eatSpace())return null;if("\\"!=t.lastToken&&e.match("{%",!1))return n(x("%","%"),e,t);if("\\"!=t.lastToken&&e.match("{{",!1))return n(x("{","}"),e,t);if("#"==e.peek())return e.skipToEnd(),"comment";var h;if(e.match(o))return e.eat(/[?!]/),h=e.current(),e.eat(":")?"atom":"."==t.lastToken?"property":s.test(h)?(l.test(h)?"fun"==h&&t.blocks.indexOf("lib")>=0||"def"==h&&"abstract"==t.lastToken||(t.blocks.push(h),t.currentIndent+=1):"operator"!=t.lastStyle&&t.lastStyle||!m.test(h)?"end"==h&&(t.blocks.pop(),t.currentIndent-=1):(t.blocks.push(h),t.currentIndent+=1),F.hasOwnProperty(h)&&t.tokenize.push(F[h]),"keyword"):f.test(h)?"atom":"variable";if(e.eat("@"))return"["==e.peek()?n(b("[","]","meta"),e,t):(e.eat("@"),e.match(o)||e.match(c),"variable-2");if(e.match(c))return"tag";if(e.eat(":"))return e.eat('"')?n(I('"',"atom",!1),e,t):e.match(o)||e.match(c)||e.match(r)||e.match(a)||e.match(u)?"atom":(e.eat(":"),"operator");if(e.eat('"'))return n(I('"',"string",!0),e,t);if("%"==e.peek()){var p,d="string",k=!0;if(e.match("%r"))d="string-2",p=e.next();else if(e.match("%w"))k=!1,p=e.next();else if(e.match("%q"))k=!1,p=e.next();else if(p=e.match(/^%([^\w\s=])/))p=p[1];else{if(e.match(/^%[a-zA-Z_\u009F-\uFFFF][\w\u009F-\uFFFF]*/))return"meta";if(e.eat("%"))return"operator"}return z.hasOwnProperty(p)&&(p=z[p]),n(I(p,d,k),e,t)}return(h=e.match(/^<<-('?)([A-Z]\w*)\1/))?n(function(e,t){return function(n,r){if(n.sol()&&(n.eatSpace(),n.match(e)))return r.tokenize.pop(),"string";for(var a=!1;n.peek();)if(a)n.next(),a=!1;else{if(n.match("{%",!1))return r.tokenize.push(x("%","%")),"string";if(n.match("{{",!1))return r.tokenize.push(x("{","}")),"string";if(t&&n.match("#{",!1))return r.tokenize.push(b("#{","}","meta")),"string";a=t&&"\\"==n.next()}return"string"}}(h[2],!h[1]),e,t):e.eat("'")?(e.match(/^(?:[^']|\\(?:[befnrtv0'"]|[0-7]{3}|u(?:[0-9a-fA-F]{4}|\{[0-9a-fA-F]{1,6}\})))/),e.eat("'"),"atom"):e.eat("0")?(e.eat("x")?e.match(/^[0-9a-fA-F_]+/):e.eat("o")?e.match(/^[0-7_]+/):e.eat("b")&&e.match(/^[01_]+/),"number"):e.eat(/^\d/)?(e.match(/^[\d_]*(?:\.[\d_]+)?(?:[eE][+-]?\d+)?/),"number"):e.match(r)?(e.eat("="),"operator"):e.match(a)||e.match(i)?"operator":(h=e.match(/[({[]/,!1))?n(b(h=h[0],z[h],null),e,t):e.eat("\\")?(e.next(),"meta"):(e.next(),null)}function b(e,t,n,r){return function(a,u){if(!r&&a.match(e))return u.tokenize[u.tokenize.length-1]=b(e,t,n,!0),u.currentIndent+=1,n;var i=_(a,u);return a.current()===t&&(u.tokenize.pop(),u.currentIndent-=1,i=n),i}}function x(e,t,n){return function(r,a){return!n&&r.match("{"+e)?(a.currentIndent+=1,a.tokenize[a.tokenize.length-1]=x(e,t,!0),"meta"):r.match(t+"}")?(a.currentIndent-=1,a.tokenize.pop(),"meta"):_(r,a)}}function y(e,t){return e.eatSpace()?null:(e.match(o)?e.eat(/[!?]/):e.match(r)||e.match(a)||e.match(u),t.tokenize.pop(),"def")}function g(e,t){return e.eatSpace()?null:(e.match(c),t.tokenize.pop(),"def")}function I(e,t,n){return function(r,a){for(var u=!1;r.peek();)if(u)r.next(),u=!1;else{if(r.match("{%",!1))return a.tokenize.push(x("%","%")),t;if(r.match("{{",!1))return a.tokenize.push(x("{","}")),t;if(n&&r.match("#{",!1))return a.tokenize.push(b("#{","}","meta")),t;var i=r.next();if(i==e)return a.tokenize.pop(),t;u=n&&"\\"==i}return t}}return{startState:function(){return{tokenize:[_],currentIndent:0,lastToken:null,lastStyle:null,blocks:[]}},token:function(e,t){var n=t.tokenize[t.tokenize.length-Line truncated
|
||||
Loaded 100 of 12716 files, more files were not shown because too many files have changed in this diff.
Show more
Reference in new issue
Block a user