update to higlight.js 8.4
This commit is contained in:
14
README.md
14
README.md
@@ -2,16 +2,14 @@
|
||||
|
||||
Rails pipeline wraper for highlight.js http://softwaremaniacs.org/soft/highlight/en/
|
||||
|
||||
**This is a fork updated to higlightjs 8.4**
|
||||
|
||||
## Install
|
||||
|
||||
In you Gemfile
|
||||
In you Gemfile:
|
||||
|
||||
```ruby
|
||||
gem 'highlight_js-rails'
|
||||
|
||||
# or
|
||||
|
||||
gem 'highlight_js-rails', :git => 'git://github.com/chloerei/highlight_js-rails.git'
|
||||
```Ruby
|
||||
gem 'highlight_js-rails', :git => 'git://github.com/RedstonerServer/highlight_js-rails.git'
|
||||
```
|
||||
|
||||
Then `bundle install`
|
||||
@@ -31,4 +29,4 @@ application.css
|
||||
|
||||
```css
|
||||
*= require highlight_js/github
|
||||
```
|
||||
```
|
||||
@@ -1,5 +1,5 @@
|
||||
module HighlightJs
|
||||
module Rails
|
||||
VERSION = "8.0"
|
||||
VERSION = "8.4"
|
||||
end
|
||||
end
|
||||
|
||||
191
vendor/assets/javascripts/highlight_js/highlight.js
vendored
191
vendor/assets/javascripts/highlight_js/highlight.js
vendored
@@ -1,9 +1,28 @@
|
||||
/*
|
||||
Syntax highlighting with language autodetection.
|
||||
http://highlightjs.org/
|
||||
https://highlightjs.org/
|
||||
*/
|
||||
|
||||
function() {
|
||||
(function(factory) {
|
||||
|
||||
// Setup highlight.js for different environments. First is Node.js or
|
||||
// CommonJS.
|
||||
if(typeof exports !== 'undefined') {
|
||||
factory(exports);
|
||||
} else {
|
||||
// Export hljs globally even when using AMD for cases when this script
|
||||
// is loaded with others that may still expect a global hljs.
|
||||
window.hljs = factory({});
|
||||
|
||||
// Finally register the global hljs with AMD.
|
||||
if(typeof define === 'function' && define.amd) {
|
||||
define([], function() {
|
||||
return window.hljs;
|
||||
});
|
||||
}
|
||||
}
|
||||
|
||||
}(function(hljs) {
|
||||
|
||||
/* Utility functions */
|
||||
|
||||
@@ -23,7 +42,7 @@ function() {
|
||||
function blockLanguage(block) {
|
||||
var classes = (block.className + ' ' + (block.parentNode ? block.parentNode.className : '')).split(/\s+/);
|
||||
classes = classes.map(function(c) {return c.replace(/^lang(uage)?-/, '');});
|
||||
return classes.filter(function(c) {return getLanguage(c) || c == 'no-highlight';})[0];
|
||||
return classes.filter(function(c) {return getLanguage(c) || /no(-?)highlight|plain|text/.test(c);})[0];
|
||||
}
|
||||
|
||||
function inherit(parent, obj) {
|
||||
@@ -44,8 +63,6 @@ function() {
|
||||
for (var child = node.firstChild; child; child = child.nextSibling) {
|
||||
if (child.nodeType == 3)
|
||||
offset += child.nodeValue.length;
|
||||
else if (tag(child) == 'br')
|
||||
offset += 1;
|
||||
else if (child.nodeType == 1) {
|
||||
result.push({
|
||||
event: 'start',
|
||||
@@ -53,11 +70,16 @@ function() {
|
||||
node: child
|
||||
});
|
||||
offset = _nodeStream(child, offset);
|
||||
result.push({
|
||||
event: 'stop',
|
||||
offset: offset,
|
||||
node: child
|
||||
});
|
||||
// Prevent void elements from having an end tag that would actually
|
||||
// double them in the output. There are more void elements in HTML
|
||||
// but we list only those realistically expected in code display.
|
||||
if (!tag(child).match(/br|hr|img|input/)) {
|
||||
result.push({
|
||||
event: 'stop',
|
||||
offset: offset,
|
||||
node: child
|
||||
});
|
||||
}
|
||||
}
|
||||
}
|
||||
return offset;
|
||||
@@ -181,7 +203,7 @@ function() {
|
||||
}
|
||||
mode.keywords = compiled_keywords;
|
||||
}
|
||||
mode.lexemesRe = langRe(mode.lexemes || /\b[A-Za-z0-9_]+\b/, true);
|
||||
mode.lexemesRe = langRe(mode.lexemes || /\b\w+\b/, true);
|
||||
|
||||
if (parent) {
|
||||
if (mode.beginKeywords) {
|
||||
@@ -228,8 +250,6 @@ function() {
|
||||
.map(reStr)
|
||||
.filter(Boolean);
|
||||
mode.terminators = terminators.length ? langRe(terminators.join('|'), true) : {exec: function(s) {return null;}};
|
||||
|
||||
mode.continuation = {};
|
||||
}
|
||||
|
||||
compileMode(language);
|
||||
@@ -308,7 +328,7 @@ function() {
|
||||
if (top.subLanguage && !languages[top.subLanguage]) {
|
||||
return escape(mode_buffer);
|
||||
}
|
||||
var result = top.subLanguage ? highlight(top.subLanguage, mode_buffer, true, top.continuation.top) : highlightAuto(mode_buffer);
|
||||
var result = top.subLanguage ? highlight(top.subLanguage, mode_buffer, true, continuations[top.subLanguage]) : highlightAuto(mode_buffer);
|
||||
// Counting embedded language score towards the host language may be disabled
|
||||
// with zeroing the containing mode relevance. Usecase in point is Markdown that
|
||||
// allows XML everywhere and makes every XML snippet to have a much larger Markdown
|
||||
@@ -317,7 +337,7 @@ function() {
|
||||
relevance += result.relevance;
|
||||
}
|
||||
if (top.subLanguageMode == 'continuous') {
|
||||
top.continuation.top = result.top;
|
||||
continuations[top.subLanguage] = result.top;
|
||||
}
|
||||
return buildSpan(result.language, result.value, false, true);
|
||||
}
|
||||
@@ -399,10 +419,11 @@ function() {
|
||||
|
||||
compileLanguage(language);
|
||||
var top = continuation || language;
|
||||
var continuations = {}; // keep continuations for sub-languages
|
||||
var result = '';
|
||||
for(var current = top; current != language; current = current.parent) {
|
||||
if (current.className) {
|
||||
result += buildSpan(current.className, result, true);
|
||||
result = buildSpan(current.className, '', true) + result;
|
||||
}
|
||||
}
|
||||
var mode_buffer = '';
|
||||
@@ -498,28 +519,50 @@ function() {
|
||||
return value;
|
||||
}
|
||||
|
||||
function buildClassName(prevClassName, currentLang, resultLang) {
|
||||
var language = currentLang ? aliases[currentLang] : resultLang,
|
||||
result = [prevClassName.trim()];
|
||||
|
||||
if (!prevClassName.match(/\bhljs\b/)) {
|
||||
result.push('hljs');
|
||||
}
|
||||
|
||||
if (language) {
|
||||
result.push(language);
|
||||
}
|
||||
|
||||
return result.join(' ').trim();
|
||||
}
|
||||
|
||||
/*
|
||||
Applies highlighting to a DOM node containing code. Accepts a DOM node and
|
||||
two optional parameters for fixMarkup.
|
||||
*/
|
||||
function highlightBlock(block) {
|
||||
var text = options.useBR ? block.innerHTML
|
||||
.replace(/\n/g,'').replace(/<br>|<br [^>]*>/g, '\n').replace(/<[^>]*>/g,'')
|
||||
: block.textContent;
|
||||
var language = blockLanguage(block);
|
||||
if (language == 'no-highlight')
|
||||
if (/no(-?)highlight|plain|text/.test(language))
|
||||
return;
|
||||
|
||||
var node;
|
||||
if (options.useBR) {
|
||||
node = document.createElementNS('http://www.w3.org/1999/xhtml', 'div');
|
||||
node.innerHTML = block.innerHTML.replace(/\n/g, '').replace(/<br[ \/]*>/g, '\n');
|
||||
} else {
|
||||
node = block;
|
||||
}
|
||||
var text = node.textContent;
|
||||
var result = language ? highlight(language, text, true) : highlightAuto(text);
|
||||
var original = nodeStream(block);
|
||||
if (original.length) {
|
||||
var pre = document.createElementNS('http://www.w3.org/1999/xhtml', 'pre');
|
||||
pre.innerHTML = result.value;
|
||||
result.value = mergeStreams(original, nodeStream(pre), text);
|
||||
|
||||
var originalStream = nodeStream(node);
|
||||
if (originalStream.length) {
|
||||
var resultNode = document.createElementNS('http://www.w3.org/1999/xhtml', 'div');
|
||||
resultNode.innerHTML = result.value;
|
||||
result.value = mergeStreams(originalStream, nodeStream(resultNode), text);
|
||||
}
|
||||
result.value = fixMarkup(result.value);
|
||||
|
||||
block.innerHTML = result.value;
|
||||
block.className += ' hljs ' + (!language && result.language || '');
|
||||
block.className = buildClassName(block.className, language, result.language);
|
||||
block.result = {
|
||||
language: result.language,
|
||||
re: result.relevance
|
||||
@@ -570,7 +613,7 @@ function() {
|
||||
var aliases = {};
|
||||
|
||||
function registerLanguage(name, language) {
|
||||
var lang = languages[name] = language(this);
|
||||
var lang = languages[name] = language(hljs);
|
||||
if (lang.aliases) {
|
||||
lang.aliases.forEach(function(alias) {aliases[alias] = name;});
|
||||
}
|
||||
@@ -586,78 +629,78 @@ function() {
|
||||
|
||||
/* Interface definition */
|
||||
|
||||
this.highlight = highlight;
|
||||
this.highlightAuto = highlightAuto;
|
||||
this.fixMarkup = fixMarkup;
|
||||
this.highlightBlock = highlightBlock;
|
||||
this.configure = configure;
|
||||
this.initHighlighting = initHighlighting;
|
||||
this.initHighlightingOnLoad = initHighlightingOnLoad;
|
||||
this.registerLanguage = registerLanguage;
|
||||
this.listLanguages = listLanguages;
|
||||
this.getLanguage = getLanguage;
|
||||
this.inherit = inherit;
|
||||
hljs.highlight = highlight;
|
||||
hljs.highlightAuto = highlightAuto;
|
||||
hljs.fixMarkup = fixMarkup;
|
||||
hljs.highlightBlock = highlightBlock;
|
||||
hljs.configure = configure;
|
||||
hljs.initHighlighting = initHighlighting;
|
||||
hljs.initHighlightingOnLoad = initHighlightingOnLoad;
|
||||
hljs.registerLanguage = registerLanguage;
|
||||
hljs.listLanguages = listLanguages;
|
||||
hljs.getLanguage = getLanguage;
|
||||
hljs.inherit = inherit;
|
||||
|
||||
// Common regexps
|
||||
this.IDENT_RE = '[a-zA-Z][a-zA-Z0-9_]*';
|
||||
this.UNDERSCORE_IDENT_RE = '[a-zA-Z_][a-zA-Z0-9_]*';
|
||||
this.NUMBER_RE = '\\b\\d+(\\.\\d+)?';
|
||||
this.C_NUMBER_RE = '(\\b0[xX][a-fA-F0-9]+|(\\b\\d+(\\.\\d*)?|\\.\\d+)([eE][-+]?\\d+)?)'; // 0x..., 0..., decimal, float
|
||||
this.BINARY_NUMBER_RE = '\\b(0b[01]+)'; // 0b...
|
||||
this.RE_STARTERS_RE = '!|!=|!==|%|%=|&|&&|&=|\\*|\\*=|\\+|\\+=|,|-|-=|/=|/|:|;|<<|<<=|<=|<|===|==|=|>>>=|>>=|>=|>>>|>>|>|\\?|\\[|\\{|\\(|\\^|\\^=|\\||\\|=|\\|\\||~';
|
||||
hljs.IDENT_RE = '[a-zA-Z]\\w*';
|
||||
hljs.UNDERSCORE_IDENT_RE = '[a-zA-Z_]\\w*';
|
||||
hljs.NUMBER_RE = '\\b\\d+(\\.\\d+)?';
|
||||
hljs.C_NUMBER_RE = '\\b(0[xX][a-fA-F0-9]+|(\\d+(\\.\\d*)?|\\.\\d+)([eE][-+]?\\d+)?)'; // 0x..., 0..., decimal, float
|
||||
hljs.BINARY_NUMBER_RE = '\\b(0b[01]+)'; // 0b...
|
||||
hljs.RE_STARTERS_RE = '!|!=|!==|%|%=|&|&&|&=|\\*|\\*=|\\+|\\+=|,|-|-=|/=|/|:|;|<<|<<=|<=|<|===|==|=|>>>=|>>=|>=|>>>|>>|>|\\?|\\[|\\{|\\(|\\^|\\^=|\\||\\|=|\\|\\||~';
|
||||
|
||||
// Common modes
|
||||
this.BACKSLASH_ESCAPE = {
|
||||
hljs.BACKSLASH_ESCAPE = {
|
||||
begin: '\\\\[\\s\\S]', relevance: 0
|
||||
};
|
||||
this.APOS_STRING_MODE = {
|
||||
hljs.APOS_STRING_MODE = {
|
||||
className: 'string',
|
||||
begin: '\'', end: '\'',
|
||||
illegal: '\\n',
|
||||
contains: [this.BACKSLASH_ESCAPE]
|
||||
contains: [hljs.BACKSLASH_ESCAPE]
|
||||
};
|
||||
this.QUOTE_STRING_MODE = {
|
||||
hljs.QUOTE_STRING_MODE = {
|
||||
className: 'string',
|
||||
begin: '"', end: '"',
|
||||
illegal: '\\n',
|
||||
contains: [this.BACKSLASH_ESCAPE]
|
||||
contains: [hljs.BACKSLASH_ESCAPE]
|
||||
};
|
||||
this.PHRASAL_WORDS_MODE = {
|
||||
hljs.PHRASAL_WORDS_MODE = {
|
||||
begin: /\b(a|an|the|are|I|I'm|isn't|don't|doesn't|won't|but|just|should|pretty|simply|enough|gonna|going|wtf|so|such)\b/
|
||||
};
|
||||
this.C_LINE_COMMENT_MODE = {
|
||||
hljs.C_LINE_COMMENT_MODE = {
|
||||
className: 'comment',
|
||||
begin: '//', end: '$',
|
||||
contains: [this.PHRASAL_WORDS_MODE]
|
||||
contains: [hljs.PHRASAL_WORDS_MODE]
|
||||
};
|
||||
this.C_BLOCK_COMMENT_MODE = {
|
||||
hljs.C_BLOCK_COMMENT_MODE = {
|
||||
className: 'comment',
|
||||
begin: '/\\*', end: '\\*/',
|
||||
contains: [this.PHRASAL_WORDS_MODE]
|
||||
contains: [hljs.PHRASAL_WORDS_MODE]
|
||||
};
|
||||
this.HASH_COMMENT_MODE = {
|
||||
hljs.HASH_COMMENT_MODE = {
|
||||
className: 'comment',
|
||||
begin: '#', end: '$',
|
||||
contains: [this.PHRASAL_WORDS_MODE]
|
||||
contains: [hljs.PHRASAL_WORDS_MODE]
|
||||
};
|
||||
this.NUMBER_MODE = {
|
||||
hljs.NUMBER_MODE = {
|
||||
className: 'number',
|
||||
begin: this.NUMBER_RE,
|
||||
begin: hljs.NUMBER_RE,
|
||||
relevance: 0
|
||||
};
|
||||
this.C_NUMBER_MODE = {
|
||||
hljs.C_NUMBER_MODE = {
|
||||
className: 'number',
|
||||
begin: this.C_NUMBER_RE,
|
||||
begin: hljs.C_NUMBER_RE,
|
||||
relevance: 0
|
||||
};
|
||||
this.BINARY_NUMBER_MODE = {
|
||||
hljs.BINARY_NUMBER_MODE = {
|
||||
className: 'number',
|
||||
begin: this.BINARY_NUMBER_RE,
|
||||
begin: hljs.BINARY_NUMBER_RE,
|
||||
relevance: 0
|
||||
};
|
||||
this.CSS_NUMBER_MODE = {
|
||||
hljs.CSS_NUMBER_MODE = {
|
||||
className: 'number',
|
||||
begin: this.NUMBER_RE + '(' +
|
||||
begin: hljs.NUMBER_RE + '(' +
|
||||
'%|em|ex|ch|rem' +
|
||||
'|vw|vh|vmin|vmax' +
|
||||
'|cm|mm|in|pt|pc|px' +
|
||||
@@ -668,27 +711,29 @@ function() {
|
||||
')?',
|
||||
relevance: 0
|
||||
};
|
||||
this.REGEXP_MODE = {
|
||||
hljs.REGEXP_MODE = {
|
||||
className: 'regexp',
|
||||
begin: /\//, end: /\/[gim]*/,
|
||||
begin: /\//, end: /\/[gimuy]*/,
|
||||
illegal: /\n/,
|
||||
contains: [
|
||||
this.BACKSLASH_ESCAPE,
|
||||
hljs.BACKSLASH_ESCAPE,
|
||||
{
|
||||
begin: /\[/, end: /\]/,
|
||||
relevance: 0,
|
||||
contains: [this.BACKSLASH_ESCAPE]
|
||||
contains: [hljs.BACKSLASH_ESCAPE]
|
||||
}
|
||||
]
|
||||
};
|
||||
this.TITLE_MODE = {
|
||||
hljs.TITLE_MODE = {
|
||||
className: 'title',
|
||||
begin: this.IDENT_RE,
|
||||
begin: hljs.IDENT_RE,
|
||||
relevance: 0
|
||||
};
|
||||
this.UNDERSCORE_TITLE_MODE = {
|
||||
hljs.UNDERSCORE_TITLE_MODE = {
|
||||
className: 'title',
|
||||
begin: this.UNDERSCORE_IDENT_RE,
|
||||
begin: hljs.UNDERSCORE_IDENT_RE,
|
||||
relevance: 0
|
||||
};
|
||||
}
|
||||
|
||||
return hljs;
|
||||
}));
|
||||
|
||||
@@ -2,6 +2,7 @@
|
||||
Language: 1C
|
||||
Author: Yuri Ivanov <ivanov@supersoft.ru>
|
||||
Contributors: Sergey Baranov <segyrn@yandex.ru>
|
||||
Category: enterprise
|
||||
*/
|
||||
|
||||
function(hljs){
|
||||
|
||||
@@ -1,6 +1,7 @@
|
||||
/*
|
||||
Language: ActionScript
|
||||
Author: Alexander Myadzel <myadzel@gmail.com>
|
||||
Category: scripting
|
||||
*/
|
||||
|
||||
function(hljs) {
|
||||
|
||||
@@ -4,6 +4,7 @@ Author: Ruslan Keba <rukeba@gmail.com>
|
||||
Contributors: Ivan Sagalaev <maniac@softwaremaniacs.org>
|
||||
Website: http://rukeba.com/
|
||||
Description: language definition for Apache configuration files (httpd.conf & .htaccess)
|
||||
Category: common, config
|
||||
*/
|
||||
|
||||
function(hljs) {
|
||||
|
||||
@@ -1,7 +1,7 @@
|
||||
/*
|
||||
Language: AppleScript
|
||||
Authors: Nathan Grigg <nathan@nathanamy.org>
|
||||
Dr. Drang <drdrang@gmail.com>
|
||||
Authors: Nathan Grigg <nathan@nathanamy.org>, Dr. Drang <drdrang@gmail.com>
|
||||
Category: scripting
|
||||
*/
|
||||
|
||||
function(hljs) {
|
||||
@@ -96,6 +96,6 @@ function(hljs) {
|
||||
contains: [hljs.UNDERSCORE_TITLE_MODE, PARAMS]
|
||||
}
|
||||
].concat(COMMENTS),
|
||||
illegal: '//'
|
||||
illegal: '//|->|=>'
|
||||
};
|
||||
}
|
||||
|
||||
@@ -7,6 +7,7 @@ Description: A semantic, text-based document format that can be exported to HTML
|
||||
*/
|
||||
function(hljs) {
|
||||
return {
|
||||
aliases: ['adoc'],
|
||||
contains: [
|
||||
// block comment
|
||||
{
|
||||
@@ -136,17 +137,13 @@ function(hljs) {
|
||||
end: '(\\n{2}|_)',
|
||||
relevance: 0
|
||||
},
|
||||
// inline double smart quotes
|
||||
// inline smart quotes
|
||||
{
|
||||
className: 'smartquote',
|
||||
begin: "``.+?''",
|
||||
relevance: 10
|
||||
},
|
||||
// inline single smart quotes
|
||||
{
|
||||
className: 'smartquote',
|
||||
begin: "`.+?'",
|
||||
relevance: 10
|
||||
variants: [
|
||||
{begin: "``.+?''"},
|
||||
{begin: "`.+?'"}
|
||||
]
|
||||
},
|
||||
// inline code snippets (TODO should get same treatment as strong and emphasis)
|
||||
{
|
||||
|
||||
140
vendor/assets/javascripts/highlight_js/languages/aspectj.js
vendored
Normal file
140
vendor/assets/javascripts/highlight_js/languages/aspectj.js
vendored
Normal file
@@ -0,0 +1,140 @@
|
||||
/*
|
||||
Language: AspectJ
|
||||
Author: Hakan Ozler <ozler.hakan@gmail.com>
|
||||
Description: Syntax Highlighting for the AspectJ Language which is a general-purpose aspect-oriented extension to the Java programming language.
|
||||
*/
|
||||
function (hljs) {
|
||||
var KEYWORDS =
|
||||
'false synchronized int abstract float private char boolean static null if const ' +
|
||||
'for true while long throw strictfp finally protected import native final return void ' +
|
||||
'enum else extends implements break transient new catch instanceof byte super volatile case ' +
|
||||
'assert short package default double public try this switch continue throws privileged ' +
|
||||
'aspectOf adviceexecution proceed cflowbelow cflow initialization preinitialization ' +
|
||||
'staticinitialization withincode target within execution getWithinTypeName handler ' +
|
||||
'thisJoinPoint thisJoinPointStaticPart thisEnclosingJoinPointStaticPart declare parents '+
|
||||
'warning error soft precedence thisAspectInstance';
|
||||
var SHORTKEYS = 'get set args call';
|
||||
return {
|
||||
keywords : KEYWORDS,
|
||||
illegal : /<\//,
|
||||
contains : [
|
||||
{
|
||||
className : 'javadoc',
|
||||
begin : '/\\*\\*',
|
||||
end : '\\*/',
|
||||
relevance : 0,
|
||||
contains : [{
|
||||
className : 'javadoctag',
|
||||
begin : '(^|\\s)@[A-Za-z]+'
|
||||
}]
|
||||
},
|
||||
hljs.C_LINE_COMMENT_MODE,
|
||||
hljs.C_BLOCK_COMMENT_MODE,
|
||||
hljs.APOS_STRING_MODE,
|
||||
hljs.QUOTE_STRING_MODE,
|
||||
{
|
||||
className : 'aspect',
|
||||
beginKeywords : 'aspect',
|
||||
end : /[{;=]/,
|
||||
excludeEnd : true,
|
||||
illegal : /[:;"\[\]]/,
|
||||
contains : [{
|
||||
beginKeywords : 'extends implements pertypewithin perthis pertarget percflowbelow percflow issingleton'
|
||||
},
|
||||
hljs.UNDERSCORE_TITLE_MODE,
|
||||
{
|
||||
begin : /\([^\)]*/,
|
||||
end : /[)]+/,
|
||||
keywords : KEYWORDS + ' ' + SHORTKEYS,
|
||||
excludeEnd : false
|
||||
}
|
||||
]
|
||||
},
|
||||
{
|
||||
className : 'class',
|
||||
beginKeywords : 'class interface',
|
||||
end : /[{;=]/,
|
||||
excludeEnd : true,
|
||||
relevance: 0,
|
||||
keywords : 'class interface',
|
||||
illegal : /[:"\[\]]/,
|
||||
contains : [
|
||||
{beginKeywords : 'extends implements'},
|
||||
hljs.UNDERSCORE_TITLE_MODE
|
||||
]
|
||||
},
|
||||
{
|
||||
// AspectJ Constructs
|
||||
beginKeywords : 'pointcut after before around throwing returning',
|
||||
end : /[)]/,
|
||||
excludeEnd : false,
|
||||
illegal : /["\[\]]/,
|
||||
contains : [
|
||||
{
|
||||
begin : hljs.UNDERSCORE_IDENT_RE + '\\s*\\(',
|
||||
returnBegin : true,
|
||||
contains : [hljs.UNDERSCORE_TITLE_MODE]
|
||||
}
|
||||
]
|
||||
},
|
||||
{
|
||||
begin : /[:]/,
|
||||
returnBegin : true,
|
||||
end : /[{;]/,
|
||||
relevance: 0,
|
||||
excludeEnd : false,
|
||||
keywords : KEYWORDS,
|
||||
illegal : /["\[\]]/,
|
||||
contains : [
|
||||
{
|
||||
begin : hljs.UNDERSCORE_IDENT_RE + '\\s*\\(',
|
||||
keywords : KEYWORDS + ' ' + SHORTKEYS
|
||||
},
|
||||
hljs.QUOTE_STRING_MODE
|
||||
]
|
||||
},
|
||||
{
|
||||
// this prevents 'new Name(...), or throw ...' from being recognized as a function definition
|
||||
beginKeywords : 'new throw',
|
||||
relevance : 0
|
||||
},
|
||||
{
|
||||
// the function class is a bit different for AspectJ compared to the Java language
|
||||
className : 'function',
|
||||
begin : /\w+ +\w+(\.)?\w+\s*\([^\)]*\)\s*((throws)[\w\s,]+)?[\{;]/,
|
||||
returnBegin : true,
|
||||
end : /[{;=]/,
|
||||
keywords : KEYWORDS,
|
||||
excludeEnd : true,
|
||||
contains : [
|
||||
{
|
||||
begin : hljs.UNDERSCORE_IDENT_RE + '\\s*\\(',
|
||||
returnBegin : true,
|
||||
relevance: 0,
|
||||
contains : [hljs.UNDERSCORE_TITLE_MODE]
|
||||
},
|
||||
{
|
||||
className : 'params',
|
||||
begin : /\(/, end : /\)/,
|
||||
relevance: 0,
|
||||
keywords : KEYWORDS,
|
||||
contains : [
|
||||
hljs.APOS_STRING_MODE,
|
||||
hljs.QUOTE_STRING_MODE,
|
||||
hljs.C_NUMBER_MODE,
|
||||
hljs.C_BLOCK_COMMENT_MODE
|
||||
]
|
||||
},
|
||||
hljs.C_LINE_COMMENT_MODE,
|
||||
hljs.C_BLOCK_COMMENT_MODE
|
||||
]
|
||||
},
|
||||
hljs.C_NUMBER_MODE,
|
||||
{
|
||||
// annotation is also used in this language
|
||||
className : 'annotation',
|
||||
begin : '@[A-Za-z]+'
|
||||
}
|
||||
]
|
||||
};
|
||||
}
|
||||
@@ -2,6 +2,7 @@
|
||||
Language: AutoHotkey
|
||||
Author: Seongwon Lee <dlimpid@gmail.com>
|
||||
Description: AutoHotkey language definition
|
||||
Category: scripting
|
||||
*/
|
||||
|
||||
function(hljs) {
|
||||
|
||||
@@ -1,6 +1,7 @@
|
||||
/*
|
||||
Language: Axapta
|
||||
Author: Dmitri Roudakov <dmitri@roudakov.ru>
|
||||
Category: enterprise
|
||||
*/
|
||||
|
||||
function(hljs) {
|
||||
@@ -26,11 +27,7 @@ function(hljs) {
|
||||
beginKeywords: 'class interface', end: '{', excludeEnd: true,
|
||||
illegal: ':',
|
||||
contains: [
|
||||
{
|
||||
className: 'inheritance',
|
||||
beginKeywords: 'extends implements',
|
||||
relevance: 10
|
||||
},
|
||||
{beginKeywords: 'extends implements'},
|
||||
hljs.UNDERSCORE_TITLE_MODE
|
||||
]
|
||||
}
|
||||
|
||||
@@ -2,6 +2,7 @@
|
||||
Language: Bash
|
||||
Author: vah <vahtenberg@gmail.com>
|
||||
Contributrors: Benjamin Pannell <contact@sierrasoftworks.com>
|
||||
Category: common
|
||||
*/
|
||||
|
||||
function(hljs) {
|
||||
@@ -9,7 +10,7 @@ function(hljs) {
|
||||
className: 'variable',
|
||||
variants: [
|
||||
{begin: /\$[\w\d#@][\w\d_]*/},
|
||||
{begin: /\$\{(.*?)\}/}
|
||||
{begin: /\$\{(.*?)}/}
|
||||
]
|
||||
};
|
||||
var QUOTE_STRING = {
|
||||
@@ -35,13 +36,26 @@ function(hljs) {
|
||||
lexemes: /-?[a-z\.]+/,
|
||||
keywords: {
|
||||
keyword:
|
||||
'if then else elif fi for break continue while in do done exit return set '+
|
||||
'declare case esac export exec',
|
||||
'if then else elif fi for while in do done case esac function',
|
||||
literal:
|
||||
'true false',
|
||||
built_in:
|
||||
'printf echo read cd pwd pushd popd dirs let eval unset typeset readonly '+
|
||||
'getopts source shopt caller type hash bind help sudo',
|
||||
// Shell built-ins
|
||||
// http://www.gnu.org/software/bash/manual/html_node/Shell-Builtin-Commands.html
|
||||
'break cd continue eval exec exit export getopts hash pwd readonly return shift test times ' +
|
||||
'trap umask unset ' +
|
||||
// Bash built-ins
|
||||
'alias bind builtin caller command declare echo enable help let local logout mapfile printf ' +
|
||||
'read readarray source type typeset ulimit unalias ' +
|
||||
// Shell modifiers
|
||||
'set shopt ' +
|
||||
// Zsh built-ins
|
||||
'autoload bg bindkey bye cap chdir clone comparguments compcall compctl compdescribe compfiles ' +
|
||||
'compgroups compquote comptags comptry compvalues dirs disable disown echotc echoti emulate ' +
|
||||
'fc fg float functions getcap getln history integer jobs kill limit log noglob popd print ' +
|
||||
'pushd pushln rehash sched setcap setopt stat suspend ttyctl unfunction unhash unlimit ' +
|
||||
'unsetopt vared wait whence where which zcompile zformat zftp zle zmodload zparseopts zprof ' +
|
||||
'zpty zregexparse zsocket zstyle ztcp',
|
||||
operator:
|
||||
'-ne -eq -lt -gt -f -d -e -s -l -a' // relevance booster
|
||||
},
|
||||
|
||||
@@ -2,6 +2,7 @@
|
||||
Language: Cap’n Proto
|
||||
Author: Oleg Efimov <efimovov@gmail.com>
|
||||
Description: Cap’n Proto message definition format
|
||||
Category: protocols
|
||||
*/
|
||||
|
||||
function(hljs) {
|
||||
|
||||
22
vendor/assets/javascripts/highlight_js/languages/clojure-repl.js
vendored
Normal file
22
vendor/assets/javascripts/highlight_js/languages/clojure-repl.js
vendored
Normal file
@@ -0,0 +1,22 @@
|
||||
/*
|
||||
Language: Clojure REPL
|
||||
Description: Clojure REPL sessions
|
||||
Author: Ivan Sagalaev <maniac@softwaremaniacs.org>
|
||||
Requires: clojure.js
|
||||
Category: lisp
|
||||
*/
|
||||
|
||||
function(hljs) {
|
||||
return {
|
||||
contains: [
|
||||
{
|
||||
className: 'prompt',
|
||||
begin: /^([\w.-]+|\s*#_)=>/,
|
||||
starts: {
|
||||
end: /$/,
|
||||
subLanguage: 'clojure', subLanguageMode: 'continuous'
|
||||
}
|
||||
}
|
||||
]
|
||||
}
|
||||
}
|
||||
@@ -2,13 +2,14 @@
|
||||
Language: Clojure
|
||||
Description: Clojure syntax (based on lisp.js)
|
||||
Author: mfornos
|
||||
Category: lisp
|
||||
*/
|
||||
|
||||
function(hljs) {
|
||||
var keywords = {
|
||||
built_in:
|
||||
// Clojure keywords
|
||||
'def cond apply if-not if-let if not not= = < < > <= <= >= == + / * - rem '+
|
||||
'def cond apply if-not if-let if not not= = < > <= >= == + / * - rem '+
|
||||
'quot neg? pos? delay? symbol? keyword? true? false? integer? empty? coll? list? '+
|
||||
'set? ifn? fn? associative? sequential? sorted? counted? reversible? number? decimal? '+
|
||||
'class? distinct? isa? float? rational? reduced? ratio? odd? even? char? seq? vector? '+
|
||||
@@ -37,9 +38,14 @@ function(hljs) {
|
||||
'lazy-seq spread list* str find-keyword keyword symbol gensym force rationalize'
|
||||
};
|
||||
|
||||
var CLJ_IDENT_RE = '[a-zA-Z_0-9\\!\\.\\?\\-\\+\\*\\/\\<\\=\\>\\&\\#\\$\';]+';
|
||||
var SIMPLE_NUMBER_RE = '[\\s:\\(\\{]+\\d+(\\.\\d+)?';
|
||||
var SYMBOLSTART = 'a-zA-Z_\\-!.?+*=<>&#\'';
|
||||
var SYMBOL_RE = '[' + SYMBOLSTART + '][' + SYMBOLSTART + '0-9/;:]*';
|
||||
var SIMPLE_NUMBER_RE = '[-+]?\\d+(\\.\\d+)?';
|
||||
|
||||
var SYMBOL = {
|
||||
begin: SYMBOL_RE,
|
||||
relevance: 0
|
||||
};
|
||||
var NUMBER = {
|
||||
className: 'number', begin: SIMPLE_NUMBER_RE,
|
||||
relevance: 0
|
||||
@@ -50,13 +56,17 @@ function(hljs) {
|
||||
begin: ';', end: '$',
|
||||
relevance: 0
|
||||
};
|
||||
var LITERAL = {
|
||||
className: 'literal',
|
||||
begin: /\b(true|false|nil)\b/
|
||||
}
|
||||
var COLLECTION = {
|
||||
className: 'collection',
|
||||
begin: '[\\[\\{]', end: '[\\]\\}]'
|
||||
};
|
||||
var HINT = {
|
||||
className: 'comment',
|
||||
begin: '\\^' + CLJ_IDENT_RE
|
||||
begin: '\\^' + SYMBOL_RE
|
||||
};
|
||||
var HINT_COL = {
|
||||
className: 'comment',
|
||||
@@ -65,7 +75,7 @@ function(hljs) {
|
||||
};
|
||||
var KEY = {
|
||||
className: 'attribute',
|
||||
begin: '[:]' + CLJ_IDENT_RE
|
||||
begin: '[:]' + SYMBOL_RE
|
||||
};
|
||||
var LIST = {
|
||||
className: 'list',
|
||||
@@ -73,31 +83,23 @@ function(hljs) {
|
||||
};
|
||||
var BODY = {
|
||||
endsWithParent: true,
|
||||
keywords: {literal: 'true false nil'},
|
||||
relevance: 0
|
||||
};
|
||||
var TITLE = {
|
||||
var NAME = {
|
||||
keywords: keywords,
|
||||
lexemes: CLJ_IDENT_RE,
|
||||
className: 'title', begin: CLJ_IDENT_RE,
|
||||
lexemes: SYMBOL_RE,
|
||||
className: 'keyword', begin: SYMBOL_RE,
|
||||
starts: BODY
|
||||
};
|
||||
var DEFAULT_CONTAINS = [LIST, STRING, HINT, HINT_COL, COMMENT, KEY, COLLECTION, NUMBER, LITERAL, SYMBOL];
|
||||
|
||||
LIST.contains = [{className: 'comment', begin: 'comment'}, TITLE, BODY];
|
||||
BODY.contains = [LIST, STRING, HINT, HINT_COL, COMMENT, KEY, COLLECTION, NUMBER];
|
||||
COLLECTION.contains = [LIST, STRING, HINT, COMMENT, KEY, COLLECTION, NUMBER];
|
||||
LIST.contains = [{className: 'comment', begin: 'comment'}, NAME, BODY];
|
||||
BODY.contains = DEFAULT_CONTAINS;
|
||||
COLLECTION.contains = DEFAULT_CONTAINS;
|
||||
|
||||
return {
|
||||
aliases: ['clj'],
|
||||
illegal: /\S/,
|
||||
contains: [
|
||||
COMMENT,
|
||||
LIST,
|
||||
{
|
||||
className: 'prompt',
|
||||
begin: /^=> /,
|
||||
starts: {end: /\n\n|\Z/} // eat up prompt output to not interfere with the illegal
|
||||
}
|
||||
]
|
||||
contains: [LIST, STRING, HINT, HINT_COL, COMMENT, KEY, COLLECTION, NUMBER, LITERAL]
|
||||
}
|
||||
}
|
||||
|
||||
@@ -3,6 +3,7 @@ Language: CoffeeScript
|
||||
Author: Dmytrii Nagirniak <dnagir@gmail.com>
|
||||
Contributors: Oleg Efimov <efimovov@gmail.com>, Cédric Néhémie <cedric.nehemie@gmail.com>
|
||||
Description: CoffeeScript is a programming language that transcompiles to JavaScript. For info about language see http://coffeescript.org/
|
||||
Category: common, scripting
|
||||
*/
|
||||
|
||||
function(hljs) {
|
||||
@@ -25,7 +26,6 @@ function(hljs) {
|
||||
'npm require console print module global window document'
|
||||
};
|
||||
var JS_IDENT_RE = '[A-Za-z$_][0-9A-Za-z$_]*';
|
||||
var TITLE = hljs.inherit(hljs.TITLE_MODE, {begin: JS_IDENT_RE});
|
||||
var SUBST = {
|
||||
className: 'subst',
|
||||
begin: /#\{/, end: /}/,
|
||||
@@ -67,7 +67,9 @@ function(hljs) {
|
||||
relevance: 0
|
||||
},
|
||||
{
|
||||
begin: '/\\S(\\\\.|[^\\n])*?/[gim]*(?=\\s|\\W|$)' // \S is required to parse x / 2 / 3 as two divisions
|
||||
// regex can't start with space to parse x / 2 / 3 as two divisions
|
||||
// regex can't start with *, and it supports an "illegal" in the main mode
|
||||
begin: /\/(?![ *])(\\\/|.)*?\/[gim]*(?=\W|$)/
|
||||
}
|
||||
]
|
||||
},
|
||||
@@ -83,31 +85,47 @@ function(hljs) {
|
||||
];
|
||||
SUBST.contains = EXPRESSIONS;
|
||||
|
||||
var TITLE = hljs.inherit(hljs.TITLE_MODE, {begin: JS_IDENT_RE});
|
||||
var PARAMS_RE = '(\\(.*\\))?\\s*\\B[-=]>';
|
||||
var PARAMS = {
|
||||
className: 'params',
|
||||
begin: '\\([^\\(]', returnBegin: true,
|
||||
/* We need another contained nameless mode to not have every nested
|
||||
pair of parens to be called "params" */
|
||||
contains: [{
|
||||
begin: /\(/, end: /\)/,
|
||||
keywords: KEYWORDS,
|
||||
contains: ['self'].concat(EXPRESSIONS)
|
||||
}]
|
||||
};
|
||||
|
||||
return {
|
||||
aliases: ['coffee', 'cson', 'iced'],
|
||||
keywords: KEYWORDS,
|
||||
illegal: /\/\*/,
|
||||
contains: EXPRESSIONS.concat([
|
||||
{
|
||||
className: 'comment',
|
||||
begin: '###', end: '###'
|
||||
begin: '###', end: '###',
|
||||
contains: [hljs.PHRASAL_WORDS_MODE]
|
||||
},
|
||||
hljs.HASH_COMMENT_MODE,
|
||||
{
|
||||
className: 'function',
|
||||
begin: '(' + JS_IDENT_RE + '\\s*=\\s*)?(\\(.*\\))?\\s*\\B[-=]>', end: '[-=]>',
|
||||
begin: '^\\s*' + JS_IDENT_RE + '\\s*=\\s*' + PARAMS_RE, end: '[-=]>',
|
||||
returnBegin: true,
|
||||
contains: [TITLE, PARAMS]
|
||||
},
|
||||
{
|
||||
// anonymous function start
|
||||
begin: /[:\(,=]\s*/,
|
||||
relevance: 0,
|
||||
contains: [
|
||||
TITLE,
|
||||
{
|
||||
className: 'params',
|
||||
begin: '\\(', returnBegin: true,
|
||||
/* We need another contained nameless mode to not have every nested
|
||||
pair of parens to be called "params" */
|
||||
contains: [{
|
||||
begin: /\(/, end: /\)/,
|
||||
keywords: KEYWORDS,
|
||||
contains: ['self'].concat(EXPRESSIONS)
|
||||
}]
|
||||
className: 'function',
|
||||
begin: PARAMS_RE, end: '[-=]>',
|
||||
returnBegin: true,
|
||||
contains: [PARAMS]
|
||||
}
|
||||
]
|
||||
},
|
||||
@@ -129,7 +147,7 @@ function(hljs) {
|
||||
{
|
||||
className: 'attribute',
|
||||
begin: JS_IDENT_RE + ':', end: ':',
|
||||
returnBegin: true, excludeEnd: true,
|
||||
returnBegin: true, returnEnd: true,
|
||||
relevance: 0
|
||||
}
|
||||
])
|
||||
|
||||
@@ -1,18 +1,29 @@
|
||||
/*
|
||||
Language: C++
|
||||
Author: Ivan Sagalaev <maniac@softwaremaniacs.org>
|
||||
Contributors: Evgeny Stepanischev <imbolk@gmail.com>, Zaven Muradyan <megalivoithos@gmail.com>
|
||||
Contributors: Evgeny Stepanischev <imbolk@gmail.com>, Zaven Muradyan <megalivoithos@gmail.com>, Roel Deckers <admin@codingcat.nl>
|
||||
Category: common, system
|
||||
*/
|
||||
|
||||
function(hljs) {
|
||||
var CPP_KEYWORDS = {
|
||||
keyword: 'false int float while private char catch export virtual operator sizeof ' +
|
||||
'dynamic_cast|10 typedef const_cast|10 const struct for static_cast|10 union namespace ' +
|
||||
'unsigned long throw volatile static protected bool template mutable if public friend ' +
|
||||
'do return goto auto void enum else break new extern using true class asm case typeid ' +
|
||||
'unsigned long volatile static protected bool template mutable if public friend ' +
|
||||
'do goto auto void enum else break extern using true class asm case typeid ' +
|
||||
'short reinterpret_cast|10 default double register explicit signed typename try this ' +
|
||||
'switch continue wchar_t inline delete alignof char16_t char32_t constexpr decltype ' +
|
||||
'noexcept nullptr static_assert thread_local restrict _Bool complex _Complex _Imaginary',
|
||||
'noexcept nullptr static_assert thread_local restrict _Bool complex _Complex _Imaginary ' +
|
||||
'intmax_t uintmax_t int8_t uint8_t int16_t uint16_t int32_t uint32_t int64_t uint64_t ' +
|
||||
'int_least8_t uint_least8_t int_least16_t uint_least16_t int_least32_t uint_least32_t ' +
|
||||
'int_least64_t uint_least64_t int_fast8_t uint_fast8_t int_fast16_t uint_fast16_t int_fast32_t ' +
|
||||
'uint_fast32_t int_fast64_t uint_fast64_t intptr_t uintptr_t atomic_bool atomic_char atomic_schar ' +
|
||||
'atomic_uchar atomic_short atomic_ushort atomic_int atomic_uint atomic_long atomic_ulong atomic_llong ' +
|
||||
'atomic_ullong atomic_wchar_t atomic_char16_t atomic_char32_t atomic_intmax_t atomic_uintmax_t ' +
|
||||
'atomic_intptr_t atomic_uintptr_t atomic_size_t atomic_ptrdiff_t atomic_int_least8_t atomic_int_least16_t ' +
|
||||
'atomic_int_least32_t atomic_int_least64_t atomic_uint_least8_t atomic_uint_least16_t atomic_uint_least32_t ' +
|
||||
'atomic_uint_least64_t atomic_int_fast8_t atomic_int_fast16_t atomic_int_fast32_t atomic_int_fast64_t ' +
|
||||
'atomic_uint_fast8_t atomic_uint_fast16_t atomic_uint_fast32_t atomic_uint_fast64_t',
|
||||
built_in: 'std string cin cout cerr clog stringstream istringstream ostringstream ' +
|
||||
'auto_ptr deque list queue stack vector map set bitset multiset multimap unordered_set ' +
|
||||
'unordered_map unordered_multiset unordered_multimap array shared_ptr abort abs acos ' +
|
||||
@@ -55,13 +66,43 @@ function(hljs) {
|
||||
]
|
||||
},
|
||||
{
|
||||
className: 'stl_container',
|
||||
begin: '\\b(deque|list|queue|stack|vector|map|set|bitset|multiset|multimap|unordered_map|unordered_set|unordered_multiset|unordered_multimap|array)\\s*<', end: '>',
|
||||
keywords: CPP_KEYWORDS,
|
||||
contains: ['self']
|
||||
},
|
||||
{
|
||||
begin: hljs.IDENT_RE + '::'
|
||||
begin: hljs.IDENT_RE + '::',
|
||||
keywords: CPP_KEYWORDS
|
||||
},
|
||||
{
|
||||
// Expression keywords prevent 'keyword Name(...)' from being
|
||||
// recognized as a function definition
|
||||
beginKeywords: 'new throw return',
|
||||
relevance: 0
|
||||
},
|
||||
{
|
||||
className: 'function',
|
||||
begin: '(' + hljs.IDENT_RE + '\\s+)+' + hljs.IDENT_RE + '\\s*\\(', returnBegin: true, end: /[{;=]/,
|
||||
excludeEnd: true,
|
||||
keywords: CPP_KEYWORDS,
|
||||
contains: [
|
||||
{
|
||||
begin: hljs.IDENT_RE + '\\s*\\(', returnBegin: true,
|
||||
contains: [hljs.TITLE_MODE],
|
||||
relevance: 0
|
||||
},
|
||||
{
|
||||
className: 'params',
|
||||
begin: /\(/, end: /\)/,
|
||||
keywords: CPP_KEYWORDS,
|
||||
relevance: 0,
|
||||
contains: [
|
||||
hljs.C_BLOCK_COMMENT_MODE
|
||||
]
|
||||
},
|
||||
hljs.C_LINE_COMMENT_MODE,
|
||||
hljs.C_BLOCK_COMMENT_MODE
|
||||
]
|
||||
}
|
||||
]
|
||||
};
|
||||
|
||||
@@ -1,6 +1,7 @@
|
||||
/*
|
||||
Language: C#
|
||||
Author: Jason Diamond <jason@diamond.name>
|
||||
Category: common
|
||||
*/
|
||||
|
||||
function(hljs) {
|
||||
@@ -8,13 +9,15 @@ function(hljs) {
|
||||
// Normal keywords.
|
||||
'abstract as base bool break byte case catch char checked const continue decimal ' +
|
||||
'default delegate do double else enum event explicit extern false finally fixed float ' +
|
||||
'for foreach goto if implicit in int interface internal is lock long new null ' +
|
||||
'object operator out override params private protected public readonly ref return sbyte ' +
|
||||
'sealed short sizeof stackalloc static string struct switch this throw true try typeof ' +
|
||||
'uint ulong unchecked unsafe ushort using virtual volatile void while async await ' +
|
||||
'for foreach goto if implicit in int interface internal is lock long null ' +
|
||||
'object operator out override params private protected public readonly ref sbyte ' +
|
||||
'sealed short sizeof stackalloc static string struct switch this true try typeof ' +
|
||||
'uint ulong unchecked unsafe ushort using virtual volatile void while async ' +
|
||||
'protected public private internal ' +
|
||||
// Contextual keywords.
|
||||
'ascending descending from get group into join let orderby partial select set value var ' +
|
||||
'where yield';
|
||||
var GENERIC_IDENT_RE = hljs.IDENT_RE + '(<' + hljs.IDENT_RE + '>)?';
|
||||
return {
|
||||
aliases: ['csharp'],
|
||||
keywords: KEYWORDS,
|
||||
@@ -56,21 +59,45 @@ function(hljs) {
|
||||
hljs.QUOTE_STRING_MODE,
|
||||
hljs.C_NUMBER_MODE,
|
||||
{
|
||||
beginKeywords: 'protected public private internal', end: /[{;=]/,
|
||||
beginKeywords: 'class namespace interface', end: /[{;=]/,
|
||||
illegal: /[^\s:]/,
|
||||
contains: [
|
||||
hljs.TITLE_MODE,
|
||||
hljs.C_LINE_COMMENT_MODE,
|
||||
hljs.C_BLOCK_COMMENT_MODE
|
||||
]
|
||||
},
|
||||
{
|
||||
// Expression keywords prevent 'keyword Name(...)' from being
|
||||
// recognized as a function definition
|
||||
beginKeywords: 'new return throw await',
|
||||
relevance: 0
|
||||
},
|
||||
{
|
||||
className: 'function',
|
||||
begin: '(' + GENERIC_IDENT_RE + '\\s+)+' + hljs.IDENT_RE + '\\s*\\(', returnBegin: true, end: /[{;=]/,
|
||||
excludeEnd: true,
|
||||
keywords: KEYWORDS,
|
||||
contains: [
|
||||
{
|
||||
beginKeywords: 'class namespace interface',
|
||||
starts: {
|
||||
contains: [hljs.TITLE_MODE]
|
||||
}
|
||||
begin: hljs.IDENT_RE + '\\s*\\(', returnBegin: true,
|
||||
contains: [hljs.TITLE_MODE],
|
||||
relevance: 0
|
||||
},
|
||||
{
|
||||
begin: hljs.IDENT_RE + '\\s*\\(', returnBegin: true,
|
||||
className: 'params',
|
||||
begin: /\(/, end: /\)/,
|
||||
keywords: KEYWORDS,
|
||||
relevance: 0,
|
||||
contains: [
|
||||
hljs.TITLE_MODE
|
||||
hljs.APOS_STRING_MODE,
|
||||
hljs.QUOTE_STRING_MODE,
|
||||
hljs.C_NUMBER_MODE,
|
||||
hljs.C_BLOCK_COMMENT_MODE
|
||||
]
|
||||
}
|
||||
},
|
||||
hljs.C_LINE_COMMENT_MODE,
|
||||
hljs.C_BLOCK_COMMENT_MODE
|
||||
]
|
||||
}
|
||||
]
|
||||
|
||||
@@ -1,12 +1,13 @@
|
||||
/*
|
||||
Language: CSS
|
||||
Category: common, css
|
||||
*/
|
||||
|
||||
function(hljs) {
|
||||
var IDENT_RE = '[a-zA-Z-][a-zA-Z0-9_-]*';
|
||||
var FUNCTION = {
|
||||
className: 'function',
|
||||
begin: IDENT_RE + '\\(',
|
||||
begin: IDENT_RE + '\\(',
|
||||
returnBegin: true,
|
||||
excludeEnd: true,
|
||||
end: '\\('
|
||||
|
||||
107
vendor/assets/javascripts/highlight_js/languages/dart.js
vendored
Normal file
107
vendor/assets/javascripts/highlight_js/languages/dart.js
vendored
Normal file
@@ -0,0 +1,107 @@
|
||||
/*
|
||||
Language: Dart
|
||||
Requires: markdown.js
|
||||
Author: Maxim Dikun <dikmax@gmail.com>
|
||||
Description: Dart is a JavaScript replacement language developed by Google. For more information see http://dartlang.org/
|
||||
Category: scripting
|
||||
*/
|
||||
|
||||
function (hljs) {
|
||||
var SUBST = {
|
||||
className: 'subst',
|
||||
begin: '\\$\\{', end: '}',
|
||||
keywords: 'true false null this is new super'
|
||||
};
|
||||
|
||||
var STRING = {
|
||||
className: 'string',
|
||||
variants: [
|
||||
{
|
||||
begin: 'r\'\'\'', end: '\'\'\''
|
||||
},
|
||||
{
|
||||
begin: 'r"""', end: '"""'
|
||||
},
|
||||
{
|
||||
begin: 'r\'', end: '\'',
|
||||
illegal: '\\n'
|
||||
},
|
||||
{
|
||||
begin: 'r"', end: '"',
|
||||
illegal: '\\n'
|
||||
},
|
||||
{
|
||||
begin: '\'\'\'', end: '\'\'\'',
|
||||
contains: [hljs.BACKSLASH_ESCAPE, SUBST]
|
||||
},
|
||||
{
|
||||
begin: '"""', end: '"""',
|
||||
contains: [hljs.BACKSLASH_ESCAPE, SUBST]
|
||||
},
|
||||
{
|
||||
begin: '\'', end: '\'',
|
||||
illegal: '\\n',
|
||||
contains: [hljs.BACKSLASH_ESCAPE, SUBST]
|
||||
},
|
||||
{
|
||||
begin: '"', end: '"',
|
||||
illegal: '\\n',
|
||||
contains: [hljs.BACKSLASH_ESCAPE, SUBST]
|
||||
}
|
||||
]
|
||||
};
|
||||
SUBST.contains = [
|
||||
hljs.C_NUMBER_MODE, STRING
|
||||
];
|
||||
|
||||
var KEYWORDS = {
|
||||
keyword: 'assert break case catch class const continue default do else enum extends false final finally for if ' +
|
||||
'in is new null rethrow return super switch this throw true try var void while with',
|
||||
literal: 'abstract as dynamic export external factory get implements import library operator part set static typedef',
|
||||
built_in:
|
||||
// dart:core
|
||||
'print Comparable DateTime Duration Function Iterable Iterator List Map Match Null Object Pattern RegExp Set ' +
|
||||
'Stopwatch String StringBuffer StringSink Symbol Type Uri bool double int num ' +
|
||||
// dart:html
|
||||
'document window querySelector querySelectorAll Element ElementList'
|
||||
};
|
||||
|
||||
return {
|
||||
keywords: KEYWORDS,
|
||||
contains: [
|
||||
STRING,
|
||||
{
|
||||
className: 'dartdoc',
|
||||
begin: '/\\*\\*', end: '\\*/',
|
||||
subLanguage: 'markdown',
|
||||
subLanguageMode: 'continuous'
|
||||
},
|
||||
{
|
||||
className: 'dartdoc',
|
||||
begin: '///', end: '$',
|
||||
subLanguage: 'markdown',
|
||||
subLanguageMode: 'continuous'
|
||||
},
|
||||
hljs.C_LINE_COMMENT_MODE,
|
||||
hljs.C_BLOCK_COMMENT_MODE,
|
||||
{
|
||||
className: 'class',
|
||||
beginKeywords: 'class interface', end: '{', excludeEnd: true,
|
||||
contains: [
|
||||
{
|
||||
beginKeywords: 'extends implements'
|
||||
},
|
||||
hljs.UNDERSCORE_TITLE_MODE
|
||||
]
|
||||
},
|
||||
hljs.C_NUMBER_MODE,
|
||||
{
|
||||
className: 'annotation', begin: '@[A-Za-z]+'
|
||||
},
|
||||
{
|
||||
begin: '=>' // No markup, just a relevance booster
|
||||
}
|
||||
]
|
||||
}
|
||||
}
|
||||
|
||||
@@ -14,7 +14,7 @@ function(hljs) {
|
||||
var COMMENT = {
|
||||
className: 'comment',
|
||||
variants: [
|
||||
{begin: /\{/, end: /\}/, relevance: 0},
|
||||
{begin: /\{/, end: /}/, relevance: 0},
|
||||
{begin: /\(\*/, end: /\*\)/, relevance: 10}
|
||||
]
|
||||
};
|
||||
@@ -50,7 +50,7 @@ function(hljs) {
|
||||
return {
|
||||
case_insensitive: true,
|
||||
keywords: KEYWORDS,
|
||||
illegal: /("|\$[G-Zg-z]|\/\*|<\/)/,
|
||||
illegal: /"|\$[G-Zg-z]|\/\*|<\/|\|/,
|
||||
contains: [
|
||||
COMMENT, hljs.C_LINE_COMMENT_MODE,
|
||||
STRING, CHAR_STRING,
|
||||
|
||||
@@ -2,6 +2,7 @@
|
||||
Language: Diff
|
||||
Description: Unified and context diff
|
||||
Author: Vasily Polovnyov <vast@whiteants.net>
|
||||
Category: common
|
||||
*/
|
||||
|
||||
function(hljs) {
|
||||
@@ -12,7 +13,7 @@ function(hljs) {
|
||||
className: 'chunk',
|
||||
relevance: 10,
|
||||
variants: [
|
||||
{begin: /^\@\@ +\-\d+,\d+ +\+\d+,\d+ +\@\@$/},
|
||||
{begin: /^@@ +\-\d+,\d+ +\+\d+,\d+ +@@$/},
|
||||
{begin: /^\*\*\* +\d+,\d+ +\*\*\*\*$/},
|
||||
{begin: /^\-\-\- +\d+,\d+ +\-\-\-\-$/}
|
||||
]
|
||||
|
||||
@@ -3,12 +3,13 @@ Language: Django
|
||||
Requires: xml.js
|
||||
Author: Ivan Sagalaev <maniac@softwaremaniacs.org>
|
||||
Contributors: Ilya Baryshev <baryshev@gmail.com>
|
||||
Category: template
|
||||
*/
|
||||
|
||||
function(hljs) {
|
||||
var FILTER = {
|
||||
className: 'filter',
|
||||
begin: /\|[A-Za-z]+\:?/,
|
||||
begin: /\|[A-Za-z]+:?/,
|
||||
keywords:
|
||||
'truncatewords removetags linebreaksbr yesno get_digit timesince random striptags ' +
|
||||
'filesizeformat escape linebreaks length_is ljust rjust cut urlize fix_ampersands ' +
|
||||
@@ -30,11 +31,11 @@ function(hljs) {
|
||||
subLanguage: 'xml', subLanguageMode: 'continuous',
|
||||
contains: [
|
||||
{
|
||||
className: 'template_comment',
|
||||
className: 'comment',
|
||||
begin: /\{%\s*comment\s*%}/, end: /\{%\s*endcomment\s*%}/
|
||||
},
|
||||
{
|
||||
className: 'template_comment',
|
||||
className: 'comment',
|
||||
begin: /\{#/, end: /#}/
|
||||
},
|
||||
{
|
||||
|
||||
42
vendor/assets/javascripts/highlight_js/languages/dockerfile.js
vendored
Normal file
42
vendor/assets/javascripts/highlight_js/languages/dockerfile.js
vendored
Normal file
@@ -0,0 +1,42 @@
|
||||
/*
|
||||
Language: Dockerfile
|
||||
Requires: bash.js
|
||||
Author: Alexis Hénaut <alexis@henaut.net>
|
||||
Description: language definition for Dockerfile files
|
||||
Category: config
|
||||
*/
|
||||
|
||||
function(hljs) {
|
||||
return {
|
||||
aliases: ['docker'],
|
||||
case_insensitive: true,
|
||||
keywords: {
|
||||
built_ins: 'from maintainer cmd expose add copy entrypoint volume user workdir onbuild run env'
|
||||
},
|
||||
contains: [
|
||||
hljs.HASH_COMMENT_MODE,
|
||||
{
|
||||
keywords : {
|
||||
built_in: 'run cmd entrypoint volume add copy workdir onbuild'
|
||||
},
|
||||
begin: /^ *(onbuild +)?(run|cmd|entrypoint|volume|add|copy|workdir) +/,
|
||||
starts: {
|
||||
end: /[^\\]\n/,
|
||||
subLanguage: 'bash', subLanguageMode: 'continuous'
|
||||
}
|
||||
},
|
||||
{
|
||||
keywords: {
|
||||
built_in: 'from maintainer expose env user onbuild'
|
||||
},
|
||||
begin: /^ *(onbuild +)?(from|maintainer|expose|env|user|onbuild) +/, end: /[^\\]\n/,
|
||||
contains: [
|
||||
hljs.APOS_STRING_MODE,
|
||||
hljs.QUOTE_STRING_MODE,
|
||||
hljs.NUMBER_MODE,
|
||||
hljs.HASH_COMMENT_MODE
|
||||
]
|
||||
}
|
||||
]
|
||||
}
|
||||
}
|
||||
@@ -1,36 +1,52 @@
|
||||
/*
|
||||
Language: DOS .bat
|
||||
Author: Alexander Makarov (http://rmcreative.ru/)
|
||||
Author: Alexander Makarov <sam@rmcreative.ru>
|
||||
Contributors: Anton Kochkov <anton.kochkov@gmail.com>
|
||||
*/
|
||||
|
||||
function(hljs) {
|
||||
var COMMENT = {
|
||||
className: 'comment',
|
||||
begin: /@?rem\b/, end: /$/,
|
||||
relevance: 10
|
||||
};
|
||||
var LABEL = {
|
||||
className: 'label',
|
||||
begin: '^\\s*[A-Za-z._?][A-Za-z0-9_$#@~.?]*(:|\\s+label)',
|
||||
relevance: 0
|
||||
};
|
||||
return {
|
||||
aliases: ['bat', 'cmd'],
|
||||
case_insensitive: true,
|
||||
keywords: {
|
||||
flow: 'if else goto for in do call exit not exist errorlevel defined equ neq lss leq gtr geq',
|
||||
flow: 'if else goto for in do call exit not exist errorlevel defined',
|
||||
operator: 'equ neq lss leq gtr geq',
|
||||
keyword: 'shift cd dir echo setlocal endlocal set pause copy',
|
||||
stream: 'prn nul lpt3 lpt2 lpt1 con com4 com3 com2 com1 aux',
|
||||
winutils: 'ping net ipconfig taskkill xcopy ren del'
|
||||
winutils: 'ping net ipconfig taskkill xcopy ren del',
|
||||
built_in: 'append assoc at attrib break cacls cd chcp chdir chkdsk chkntfs cls cmd color ' +
|
||||
'comp compact convert date dir diskcomp diskcopy doskey erase fs ' +
|
||||
'find findstr format ftype graftabl help keyb label md mkdir mode more move path ' +
|
||||
'pause print popd pushd promt rd recover rem rename replace restore rmdir shift' +
|
||||
'sort start subst time title tree type ver verify vol'
|
||||
},
|
||||
contains: [
|
||||
{
|
||||
className: 'envvar', begin: '%%[^ ]'
|
||||
className: 'envvar', begin: /%%[^ ]|%[^ ]+?%|![^ ]+?!/
|
||||
},
|
||||
{
|
||||
className: 'envvar', begin: '%[^ ]+?%'
|
||||
},
|
||||
{
|
||||
className: 'envvar', begin: '![^ ]+?!'
|
||||
className: 'function',
|
||||
begin: LABEL.begin, end: 'goto:eof',
|
||||
contains: [
|
||||
hljs.inherit(hljs.TITLE_MODE, {begin: '([_a-zA-Z]\\w*\\.)*([_a-zA-Z]\\w*:)?[_a-zA-Z]\\w*'}),
|
||||
COMMENT
|
||||
]
|
||||
},
|
||||
{
|
||||
className: 'number', begin: '\\b\\d+',
|
||||
relevance: 0
|
||||
},
|
||||
{
|
||||
className: 'comment',
|
||||
begin: '@?rem', end: '$'
|
||||
}
|
||||
COMMENT
|
||||
]
|
||||
};
|
||||
}
|
||||
|
||||
42
vendor/assets/javascripts/highlight_js/languages/dust.js
vendored
Normal file
42
vendor/assets/javascripts/highlight_js/languages/dust.js
vendored
Normal file
@@ -0,0 +1,42 @@
|
||||
/*
|
||||
Language: Dust
|
||||
Requires: xml.js
|
||||
Author: Michael Allen <michael.allen@benefitfocus.com>
|
||||
Description: Matcher for dust.js templates.
|
||||
Category: template
|
||||
*/
|
||||
|
||||
function(hljs) {
|
||||
var EXPRESSION_KEYWORDS = 'if eq ne lt lte gt gte select default math sep';
|
||||
return {
|
||||
aliases: ['dst'],
|
||||
case_insensitive: true,
|
||||
subLanguage: 'xml', subLanguageMode: 'continuous',
|
||||
contains: [
|
||||
{
|
||||
className: 'expression',
|
||||
begin: '{', end: '}',
|
||||
relevance: 0,
|
||||
contains: [
|
||||
{
|
||||
className: 'begin-block', begin: '\#[a-zA-Z\-\ \.]+',
|
||||
keywords: EXPRESSION_KEYWORDS
|
||||
},
|
||||
{
|
||||
className: 'string',
|
||||
begin: '"', end: '"'
|
||||
},
|
||||
{
|
||||
className: 'end-block', begin: '\\\/[a-zA-Z\-\ \.]+',
|
||||
keywords: EXPRESSION_KEYWORDS
|
||||
},
|
||||
{
|
||||
className: 'variable', begin: '[a-zA-Z\-\.]+',
|
||||
keywords: EXPRESSION_KEYWORDS,
|
||||
relevance: 0
|
||||
}
|
||||
]
|
||||
}
|
||||
]
|
||||
};
|
||||
}
|
||||
@@ -2,6 +2,7 @@
|
||||
Language: Elixir
|
||||
Author: Josh Adams <josh@isotope11.com>
|
||||
Description: language definition for Elixir source code files (.ex and .exs). Based on ruby language support.
|
||||
Category: functional
|
||||
*/
|
||||
|
||||
function(hljs) {
|
||||
@@ -48,7 +49,7 @@ function(hljs) {
|
||||
var CLASS = hljs.inherit(FUNCTION, {
|
||||
className: 'class',
|
||||
beginKeywords: 'defmodule defrecord', end: /\bdo\b|$|;/
|
||||
})
|
||||
});
|
||||
var ELIXIR_DEFAULT_CONTAINS = [
|
||||
STRING,
|
||||
hljs.HASH_COMMENT_MODE,
|
||||
|
||||
26
vendor/assets/javascripts/highlight_js/languages/erb.js
vendored
Normal file
26
vendor/assets/javascripts/highlight_js/languages/erb.js
vendored
Normal file
@@ -0,0 +1,26 @@
|
||||
/*
|
||||
Language: ERB (Embedded Ruby)
|
||||
Requires: xml.js, ruby.js
|
||||
Author: Lucas Mazza <lucastmazza@gmail.com>
|
||||
Contributors: Kassio Borges <kassioborgesm@gmail.com>
|
||||
Description: "Bridge" language defining fragments of Ruby in HTML within <% .. %>
|
||||
Category: template
|
||||
*/
|
||||
|
||||
function(hljs) {
|
||||
return {
|
||||
subLanguage: 'xml', subLanguageMode: 'continuous',
|
||||
contains: [
|
||||
{
|
||||
className: 'comment',
|
||||
begin: '<%#', end: '%>',
|
||||
},
|
||||
{
|
||||
begin: '<%[%=-]?', end: '[%-]?%>',
|
||||
subLanguage: 'ruby',
|
||||
excludeBegin: true,
|
||||
excludeEnd: true
|
||||
}
|
||||
]
|
||||
};
|
||||
}
|
||||
@@ -1,6 +1,7 @@
|
||||
/*
|
||||
Language: Erlang REPL
|
||||
Author: Sergey Ignatov <sergey@ignatov.spb.su>
|
||||
Category: functional
|
||||
*/
|
||||
|
||||
function(hljs) {
|
||||
|
||||
@@ -2,6 +2,7 @@
|
||||
Language: Erlang
|
||||
Description: Erlang is a general-purpose functional language, with strict evaluation, single assignment, and dynamic typing.
|
||||
Author: Nikolay Zakharov <nikolay.desh@gmail.com>, Dmitry Kovega <arhibot@gmail.com>
|
||||
Category: functional
|
||||
*/
|
||||
|
||||
function(hljs) {
|
||||
@@ -9,8 +10,8 @@ function(hljs) {
|
||||
var FUNCTION_NAME_RE = '(' + BASIC_ATOM_RE + ':' + BASIC_ATOM_RE + '|' + BASIC_ATOM_RE + ')';
|
||||
var ERLANG_RESERVED = {
|
||||
keyword:
|
||||
'after and andalso|10 band begin bnot bor bsl bzr bxor case catch cond div end fun let ' +
|
||||
'not of orelse|10 query receive rem try when xor',
|
||||
'after and andalso|10 band begin bnot bor bsl bzr bxor case catch cond div end fun if ' +
|
||||
'let not of orelse|10 query receive rem try when xor',
|
||||
literal:
|
||||
'false true'
|
||||
};
|
||||
|
||||
@@ -1,13 +1,23 @@
|
||||
/*
|
||||
Language: F#
|
||||
Author: Jonas Follesø <jonas@follesoe.no>
|
||||
Contributors: Troy Kershaw <hello@troykershaw.com>
|
||||
Description: F# language definition.
|
||||
Contributors: Troy Kershaw <hello@troykershaw.com>, Henrik Feldt <henrik@haf.se>
|
||||
Category: functional
|
||||
*/
|
||||
function(hljs) {
|
||||
var TYPEPARAM = {
|
||||
begin: '<', end: '>',
|
||||
contains: [
|
||||
hljs.inherit(hljs.TITLE_MODE, {begin: /'[a-zA-Z0-9_]+/})
|
||||
]
|
||||
};
|
||||
|
||||
return {
|
||||
aliases: ['fs'],
|
||||
keywords:
|
||||
// monad builder keywords (at top, matches before non-bang kws)
|
||||
'yield! return! let! do!' +
|
||||
// regular keywords
|
||||
'abstract and as assert base begin class default delegate do done ' +
|
||||
'downcast downto elif else end exception extern false finally for ' +
|
||||
'fun function global if in inherit inline interface internal lazy let ' +
|
||||
@@ -32,12 +42,14 @@ function(hljs) {
|
||||
className: 'class',
|
||||
beginKeywords: 'type', end: '\\(|=|$', excludeEnd: true,
|
||||
contains: [
|
||||
hljs.UNDERSCORE_TITLE_MODE
|
||||
hljs.UNDERSCORE_TITLE_MODE,
|
||||
TYPEPARAM
|
||||
]
|
||||
},
|
||||
{
|
||||
className: 'annotation',
|
||||
begin: '\\[<', end: '>\\]'
|
||||
begin: '\\[<', end: '>\\]',
|
||||
relevance: 10
|
||||
},
|
||||
{
|
||||
className: 'attribute',
|
||||
|
||||
82
vendor/assets/javascripts/highlight_js/languages/gcode.js
vendored
Normal file
82
vendor/assets/javascripts/highlight_js/languages/gcode.js
vendored
Normal file
@@ -0,0 +1,82 @@
|
||||
/*
|
||||
Language: G-code (ISO 6983)
|
||||
Contributors: Adam Joseph Cook <adam.joseph.cook@gmail.com>
|
||||
Description: G-code syntax highlighter for Fanuc and other common CNC machine tool controls.
|
||||
*/
|
||||
|
||||
function(hljs) {
|
||||
var GCODE_IDENT_RE = '[A-Z_][A-Z0-9_.]*';
|
||||
var GCODE_CLOSE_RE = '\\%';
|
||||
var GCODE_KEYWORDS = {
|
||||
literal:
|
||||
'',
|
||||
built_in:
|
||||
'',
|
||||
keyword:
|
||||
'IF DO WHILE ENDWHILE CALL ENDIF SUB ENDSUB GOTO REPEAT ENDREPEAT ' +
|
||||
'EQ LT GT NE GE LE OR XOR'
|
||||
};
|
||||
var GCODE_START = {
|
||||
className: 'preprocessor',
|
||||
begin: '([O])([0-9]+)'
|
||||
};
|
||||
var GCODE_CODE = [
|
||||
hljs.C_LINE_COMMENT_MODE,
|
||||
{
|
||||
className: 'comment',
|
||||
begin: /\(/, end: /\)/,
|
||||
contains: [hljs.PHRASAL_WORDS_MODE]
|
||||
},
|
||||
hljs.C_BLOCK_COMMENT_MODE,
|
||||
hljs.inherit(hljs.C_NUMBER_MODE, {begin: '([-+]?([0-9]*\\.?[0-9]+\\.?))|' + hljs.C_NUMBER_RE}),
|
||||
hljs.inherit(hljs.APOS_STRING_MODE, {illegal: null}),
|
||||
hljs.inherit(hljs.QUOTE_STRING_MODE, {illegal: null}),
|
||||
{
|
||||
className: 'keyword',
|
||||
begin: '([G])([0-9]+\\.?[0-9]?)'
|
||||
},
|
||||
{
|
||||
className: 'title',
|
||||
begin: '([M])([0-9]+\\.?[0-9]?)'
|
||||
},
|
||||
{
|
||||
className: 'title',
|
||||
begin: '(VC|VS|#)',
|
||||
end: '(\\d+)'
|
||||
},
|
||||
{
|
||||
className: 'title',
|
||||
begin: '(VZOFX|VZOFY|VZOFZ)'
|
||||
},
|
||||
{
|
||||
className: 'built_in',
|
||||
begin: '(ATAN|ABS|ACOS|ASIN|SIN|COS|EXP|FIX|FUP|ROUND|LN|TAN)(\\[)',
|
||||
end: '([-+]?([0-9]*\\.?[0-9]+\\.?))(\\])'
|
||||
},
|
||||
{
|
||||
className: 'label',
|
||||
variants: [
|
||||
{
|
||||
begin: 'N', end: '\\d+',
|
||||
illegal: '\\W'
|
||||
}
|
||||
]
|
||||
}
|
||||
];
|
||||
|
||||
return {
|
||||
aliases: ['nc'],
|
||||
// Some implementations (CNC controls) of G-code are interoperable with uppercase and lowercase letters seamlessly.
|
||||
// However, most prefer all uppercase and uppercase is customary.
|
||||
case_insensitive: true,
|
||||
lexemes: GCODE_IDENT_RE,
|
||||
keywords: GCODE_KEYWORDS,
|
||||
contains: [
|
||||
{
|
||||
className: 'preprocessor',
|
||||
begin: GCODE_CLOSE_RE
|
||||
},
|
||||
GCODE_START
|
||||
].concat(GCODE_CODE)
|
||||
};
|
||||
}
|
||||
@@ -6,6 +6,7 @@
|
||||
|
||||
function (hljs) {
|
||||
return {
|
||||
aliases: ['feature'],
|
||||
keywords: 'Feature Background Ability Business\ Need Scenario Scenarios Scenario\ Outline Scenario\ Template Examples Given And Then But When',
|
||||
contains: [
|
||||
{
|
||||
@@ -22,7 +23,7 @@ function (hljs) {
|
||||
},
|
||||
{
|
||||
className: 'variable',
|
||||
begin: '<', end: '>',
|
||||
begin: '<', end: '>'
|
||||
},
|
||||
hljs.HASH_COMMENT_MODE,
|
||||
{
|
||||
|
||||
@@ -2,6 +2,7 @@
|
||||
Language: GLSL
|
||||
Description: OpenGL Shading Language
|
||||
Author: Sergey Tikhomirov <me@stikhomirov.com>
|
||||
Category: graphics
|
||||
*/
|
||||
|
||||
function(hljs) {
|
||||
|
||||
@@ -3,6 +3,7 @@ Language: Go
|
||||
Author: Stephan Kountso aka StepLg <steplg@gmail.com>
|
||||
Contributors: Evgeny Stepanischev <imbolk@gmail.com>
|
||||
Description: Google go language (golang). For info about language see http://golang.org/
|
||||
Category: system
|
||||
*/
|
||||
|
||||
function(hljs) {
|
||||
@@ -36,7 +37,7 @@ function(hljs) {
|
||||
},
|
||||
{
|
||||
className: 'number',
|
||||
begin: '[^a-zA-Z_0-9](\\-|\\+)?\\d+(\\.\\d+|\\/\\d+)?((d|e|f|l|s)(\\+|\\-)?\\d+)?',
|
||||
begin: hljs.C_NUMBER_RE + '[dflsi]?',
|
||||
relevance: 0
|
||||
},
|
||||
hljs.C_NUMBER_MODE
|
||||
|
||||
40
vendor/assets/javascripts/highlight_js/languages/gradle.js
vendored
Normal file
40
vendor/assets/javascripts/highlight_js/languages/gradle.js
vendored
Normal file
@@ -0,0 +1,40 @@
|
||||
/*
|
||||
Language: Gradle
|
||||
Author: Damian Mee <mee.damian@gmail.com>
|
||||
Website: http://meeDamian.com
|
||||
*/
|
||||
|
||||
function(hljs) {
|
||||
return {
|
||||
case_insensitive: true,
|
||||
keywords: {
|
||||
keyword:
|
||||
'task project allprojects subprojects artifacts buildscript configurations ' +
|
||||
'dependencies repositories sourceSets description delete from into include ' +
|
||||
'exclude source classpath destinationDir includes options sourceCompatibility ' +
|
||||
'targetCompatibility group flatDir doLast doFirst flatten todir fromdir ant ' +
|
||||
'def abstract break case catch continue default do else extends final finally ' +
|
||||
'for if implements instanceof native new private protected public return static ' +
|
||||
'switch synchronized throw throws transient try volatile while strictfp package ' +
|
||||
'import false null super this true antlrtask checkstyle codenarc copy boolean ' +
|
||||
'byte char class double float int interface long short void compile runTime ' +
|
||||
'file fileTree abs any append asList asWritable call collect compareTo count ' +
|
||||
'div dump each eachByte eachFile eachLine every find findAll flatten getAt ' +
|
||||
'getErr getIn getOut getText grep immutable inject inspect intersect invokeMethods ' +
|
||||
'isCase join leftShift minus multiply newInputStream newOutputStream newPrintWriter ' +
|
||||
'newReader newWriter next plus pop power previous print println push putAt read ' +
|
||||
'readBytes readLines reverse reverseEach round size sort splitEachLine step subMap ' +
|
||||
'times toInteger toList tokenize upto waitForOrKill withPrintWriter withReader ' +
|
||||
'withStream withWriter withWriterAppend write writeLine'
|
||||
},
|
||||
contains: [
|
||||
hljs.C_LINE_COMMENT_MODE,
|
||||
hljs.C_BLOCK_COMMENT_MODE,
|
||||
hljs.APOS_STRING_MODE,
|
||||
hljs.QUOTE_STRING_MODE,
|
||||
hljs.NUMBER_MODE,
|
||||
hljs.REGEXP_MODE
|
||||
|
||||
]
|
||||
}
|
||||
}
|
||||
92
vendor/assets/javascripts/highlight_js/languages/groovy.js
vendored
Normal file
92
vendor/assets/javascripts/highlight_js/languages/groovy.js
vendored
Normal file
@@ -0,0 +1,92 @@
|
||||
/*
|
||||
Language: Groovy
|
||||
Author: Guillaume Laforge <glaforge@gmail.com>
|
||||
Website: http://glaforge.appspot.com
|
||||
Description: Groovy programming language implementation inspired from Vsevolod's Java mode
|
||||
*/
|
||||
|
||||
function(hljs) {
|
||||
return {
|
||||
keywords: {
|
||||
typename: 'byte short char int long boolean float double void',
|
||||
literal : 'true false null',
|
||||
keyword:
|
||||
// groovy specific keywords
|
||||
'def as in assert trait ' +
|
||||
// common keywords with Java
|
||||
'super this abstract static volatile transient public private protected synchronized final ' +
|
||||
'class interface enum if else for while switch case break default continue ' +
|
||||
'throw throws try catch finally implements extends new import package return instanceof'
|
||||
},
|
||||
|
||||
contains: [
|
||||
hljs.C_LINE_COMMENT_MODE,
|
||||
{
|
||||
className: 'javadoc',
|
||||
begin: '/\\*\\*', end: '\\*//*',
|
||||
relevance: 0,
|
||||
contains: [
|
||||
{
|
||||
className: 'javadoctag', begin: '(^|\\s)@[A-Za-z]+'
|
||||
}
|
||||
]
|
||||
},
|
||||
hljs.C_BLOCK_COMMENT_MODE,
|
||||
{
|
||||
className: 'string',
|
||||
begin: '"""', end: '"""'
|
||||
},
|
||||
{
|
||||
className: 'string',
|
||||
begin: "'''", end: "'''"
|
||||
},
|
||||
{
|
||||
className: 'string',
|
||||
begin: "\\$/", end: "/\\$",
|
||||
relevance: 10
|
||||
},
|
||||
hljs.APOS_STRING_MODE,
|
||||
{
|
||||
className: 'regexp',
|
||||
begin: /~?\/[^\/\n]+\//,
|
||||
contains: [
|
||||
hljs.BACKSLASH_ESCAPE
|
||||
]
|
||||
},
|
||||
hljs.QUOTE_STRING_MODE,
|
||||
{
|
||||
className: 'shebang',
|
||||
begin: "^#!/usr/bin/env", end: '$',
|
||||
illegal: '\n'
|
||||
},
|
||||
hljs.BINARY_NUMBER_MODE,
|
||||
{
|
||||
className: 'class',
|
||||
beginKeywords: 'class interface trait enum', end: '{',
|
||||
illegal: ':',
|
||||
contains: [
|
||||
{beginKeywords: 'extends implements'},
|
||||
hljs.UNDERSCORE_TITLE_MODE,
|
||||
]
|
||||
},
|
||||
hljs.C_NUMBER_MODE,
|
||||
{
|
||||
className: 'annotation', begin: '@[A-Za-z]+'
|
||||
},
|
||||
{
|
||||
// highlight map keys and named parameters as strings
|
||||
className: 'string', begin: /[^\?]{0}[A-Za-z0-9_$]+ *:/
|
||||
},
|
||||
{
|
||||
// catch middle element of the ternary operator
|
||||
// to avoid highlight it as a label, named parameter, or map key
|
||||
begin: /\?/, end: /\:/
|
||||
},
|
||||
{
|
||||
// highlight labeled statements
|
||||
className: 'label', begin: '^\\s*[A-Za-z0-9_$]+:',
|
||||
relevance: 0
|
||||
},
|
||||
]
|
||||
}
|
||||
}
|
||||
@@ -3,6 +3,7 @@ Language: Haml
|
||||
Requires: ruby.js
|
||||
Author: Dan Allen <dan.j.allen@gmail.com>
|
||||
Website: http://google.com/profiles/dan.j.allen
|
||||
Category: template
|
||||
*/
|
||||
|
||||
// TODO support filter tags like :javascript, support inline HTML
|
||||
|
||||
@@ -3,6 +3,7 @@ Language: Handlebars
|
||||
Requires: xml.js
|
||||
Author: Robin Ward <robin.ward@gmail.com>
|
||||
Description: Matcher for Handlebars as well as EmberJS additions.
|
||||
Category: template
|
||||
*/
|
||||
|
||||
function(hljs) {
|
||||
|
||||
@@ -2,6 +2,7 @@
|
||||
Language: Haskell
|
||||
Author: Jeremy Hull <sourdrums@gmail.com>
|
||||
Contributors: Zena Treep <zena.treep@gmail.com>
|
||||
Category: functional
|
||||
*/
|
||||
|
||||
function(hljs) {
|
||||
|
||||
65
vendor/assets/javascripts/highlight_js/languages/haxe.js
vendored
Normal file
65
vendor/assets/javascripts/highlight_js/languages/haxe.js
vendored
Normal file
@@ -0,0 +1,65 @@
|
||||
/*
|
||||
Language: Haxe
|
||||
Author: Christopher Kaster <ikasoki@gmail.com> (Based on the actionscript.js language file by Alexander Myadzel)
|
||||
*/
|
||||
|
||||
function(hljs) {
|
||||
var IDENT_RE = '[a-zA-Z_$][a-zA-Z0-9_$]*';
|
||||
var IDENT_FUNC_RETURN_TYPE_RE = '([*]|[a-zA-Z_$][a-zA-Z0-9_$]*)';
|
||||
|
||||
return {
|
||||
aliases: ['hx'],
|
||||
keywords: {
|
||||
keyword: 'break callback case cast catch class continue default do dynamic else enum extends extern ' +
|
||||
'for function here if implements import in inline interface never new override package private ' +
|
||||
'public return static super switch this throw trace try typedef untyped using var while',
|
||||
literal: 'true false null'
|
||||
},
|
||||
contains: [
|
||||
hljs.APOS_STRING_MODE,
|
||||
hljs.QUOTE_STRING_MODE,
|
||||
hljs.C_LINE_COMMENT_MODE,
|
||||
hljs.C_BLOCK_COMMENT_MODE,
|
||||
hljs.C_NUMBER_MODE,
|
||||
{
|
||||
className: 'class',
|
||||
beginKeywords: 'class interface', end: '{', excludeEnd: true,
|
||||
contains: [
|
||||
{
|
||||
beginKeywords: 'extends implements'
|
||||
},
|
||||
hljs.TITLE_MODE
|
||||
]
|
||||
},
|
||||
{
|
||||
className: 'preprocessor',
|
||||
begin: '#', end: '$',
|
||||
keywords: 'if else elseif end error'
|
||||
},
|
||||
{
|
||||
className: 'function',
|
||||
beginKeywords: 'function', end: '[{;]', excludeEnd: true,
|
||||
illegal: '\\S',
|
||||
contains: [
|
||||
hljs.TITLE_MODE,
|
||||
{
|
||||
className: 'params',
|
||||
begin: '\\(', end: '\\)',
|
||||
contains: [
|
||||
hljs.APOS_STRING_MODE,
|
||||
hljs.QUOTE_STRING_MODE,
|
||||
hljs.C_LINE_COMMENT_MODE,
|
||||
hljs.C_BLOCK_COMMENT_MODE
|
||||
]
|
||||
},
|
||||
{
|
||||
className: 'type',
|
||||
begin: ':',
|
||||
end: IDENT_FUNC_RETURN_TYPE_RE,
|
||||
relevance: 10
|
||||
}
|
||||
]
|
||||
}
|
||||
]
|
||||
};
|
||||
}
|
||||
@@ -1,7 +1,8 @@
|
||||
/*
|
||||
Language: HTTP
|
||||
Description: HTTP request and response headers with automatic body highlighting
|
||||
Author: Ivan Sagalaev <maniac@softwaremaniacs.org>
|
||||
Language: HTTP
|
||||
Description: HTTP request and response headers with automatic body highlighting
|
||||
Author: Ivan Sagalaev <maniac@softwaremaniacs.org>
|
||||
Category: common, protocols
|
||||
*/
|
||||
|
||||
function(hljs) {
|
||||
|
||||
@@ -1,5 +1,6 @@
|
||||
/*
|
||||
Language: Ini
|
||||
Category: common, config
|
||||
*/
|
||||
|
||||
function(hljs) {
|
||||
|
||||
@@ -1,14 +1,25 @@
|
||||
/*
|
||||
Language: Java
|
||||
Author: Vsevolod Solovyov <vsevolod.solovyov@gmail.com>
|
||||
Category: common, enterprise
|
||||
*/
|
||||
|
||||
function(hljs) {
|
||||
var GENERIC_IDENT_RE = hljs.UNDERSCORE_IDENT_RE + '(<' + hljs.UNDERSCORE_IDENT_RE + '>)?';
|
||||
var KEYWORDS =
|
||||
'false synchronized int abstract float private char boolean static null if const ' +
|
||||
'for true while long throw strictfp finally protected import native final return void ' +
|
||||
'enum else break transient new catch instanceof byte super volatile case assert short ' +
|
||||
'package default double public try this switch continue throws';
|
||||
'for true while long strictfp finally protected import native final void ' +
|
||||
'enum else break transient catch instanceof byte super volatile case assert short ' +
|
||||
'package default double public try this switch continue throws protected public private';
|
||||
|
||||
// https://docs.oracle.com/javase/7/docs/technotes/guides/language/underscores-literals.html
|
||||
var JAVA_NUMBER_RE = '(\\b(0b[01_]+)|\\b0[xX][a-fA-F0-9_]+|(\\b[\\d_]+(\\.[\\d_]*)?|\\.[\\d_]+)([eE][-+]?\\d+)?)[lLfF]?'; // 0b..., 0x..., 0..., decimal, float
|
||||
var JAVA_NUMBER_MODE = {
|
||||
className: 'number',
|
||||
begin: JAVA_NUMBER_RE,
|
||||
relevance: 0
|
||||
};
|
||||
|
||||
return {
|
||||
aliases: ['jsp'],
|
||||
keywords: KEYWORDS,
|
||||
@@ -17,40 +28,59 @@ function(hljs) {
|
||||
{
|
||||
className: 'javadoc',
|
||||
begin: '/\\*\\*', end: '\\*/',
|
||||
relevance: 0,
|
||||
contains: [{
|
||||
className: 'javadoctag', begin: '(^|\\s)@[A-Za-z]+'
|
||||
}],
|
||||
relevance: 10
|
||||
}]
|
||||
},
|
||||
hljs.C_LINE_COMMENT_MODE,
|
||||
hljs.C_BLOCK_COMMENT_MODE,
|
||||
hljs.APOS_STRING_MODE,
|
||||
hljs.QUOTE_STRING_MODE,
|
||||
{
|
||||
beginKeywords: 'protected public private', end: /[{;=]/,
|
||||
className: 'class',
|
||||
beginKeywords: 'class interface', end: /[{;=]/, excludeEnd: true,
|
||||
keywords: 'class interface',
|
||||
illegal: /[:"\[\]]/,
|
||||
contains: [
|
||||
{beginKeywords: 'extends implements'},
|
||||
hljs.UNDERSCORE_TITLE_MODE
|
||||
]
|
||||
},
|
||||
{
|
||||
// Expression keywords prevent 'keyword Name(...)' from being
|
||||
// recognized as a function definition
|
||||
beginKeywords: 'new throw return',
|
||||
relevance: 0
|
||||
},
|
||||
{
|
||||
className: 'function',
|
||||
begin: '(' + GENERIC_IDENT_RE + '\\s+)+' + hljs.UNDERSCORE_IDENT_RE + '\\s*\\(', returnBegin: true, end: /[{;=]/,
|
||||
excludeEnd: true,
|
||||
keywords: KEYWORDS,
|
||||
contains: [
|
||||
{
|
||||
className: 'class',
|
||||
beginKeywords: 'class interface', endsWithParent: true, excludeEnd: true,
|
||||
illegal: /[:"\[\]]/,
|
||||
contains: [
|
||||
{
|
||||
beginKeywords: 'extends implements',
|
||||
relevance: 10
|
||||
},
|
||||
hljs.UNDERSCORE_TITLE_MODE
|
||||
]
|
||||
begin: hljs.UNDERSCORE_IDENT_RE + '\\s*\\(', returnBegin: true,
|
||||
relevance: 0,
|
||||
contains: [hljs.UNDERSCORE_TITLE_MODE]
|
||||
},
|
||||
{
|
||||
begin: hljs.UNDERSCORE_IDENT_RE + '\\s*\\(', returnBegin: true,
|
||||
className: 'params',
|
||||
begin: /\(/, end: /\)/,
|
||||
keywords: KEYWORDS,
|
||||
relevance: 0,
|
||||
contains: [
|
||||
hljs.UNDERSCORE_TITLE_MODE
|
||||
hljs.APOS_STRING_MODE,
|
||||
hljs.QUOTE_STRING_MODE,
|
||||
hljs.C_NUMBER_MODE,
|
||||
hljs.C_BLOCK_COMMENT_MODE
|
||||
]
|
||||
}
|
||||
},
|
||||
hljs.C_LINE_COMMENT_MODE,
|
||||
hljs.C_BLOCK_COMMENT_MODE
|
||||
]
|
||||
},
|
||||
hljs.C_NUMBER_MODE,
|
||||
JAVA_NUMBER_MODE,
|
||||
{
|
||||
className: 'annotation', begin: '@[A-Za-z]+'
|
||||
}
|
||||
|
||||
@@ -1,5 +1,6 @@
|
||||
/*
|
||||
Language: JavaScript
|
||||
Category: common, scripting
|
||||
*/
|
||||
|
||||
function(hljs) {
|
||||
@@ -24,8 +25,11 @@ function(hljs) {
|
||||
contains: [
|
||||
{
|
||||
className: 'pi',
|
||||
begin: /^\s*('|")use strict('|")/,
|
||||
relevance: 10
|
||||
relevance: 10,
|
||||
variants: [
|
||||
{begin: /^\s*('|")use strict('|")/},
|
||||
{begin: /^\s*('|")use asm('|")/}
|
||||
]
|
||||
},
|
||||
hljs.APOS_STRING_MODE,
|
||||
hljs.QUOTE_STRING_MODE,
|
||||
|
||||
@@ -1,6 +1,7 @@
|
||||
/*
|
||||
Language: JSON
|
||||
Author: Ivan Sagalaev <maniac@softwaremaniacs.org>
|
||||
Category: common, protocols
|
||||
*/
|
||||
|
||||
function(hljs) {
|
||||
|
||||
165
vendor/assets/javascripts/highlight_js/languages/julia.js
vendored
Normal file
165
vendor/assets/javascripts/highlight_js/languages/julia.js
vendored
Normal file
@@ -0,0 +1,165 @@
|
||||
/*
|
||||
Language: Julia
|
||||
Author: Kenta Sato <bicycle1885@gmail.com>
|
||||
*/
|
||||
|
||||
function(hljs) {
|
||||
// Since there are numerous special names in Julia, it is too much trouble
|
||||
// to maintain them by hand. Hence these names (i.e. keywords, literals and
|
||||
// built-ins) are automatically generated from Julia (v0.3.0) itself through
|
||||
// following scripts for each.
|
||||
|
||||
var KEYWORDS = {
|
||||
// # keyword generator
|
||||
// println("\"in\",")
|
||||
// for kw in Base.REPLCompletions.complete_keyword("")
|
||||
// println("\"$kw\",")
|
||||
// end
|
||||
keyword:
|
||||
'in abstract baremodule begin bitstype break catch ccall const continue do else elseif end export ' +
|
||||
'finally for function global if immutable import importall let local macro module quote return try type ' +
|
||||
'typealias using while',
|
||||
|
||||
// # literal generator
|
||||
// println("\"true\",\n\"false\"")
|
||||
// for name in Base.REPLCompletions.completions("", 0)[1]
|
||||
// try
|
||||
// s = symbol(name)
|
||||
// v = eval(s)
|
||||
// if !isa(v, Function) &&
|
||||
// !isa(v, DataType) &&
|
||||
// !issubtype(typeof(v), Tuple) &&
|
||||
// !isa(v, UnionType) &&
|
||||
// !isa(v, Module) &&
|
||||
// !isa(v, TypeConstructor) &&
|
||||
// !isa(v, Colon)
|
||||
// println("\"$name\",")
|
||||
// end
|
||||
// end
|
||||
// end
|
||||
literal:
|
||||
'true false ANY ARGS CPU_CORES C_NULL DL_LOAD_PATH DevNull ENDIAN_BOM ENV I|0 Inf Inf16 Inf32 ' +
|
||||
'InsertionSort JULIA_HOME LOAD_PATH MS_ASYNC MS_INVALIDATE MS_SYNC MergeSort NaN NaN16 NaN32 OS_NAME QuickSort ' +
|
||||
'RTLD_DEEPBIND RTLD_FIRST RTLD_GLOBAL RTLD_LAZY RTLD_LOCAL RTLD_NODELETE RTLD_NOLOAD RTLD_NOW RoundDown ' +
|
||||
'RoundFromZero RoundNearest RoundToZero RoundUp STDERR STDIN STDOUT VERSION WORD_SIZE catalan cglobal e eu ' +
|
||||
'eulergamma golden im nothing pi γ π φ',
|
||||
|
||||
// # built_in generator:
|
||||
// for name in Base.REPLCompletions.completions("", 0)[1]
|
||||
// try
|
||||
// v = eval(symbol(name))
|
||||
// if isa(v, DataType)
|
||||
// println("\"$name\",")
|
||||
// end
|
||||
// end
|
||||
// end
|
||||
built_in:
|
||||
'ASCIIString AbstractArray AbstractRNG AbstractSparseArray Any ArgumentError Array Associative Base64Pipe ' +
|
||||
'Bidiagonal BigFloat BigInt BitArray BitMatrix BitVector Bool BoundsError Box CFILE Cchar Cdouble Cfloat Char ' +
|
||||
'CharString Cint Clong Clonglong ClusterManager Cmd Coff_t Colon Complex Complex128 Complex32 Complex64 ' +
|
||||
'Condition Cptrdiff_t Cshort Csize_t Cssize_t Cuchar Cuint Culong Culonglong Cushort Cwchar_t DArray DataType ' +
|
||||
'DenseArray Diagonal Dict DimensionMismatch DirectIndexString Display DivideError DomainError EOFError ' +
|
||||
'EachLine Enumerate ErrorException Exception Expr Factorization FileMonitor FileOffset Filter Float16 Float32 ' +
|
||||
'Float64 FloatRange FloatingPoint Function GetfieldNode GotoNode Hermitian IO IOBuffer IOStream IPv4 IPv6 ' +
|
||||
'InexactError Int Int128 Int16 Int32 Int64 Int8 IntSet Integer InterruptException IntrinsicFunction KeyError ' +
|
||||
'LabelNode LambdaStaticData LineNumberNode LoadError LocalProcess MIME MathConst MemoryError MersenneTwister ' +
|
||||
'Method MethodError MethodTable Module NTuple NewvarNode Nothing Number ObjectIdDict OrdinalRange ' +
|
||||
'OverflowError ParseError PollingFileWatcher ProcessExitedException ProcessGroup Ptr QuoteNode Range Range1 ' +
|
||||
'Ranges Rational RawFD Real Regex RegexMatch RemoteRef RepString RevString RopeString RoundingMode Set ' +
|
||||
'SharedArray Signed SparseMatrixCSC StackOverflowError Stat StatStruct StepRange String SubArray SubString ' +
|
||||
'SymTridiagonal Symbol SymbolNode Symmetric SystemError Task TextDisplay Timer TmStruct TopNode Triangular ' +
|
||||
'Tridiagonal Type TypeConstructor TypeError TypeName TypeVar UTF16String UTF32String UTF8String UdpSocket ' +
|
||||
'Uint Uint128 Uint16 Uint32 Uint64 Uint8 UndefRefError UndefVarError UniformScaling UnionType UnitRange ' +
|
||||
'Unsigned Vararg VersionNumber WString WeakKeyDict WeakRef Woodbury Zip'
|
||||
};
|
||||
|
||||
// ref: http://julia.readthedocs.org/en/latest/manual/variables/#allowed-variable-names
|
||||
var VARIABLE_NAME_RE = "[A-Za-z_\\u00A1-\\uFFFF][A-Za-z_0-9\\u00A1-\\uFFFF]*";
|
||||
|
||||
// placeholder for recursive self-reference
|
||||
var DEFAULT = { lexemes: VARIABLE_NAME_RE, keywords: KEYWORDS };
|
||||
|
||||
var TYPE_ANNOTATION = {
|
||||
className: "type-annotation",
|
||||
begin: /::/
|
||||
};
|
||||
|
||||
var SUBTYPE = {
|
||||
className: "subtype",
|
||||
begin: /<:/
|
||||
};
|
||||
|
||||
// ref: http://julia.readthedocs.org/en/latest/manual/integers-and-floating-point-numbers/
|
||||
var NUMBER = {
|
||||
className: "number",
|
||||
// supported numeric literals:
|
||||
// * binary literal (e.g. 0x10)
|
||||
// * octal literal (e.g. 0o76543210)
|
||||
// * hexadecimal literal (e.g. 0xfedcba876543210)
|
||||
// * hexadecimal floating point literal (e.g. 0x1p0, 0x1.2p2)
|
||||
// * decimal literal (e.g. 9876543210, 100_000_000)
|
||||
// * floating pointe literal (e.g. 1.2, 1.2f, .2, 1., 1.2e10, 1.2e-10)
|
||||
begin: /(\b0x[\d_]*(\.[\d_]*)?|0x\.\d[\d_]*)p[-+]?\d+|\b0[box][a-fA-F0-9][a-fA-F0-9_]*|(\b\d[\d_]*(\.[\d_]*)?|\.\d[\d_]*)([eEfF][-+]?\d+)?/,
|
||||
relevance: 0
|
||||
};
|
||||
|
||||
var CHAR = {
|
||||
className: "char",
|
||||
begin: /'(.|\\[xXuU][a-zA-Z0-9]+)'/
|
||||
};
|
||||
|
||||
var INTERPOLATION = {
|
||||
className: 'subst',
|
||||
begin: /\$\(/, end: /\)/,
|
||||
keywords: KEYWORDS
|
||||
};
|
||||
|
||||
var INTERPOLATED_VARIABLE = {
|
||||
className: 'variable',
|
||||
begin: "\\$" + VARIABLE_NAME_RE
|
||||
};
|
||||
|
||||
// TODO: neatly escape normal code in string literal
|
||||
var STRING = {
|
||||
className: "string",
|
||||
contains: [hljs.BACKSLASH_ESCAPE, INTERPOLATION, INTERPOLATED_VARIABLE],
|
||||
variants: [
|
||||
{ begin: /\w*"/, end: /"\w*/ },
|
||||
{ begin: /\w*"""/, end: /"""\w*/ }
|
||||
]
|
||||
};
|
||||
|
||||
var COMMAND = {
|
||||
className: "string",
|
||||
contains: [hljs.BACKSLASH_ESCAPE, INTERPOLATION, INTERPOLATED_VARIABLE],
|
||||
begin: '`', end: '`'
|
||||
};
|
||||
|
||||
var MACROCALL = {
|
||||
className: "macrocall",
|
||||
begin: "@" + VARIABLE_NAME_RE
|
||||
};
|
||||
|
||||
var COMMENT = {
|
||||
className: "comment",
|
||||
variants: [
|
||||
{ begin: "#=", end: "=#", relevance: 10 },
|
||||
{ begin: '#', end: '$' }
|
||||
]
|
||||
};
|
||||
|
||||
DEFAULT.contains = [
|
||||
NUMBER,
|
||||
CHAR,
|
||||
TYPE_ANNOTATION,
|
||||
SUBTYPE,
|
||||
STRING,
|
||||
COMMAND,
|
||||
MACROCALL,
|
||||
COMMENT,
|
||||
hljs.HASH_COMMENT_MODE
|
||||
];
|
||||
INTERPOLATION.contains = DEFAULT.contains;
|
||||
|
||||
return DEFAULT;
|
||||
}
|
||||
@@ -14,8 +14,8 @@ function(hljs) {
|
||||
'bw nbw ew new cn ncn lt lte gt gte eq neq rx nrx ft',
|
||||
built_in:
|
||||
'array date decimal duration integer map pair string tag xml null ' +
|
||||
'bytes list queue set stack staticarray tie local var variable ' +
|
||||
'global data self inherited',
|
||||
'boolean bytes keyword list locale queue set stack staticarray ' +
|
||||
'local var variable global data self inherited',
|
||||
keyword:
|
||||
'error_code error_msg error_pop error_push error_reset cache ' +
|
||||
'database_names database_schemanames database_tablenames define_tag ' +
|
||||
@@ -48,7 +48,7 @@ function(hljs) {
|
||||
className: 'markup',
|
||||
end: '\\[/noprocess\\]',
|
||||
returnEnd: true,
|
||||
contains: [ HTML_COMMENT ]
|
||||
contains: [HTML_COMMENT]
|
||||
}
|
||||
};
|
||||
var LASSO_START = {
|
||||
@@ -63,10 +63,11 @@ function(hljs) {
|
||||
hljs.C_LINE_COMMENT_MODE,
|
||||
{
|
||||
className: 'javadoc',
|
||||
begin: '/\\*\\*!', end: '\\*/'
|
||||
begin: '/\\*\\*!', end: '\\*/',
|
||||
contains: [hljs.PHRASAL_WORDS_MODE]
|
||||
},
|
||||
hljs.C_BLOCK_COMMENT_MODE,
|
||||
hljs.inherit(hljs.C_NUMBER_MODE, {begin: hljs.C_NUMBER_RE + '|-?(infinity|nan)\\b'}),
|
||||
hljs.inherit(hljs.C_NUMBER_MODE, {begin: hljs.C_NUMBER_RE + '|(-?infinity|nan)\\b'}),
|
||||
hljs.inherit(hljs.APOS_STRING_MODE, {illegal: null}),
|
||||
hljs.inherit(hljs.QUOTE_STRING_MODE, {illegal: null}),
|
||||
{
|
||||
@@ -93,8 +94,13 @@ function(hljs) {
|
||||
{
|
||||
className: 'attribute',
|
||||
variants: [
|
||||
{begin: '(\\.\\.\\.)' + hljs.UNDERSCORE_IDENT_RE},
|
||||
{begin: '-' + hljs.UNDERSCORE_IDENT_RE, relevance: 0}
|
||||
{
|
||||
begin: '-' + hljs.UNDERSCORE_IDENT_RE,
|
||||
relevance: 0
|
||||
},
|
||||
{
|
||||
begin: '(\\.\\.\\.)'
|
||||
}
|
||||
]
|
||||
},
|
||||
{
|
||||
@@ -102,7 +108,7 @@ function(hljs) {
|
||||
variants: [
|
||||
{
|
||||
begin: '->\\s*',
|
||||
contains: [ LASSO_DATAMEMBER ]
|
||||
contains: [LASSO_DATAMEMBER]
|
||||
},
|
||||
{
|
||||
begin: ':=|/(?!\\w)=?|[-+*%=<>&|!?\\\\]+',
|
||||
@@ -112,9 +118,9 @@ function(hljs) {
|
||||
},
|
||||
{
|
||||
className: 'built_in',
|
||||
begin: '\\.\\.?',
|
||||
begin: '\\.\\.?\\s*',
|
||||
relevance: 0,
|
||||
contains: [ LASSO_DATAMEMBER ]
|
||||
contains: [LASSO_DATAMEMBER]
|
||||
},
|
||||
{
|
||||
className: 'class',
|
||||
@@ -140,7 +146,7 @@ function(hljs) {
|
||||
end: '\\[|' + LASSO_ANGLE_RE,
|
||||
returnEnd: true,
|
||||
relevance: 0,
|
||||
contains: [ HTML_COMMENT ]
|
||||
contains: [HTML_COMMENT]
|
||||
}
|
||||
},
|
||||
LASSO_NOPROCESS,
|
||||
@@ -159,9 +165,9 @@ function(hljs) {
|
||||
relevance: 0,
|
||||
starts: {
|
||||
className: 'markup',
|
||||
end: LASSO_ANGLE_RE,
|
||||
end: '\\[noprocess\\]|' + LASSO_ANGLE_RE,
|
||||
returnEnd: true,
|
||||
contains: [ HTML_COMMENT ]
|
||||
contains: [HTML_COMMENT]
|
||||
}
|
||||
},
|
||||
LASSO_NOPROCESS,
|
||||
|
||||
142
vendor/assets/javascripts/highlight_js/languages/less.js
vendored
Normal file
142
vendor/assets/javascripts/highlight_js/languages/less.js
vendored
Normal file
@@ -0,0 +1,142 @@
|
||||
/*
|
||||
Language: Less
|
||||
Author: Max Mikhailov <seven.phases.max@gmail.com>
|
||||
Category: css
|
||||
*/
|
||||
|
||||
function(hljs) {
|
||||
var IDENT_RE = '[\\w-]+'; // yes, Less identifiers may begin with a digit
|
||||
var INTERP_IDENT_RE = '(' + IDENT_RE + '|@{' + IDENT_RE + '})';
|
||||
|
||||
/* Generic Modes */
|
||||
|
||||
var RULES = [], VALUE = []; // forward def. for recursive modes
|
||||
|
||||
var STRING_MODE = function(c) { return {
|
||||
// Less strings are not multiline (also include '~' for more consistent coloring of "escaped" strings)
|
||||
className: 'string', begin: '~?' + c + '.*?' + c
|
||||
};};
|
||||
|
||||
var IDENT_MODE = function(name, begin, relevance) { return {
|
||||
className: name, begin: begin, relevance: relevance
|
||||
};};
|
||||
|
||||
var FUNCT_MODE = function(name, ident, obj) {
|
||||
return hljs.inherit({
|
||||
className: name, begin: ident + '\\(', end: '\\(',
|
||||
returnBegin: true, excludeEnd: true, relevance: 0
|
||||
}, obj);
|
||||
};
|
||||
|
||||
var PARENS_MODE = {
|
||||
// used only to properly balance nested parens inside mixin call, def. arg list
|
||||
begin: '\\(', end: '\\)', contains: VALUE, relevance: 0
|
||||
};
|
||||
|
||||
// generic Less highlighter (used almost everywhere except selectors):
|
||||
VALUE.push(
|
||||
hljs.C_LINE_COMMENT_MODE,
|
||||
hljs.C_BLOCK_COMMENT_MODE,
|
||||
STRING_MODE("'"),
|
||||
STRING_MODE('"'),
|
||||
hljs.CSS_NUMBER_MODE, // fixme: it does not include dot for numbers like .5em :(
|
||||
IDENT_MODE('hexcolor', '#[0-9A-Fa-f]+\\b'),
|
||||
FUNCT_MODE('function', '(url|data-uri)', {
|
||||
starts: {className: 'string', end: '[\\)\\n]', excludeEnd: true}
|
||||
}),
|
||||
FUNCT_MODE('function', IDENT_RE),
|
||||
PARENS_MODE,
|
||||
IDENT_MODE('variable', '@@?' + IDENT_RE, 10),
|
||||
IDENT_MODE('variable', '@{' + IDENT_RE + '}'),
|
||||
IDENT_MODE('built_in', '~?`[^`]*?`'), // inline javascript (or whatever host language) *multiline* string
|
||||
{ // @media features (it’s here to not duplicate things in AT_RULE_MODE with extra PARENS_MODE overriding):
|
||||
className: 'attribute', begin: IDENT_RE + '\\s*:', end: ':', returnBegin: true, excludeEnd: true
|
||||
}
|
||||
);
|
||||
|
||||
var VALUE_WITH_RULESETS = VALUE.concat({
|
||||
begin: '{', end: '}', contains: RULES
|
||||
});
|
||||
|
||||
var MIXIN_GUARD_MODE = {
|
||||
beginKeywords: 'when', endsWithParent: true,
|
||||
contains: [{beginKeywords: 'and not'}].concat(VALUE) // using this form to override VALUE’s 'function' match
|
||||
};
|
||||
|
||||
/* Rule-Level Modes */
|
||||
|
||||
var RULE_MODE = {
|
||||
className: 'attribute',
|
||||
begin: INTERP_IDENT_RE, end: ':', excludeEnd: true,
|
||||
contains: [hljs.C_LINE_COMMENT_MODE, hljs.C_BLOCK_COMMENT_MODE],
|
||||
illegal: /\S/,
|
||||
starts: {end: '[;}]', returnEnd: true, contains: VALUE, illegal: '[<=$]'}
|
||||
};
|
||||
|
||||
var AT_RULE_MODE = {
|
||||
className: 'at_rule', // highlight only at-rule keyword
|
||||
begin: '@(import|media|charset|font-face|(-[a-z]+-)?keyframes|supports|document|namespace|page|viewport|host)\\b',
|
||||
starts: {end: '[;{}]', returnEnd: true, contains: VALUE, relevance: 0}
|
||||
};
|
||||
|
||||
// variable definitions and calls
|
||||
var VAR_RULE_MODE = {
|
||||
className: 'variable',
|
||||
variants: [
|
||||
// using more strict pattern for higher relevance to increase chances of Less detection.
|
||||
// this is *the only* Less specific statement used in most of the sources, so...
|
||||
// (we’ll still often loose to the css-parser unless there's '//' comment,
|
||||
// simply because 1 variable just can't beat 99 properties :)
|
||||
{begin: '@' + IDENT_RE + '\\s*:', relevance: 15},
|
||||
{begin: '@' + IDENT_RE}
|
||||
],
|
||||
starts: {end: '[;}]', returnEnd: true, contains: VALUE_WITH_RULESETS}
|
||||
};
|
||||
|
||||
var SELECTOR_MODE = {
|
||||
// first parse unambiguous selectors (i.e. those not starting with tag)
|
||||
// then fall into the scary lookahead-discriminator variant.
|
||||
// this mode also handles mixin definitions and calls
|
||||
variants: [{
|
||||
begin: '[\\.#:&\\[]', end: '[;{}]' // mixin calls end with ';'
|
||||
}, {
|
||||
begin: INTERP_IDENT_RE + '[^;]*{',
|
||||
end: '{'
|
||||
}],
|
||||
returnBegin: true,
|
||||
returnEnd: true,
|
||||
illegal: '[<=\'$"]',
|
||||
contains: [
|
||||
hljs.C_LINE_COMMENT_MODE,
|
||||
hljs.C_BLOCK_COMMENT_MODE,
|
||||
MIXIN_GUARD_MODE,
|
||||
IDENT_MODE('keyword', 'all\\b'),
|
||||
IDENT_MODE('variable', '@{' + IDENT_RE + '}'), // otherwise it’s identified as tag
|
||||
IDENT_MODE('tag', INTERP_IDENT_RE + '%?', 0), // '%' for more consistent coloring of @keyframes "tags"
|
||||
IDENT_MODE('id', '#' + INTERP_IDENT_RE),
|
||||
IDENT_MODE('class', '\\.' + INTERP_IDENT_RE, 0),
|
||||
IDENT_MODE('keyword', '&', 0),
|
||||
FUNCT_MODE('pseudo', ':not'),
|
||||
FUNCT_MODE('keyword', ':extend'),
|
||||
IDENT_MODE('pseudo', '::?' + INTERP_IDENT_RE),
|
||||
{className: 'attr_selector', begin: '\\[', end: '\\]'},
|
||||
{begin: '\\(', end: '\\)', contains: VALUE_WITH_RULESETS}, // argument list of parametric mixins
|
||||
{begin: '!important'} // eat !important after mixin call or it will be colored as tag
|
||||
]
|
||||
};
|
||||
|
||||
RULES.push(
|
||||
hljs.C_LINE_COMMENT_MODE,
|
||||
hljs.C_BLOCK_COMMENT_MODE,
|
||||
AT_RULE_MODE,
|
||||
VAR_RULE_MODE,
|
||||
SELECTOR_MODE,
|
||||
RULE_MODE
|
||||
);
|
||||
|
||||
return {
|
||||
case_insensitive: true,
|
||||
illegal: '[=>\'/<($"]',
|
||||
contains: RULES
|
||||
};
|
||||
}
|
||||
@@ -2,10 +2,12 @@
|
||||
Language: Lisp
|
||||
Description: Generic lisp syntax
|
||||
Author: Vasily Polovnyov <vast@whiteants.net>
|
||||
Category: lisp
|
||||
*/
|
||||
|
||||
function(hljs) {
|
||||
var LISP_IDENT_RE = '[a-zA-Z_\\-\\+\\*\\/\\<\\=\\>\\&\\#][a-zA-Z0-9_\\-\\+\\*\\/\\<\\=\\>\\&\\#!]*';
|
||||
var MEC_RE = '\\|[^]*?\\|';
|
||||
var LISP_SIMPLE_NUMBER_RE = '(\\-|\\+)?\\d+(\\.\\d+|\\/\\d+)?((d|e|f|l|s)(\\+|\\-)?\\d+)?';
|
||||
var SHEBANG = {
|
||||
className: 'shebang',
|
||||
@@ -28,7 +30,7 @@ function(hljs) {
|
||||
var STRING = hljs.inherit(hljs.QUOTE_STRING_MODE, {illegal: null});
|
||||
var COMMENT = {
|
||||
className: 'comment',
|
||||
begin: ';', end: '$'
|
||||
begin: ';', end: '$', relevance: 0
|
||||
};
|
||||
var VARIABLE = {
|
||||
className: 'variable',
|
||||
@@ -38,6 +40,9 @@ function(hljs) {
|
||||
className: 'keyword',
|
||||
begin: '[:&]' + LISP_IDENT_RE
|
||||
};
|
||||
var MEC = {
|
||||
begin: MEC_RE
|
||||
};
|
||||
var QUOTED_LIST = {
|
||||
begin: '\\(', end: '\\)',
|
||||
contains: ['self', LITERAL, STRING, NUMBER]
|
||||
@@ -51,7 +56,10 @@ function(hljs) {
|
||||
},
|
||||
{
|
||||
begin: '\\(quote ', end: '\\)',
|
||||
keywords: {title: 'quote'}
|
||||
keywords: 'quote'
|
||||
},
|
||||
{
|
||||
begin: '\'' + MEC_RE
|
||||
}
|
||||
]
|
||||
};
|
||||
@@ -67,8 +75,17 @@ function(hljs) {
|
||||
endsWithParent: true,
|
||||
relevance: 0
|
||||
};
|
||||
LIST.contains = [{className: 'title', begin: LISP_IDENT_RE}, BODY];
|
||||
BODY.contains = [QUOTED, QUOTED_ATOM, LIST, LITERAL, NUMBER, STRING, COMMENT, VARIABLE, KEYWORD];
|
||||
LIST.contains = [
|
||||
{
|
||||
className: 'keyword',
|
||||
variants: [
|
||||
{begin: LISP_IDENT_RE},
|
||||
{begin: MEC_RE}
|
||||
]
|
||||
},
|
||||
BODY
|
||||
];
|
||||
BODY.contains = [QUOTED, QUOTED_ATOM, LIST, LITERAL, NUMBER, STRING, COMMENT, VARIABLE, KEYWORD, MEC];
|
||||
|
||||
return {
|
||||
illegal: /\S/,
|
||||
|
||||
@@ -1,9 +1,10 @@
|
||||
/*
|
||||
Language: LiveCode server and revIgniter
|
||||
Language: LiveCode
|
||||
Author: Ralf Bitter <rabit@revigniter.com>
|
||||
Description: Language definition for LiveCode server accounting for revIgniter (a web application framework) characteristics.
|
||||
Version: 1.0a
|
||||
Date: 2013-06-03
|
||||
Category: enterprise
|
||||
*/
|
||||
|
||||
function(hljs) {
|
||||
@@ -35,8 +36,10 @@ function(hljs) {
|
||||
case_insensitive: false,
|
||||
keywords: {
|
||||
keyword:
|
||||
'$_COOKIE $_FILES $_GET $_GET_BINARY $_GET_RAW $_POST $_POST_BINARY $_POST_RAW $_SESSION $_SERVER ' +
|
||||
'codepoint codepoints segment segments codeunit codeunits sentence sentences trueWord trueWords paragraph ' +
|
||||
'after byte bytes english the until http forever descending using line real8 with seventh ' +
|
||||
'for stdout finally element word fourth before black ninth sixth characters chars stderr ' +
|
||||
'for stdout finally element word words fourth before black ninth sixth characters chars stderr ' +
|
||||
'uInt1 uInt1s uInt2 uInt2s stdin string lines relative rel any fifth items from middle mid ' +
|
||||
'at else of catch then third it file milliseconds seconds second secs sec int1 int1s int4 ' +
|
||||
'int4s internet int2 int2s normal text item last long detailed effective uInt4 uInt4s repeat ' +
|
||||
@@ -54,18 +57,20 @@ function(hljs) {
|
||||
'div mod wrap and or bitAnd bitNot bitOr bitXor among not in a an within ' +
|
||||
'contains ends with begins the keys of keys',
|
||||
built_in:
|
||||
'put abs acos aliasReference annuity arrayDecode arrayEncode asin atan atan2 average avg base64Decode ' +
|
||||
'base64Encode baseConvert binaryDecode binaryEncode byteToNum cachedURL cachedURLs charToNum ' +
|
||||
'cipherNames commandNames compound compress constantNames cos date dateFormat decompress directories ' +
|
||||
'diskSpace DNSServers exp exp1 exp2 exp10 extents files flushEvents folders format functionNames global ' +
|
||||
'globals hasMemory hostAddress hostAddressToName hostName hostNameToAddress isNumber ISOToMac itemOffset ' +
|
||||
'put abs acos aliasReference annuity arrayDecode arrayEncode asin atan atan2 average avg avgDev base64Decode ' +
|
||||
'base64Encode baseConvert binaryDecode binaryEncode byteOffset byteToNum cachedURL cachedURLs charToNum ' +
|
||||
'cipherNames codepointOffset codepointProperty codepointToNum codeunitOffset commandNames compound compress ' +
|
||||
'constantNames cos date dateFormat decompress directories ' +
|
||||
'diskSpace DNSServers exp exp1 exp2 exp10 extents files flushEvents folders format functionNames geometricMean global ' +
|
||||
'globals hasMemory harmonicMean hostAddress hostAddressToName hostName hostNameToAddress isNumber ISOToMac itemOffset ' +
|
||||
'keys len length libURLErrorData libUrlFormData libURLftpCommand libURLLastHTTPHeaders libURLLastRHHeaders ' +
|
||||
'libUrlMultipartFormAddPart libUrlMultipartFormData libURLVersion lineOffset ln ln1 localNames log log2 log10 ' +
|
||||
'longFilePath lower macToISO matchChunk matchText matrixMultiply max md5Digest median merge millisec ' +
|
||||
'millisecs millisecond milliseconds min monthNames num number numToByte numToChar offset open openfiles ' +
|
||||
'openProcesses openProcessIDs openSockets paramCount param params peerAddress pendingMessages platform ' +
|
||||
'processID random randomBytes replaceText result revCreateXMLTree revCreateXMLTreeFromFile revCurrentRecord ' +
|
||||
'revCurrentRecordIsFirst revCurrentRecordIsLast revDatabaseColumnCount revDatabaseColumnIsNull ' +
|
||||
'millisecs millisecond milliseconds min monthNames nativeCharToNum normalizeText num number numToByte numToChar ' +
|
||||
'numToCodepoint numToNativeChar offset open openfiles openProcesses openProcessIDs openSockets ' +
|
||||
'paragraphOffset paramCount param params peerAddress pendingMessages platform popStdDev populationStandardDeviation ' +
|
||||
'populationVariance popVariance processID random randomBytes replaceText result revCreateXMLTree revCreateXMLTreeFromFile ' +
|
||||
'revCurrentRecord revCurrentRecordIsFirst revCurrentRecordIsLast revDatabaseColumnCount revDatabaseColumnIsNull ' +
|
||||
'revDatabaseColumnLengths revDatabaseColumnNames revDatabaseColumnNamed revDatabaseColumnNumbered ' +
|
||||
'revDatabaseColumnTypes revDatabaseConnectResult revDatabaseCursors revDatabaseID revDatabaseTableNames ' +
|
||||
'revDatabaseType revDataFromQuery revdb_closeCursor revdb_columnbynumber revdb_columncount revdb_columnisnull ' +
|
||||
@@ -74,24 +79,26 @@ function(hljs) {
|
||||
'revdb_disconnect revdb_execute revdb_iseof revdb_isbof revdb_movefirst revdb_movelast revdb_movenext ' +
|
||||
'revdb_moveprev revdb_query revdb_querylist revdb_recordcount revdb_rollback revdb_tablenames ' +
|
||||
'revGetDatabaseDriverPath revNumberOfRecords revOpenDatabase revOpenDatabases revQueryDatabase ' +
|
||||
'revQueryDatabaseBlob revQueryResult revQueryIsAtStart revQueryIsAtEnd revUnixFromMacPath ' +
|
||||
'revXMLAttribute revXMLAttributes revXMLAttributeValues revXMLChildContents revXMLChildNames ' +
|
||||
'revXMLFirstChild revXMLMatchingNode revXMLNextSibling revXMLNodeContents revXMLNumberOfChildren ' +
|
||||
'revXMLParent revXMLPreviousSibling revXMLRootNode revXMLRPC_CreateRequest revXMLRPC_Documents ' +
|
||||
'revXMLRPC_Error revXMLRPC_Execute revXMLRPC_GetHost revXMLRPC_GetMethod revXMLRPC_GetParam revXMLText ' +
|
||||
'revQueryDatabaseBlob revQueryResult revQueryIsAtStart revQueryIsAtEnd revUnixFromMacPath revXMLAttribute ' +
|
||||
'revXMLAttributes revXMLAttributeValues revXMLChildContents revXMLChildNames revXMLCreateTreeFromFileWithNamespaces ' +
|
||||
'revXMLCreateTreeWithNamespaces revXMLDataFromXPathQuery revXMLEvaluateXPath revXMLFirstChild revXMLMatchingNode ' +
|
||||
'revXMLNextSibling revXMLNodeContents revXMLNumberOfChildren revXMLParent revXMLPreviousSibling ' +
|
||||
'revXMLRootNode revXMLRPC_CreateRequest revXMLRPC_Documents revXMLRPC_Error ' +
|
||||
'revXMLRPC_GetHost revXMLRPC_GetMethod revXMLRPC_GetParam revXMLText revXMLRPC_Execute ' +
|
||||
'revXMLRPC_GetParamCount revXMLRPC_GetParamNode revXMLRPC_GetParamType revXMLRPC_GetPath revXMLRPC_GetPort ' +
|
||||
'revXMLRPC_GetProtocol revXMLRPC_GetRequest revXMLRPC_GetResponse revXMLRPC_GetSocket revXMLTree ' +
|
||||
'revXMLTrees revXMLValidateDTD revZipDescribeItem revZipEnumerateItems revZipOpenArchives round ' +
|
||||
'sec secs seconds sha1Digest shell shortFilePath sin specialFolderPath sqrt standardDeviation statRound ' +
|
||||
'stdDev sum sysError systemVersion tan tempName tick ticks time to toLower toUpper transpose trunc ' +
|
||||
'uniDecode uniEncode upper URLDecode URLEncode URLStatus value variableNames version waitDepth weekdayNames wordOffset ' +
|
||||
'add breakpoint cancel clear local variable file word line folder directory URL close socket process ' +
|
||||
'revXMLTrees revXMLValidateDTD revZipDescribeItem revZipEnumerateItems revZipOpenArchives round sampVariance ' +
|
||||
'sec secs seconds sentenceOffset sha1Digest shell shortFilePath sin specialFolderPath sqrt standardDeviation statRound ' +
|
||||
'stdDev sum sysError systemVersion tan tempName textDecode textEncode tick ticks time to tokenOffset toLower toUpper ' +
|
||||
'transpose truewordOffset trunc uniDecode uniEncode upper URLDecode URLEncode URLStatus uuid value variableNames ' +
|
||||
'variance version waitDepth weekdayNames wordOffset xsltApplyStylesheet xsltApplyStylesheetFromFile xsltLoadStylesheet ' +
|
||||
'xsltLoadStylesheetFromFile add breakpoint cancel clear local variable file word line folder directory URL close socket process ' +
|
||||
'combine constant convert create new alias folder directory decrypt delete variable word line folder ' +
|
||||
'directory URL dispatch divide do encrypt filter get include intersect kill libURLDownloadToFile ' +
|
||||
'libURLFollowHttpRedirects libURLftpUpload libURLftpUploadFile libURLresetAll libUrlSetAuthCallback ' +
|
||||
'libURLSetCustomHTTPHeaders libUrlSetExpect100 libURLSetFTPListCommand libURLSetFTPMode libURLSetFTPStopTime ' +
|
||||
'libURLSetStatusCallback load multiply socket process post seek rel relative read from process rename ' +
|
||||
'replace require resetAll revAddXMLNode revAppendXML revCloseCursor revCloseDatabase revCommitDatabase ' +
|
||||
'libURLSetStatusCallback load multiply socket prepare process post seek rel relative read from process rename ' +
|
||||
'replace require resetAll resolve revAddXMLNode revAppendXML revCloseCursor revCloseDatabase revCommitDatabase ' +
|
||||
'revCopyFile revCopyFolder revCopyXMLNode revDeleteFolder revDeleteXMLNode revDeleteAllXMLTrees ' +
|
||||
'revDeleteXMLTree revExecuteSQL revGoURL revInsertXMLNode revMoveFolder revMoveToFirstRecord revMoveToLastRecord ' +
|
||||
'revMoveToNextRecord revMoveToPreviousRecord revMoveToRecord revMoveXMLNode revPutIntoXMLNode revRollBackDatabase ' +
|
||||
@@ -100,7 +107,7 @@ function(hljs) {
|
||||
'revXMLRPC_SetMethod revXMLRPC_SetPort revXMLRPC_SetProtocol revXMLRPC_SetSocket revZipAddItemWithData ' +
|
||||
'revZipAddItemWithFile revZipAddUncompressedItemWithData revZipAddUncompressedItemWithFile revZipCancel ' +
|
||||
'revZipCloseArchive revZipDeleteItem revZipExtractItemToFile revZipExtractItemToVariable revZipSetProgressCallback ' +
|
||||
'revZipRenameItem revZipReplaceItemWithData revZipReplaceItemWithFile revZipOpenArchive send set sort split ' +
|
||||
'revZipRenameItem revZipReplaceItemWithData revZipReplaceItemWithFile revZipOpenArchive send set sort split start stop ' +
|
||||
'subtract union unload wait write'
|
||||
},
|
||||
contains: [
|
||||
|
||||
162
vendor/assets/javascripts/highlight_js/languages/livescript.js
vendored
Normal file
162
vendor/assets/javascripts/highlight_js/languages/livescript.js
vendored
Normal file
@@ -0,0 +1,162 @@
|
||||
/*
|
||||
Language: LiveScript
|
||||
Author: Taneli Vatanen <taneli.vatanen@gmail.com>
|
||||
Contributors: Jen Evers-Corvina <jen@sevvie.net>
|
||||
Origin: coffeescript.js
|
||||
Description: LiveScript is a programming language that transcompiles to JavaScript. For info about language see http://livescript.net/
|
||||
Category: scripting
|
||||
*/
|
||||
|
||||
function(hljs) {
|
||||
var KEYWORDS = {
|
||||
keyword:
|
||||
// JS keywords
|
||||
'in if for while finally new do return else break catch instanceof throw try this ' +
|
||||
'switch continue typeof delete debugger case default function var with ' +
|
||||
// LiveScript keywords
|
||||
'then unless until loop of by when and or is isnt not it that otherwise from to til fallthrough super ' +
|
||||
'case default function var void const let enum export import native ' +
|
||||
'__hasProp __extends __slice __bind __indexOf',
|
||||
literal:
|
||||
// JS literals
|
||||
'true false null undefined ' +
|
||||
// LiveScript literals
|
||||
'yes no on off it that void',
|
||||
built_in:
|
||||
'npm require console print module global window document'
|
||||
};
|
||||
var JS_IDENT_RE = '[A-Za-z$_](?:\-[0-9A-Za-z$_]|[0-9A-Za-z$_])*';
|
||||
var TITLE = hljs.inherit(hljs.TITLE_MODE, {begin: JS_IDENT_RE});
|
||||
var SUBST = {
|
||||
className: 'subst',
|
||||
begin: /#\{/, end: /}/,
|
||||
keywords: KEYWORDS
|
||||
};
|
||||
var SUBST_SIMPLE = {
|
||||
className: 'subst',
|
||||
begin: /#[A-Za-z$_]/, end: /(?:\-[0-9A-Za-z$_]|[0-9A-Za-z$_])*/,
|
||||
keywords: KEYWORDS
|
||||
};
|
||||
var EXPRESSIONS = [
|
||||
hljs.BINARY_NUMBER_MODE,
|
||||
{
|
||||
className: 'number',
|
||||
begin: '(\\b0[xX][a-fA-F0-9_]+)|(\\b\\d(\\d|_\\d)*(\\.(\\d(\\d|_\\d)*)?)?(_*[eE]([-+]\\d(_\\d|\\d)*)?)?[_a-z]*)',
|
||||
relevance: 0,
|
||||
starts: {end: '(\\s*/)?', relevance: 0} // a number tries to eat the following slash to prevent treating it as a regexp
|
||||
},
|
||||
{
|
||||
className: 'string',
|
||||
variants: [
|
||||
{
|
||||
begin: /'''/, end: /'''/,
|
||||
contains: [hljs.BACKSLASH_ESCAPE]
|
||||
},
|
||||
{
|
||||
begin: /'/, end: /'/,
|
||||
contains: [hljs.BACKSLASH_ESCAPE]
|
||||
},
|
||||
{
|
||||
begin: /"""/, end: /"""/,
|
||||
contains: [hljs.BACKSLASH_ESCAPE, SUBST, SUBST_SIMPLE]
|
||||
},
|
||||
{
|
||||
begin: /"/, end: /"/,
|
||||
contains: [hljs.BACKSLASH_ESCAPE, SUBST, SUBST_SIMPLE]
|
||||
},
|
||||
{
|
||||
begin: /\\/, end: /(\s|$)/,
|
||||
excludeEnd: true
|
||||
}
|
||||
]
|
||||
},
|
||||
{
|
||||
className: 'pi',
|
||||
variants: [
|
||||
{
|
||||
begin: '//', end: '//[gim]*',
|
||||
contains: [SUBST, hljs.HASH_COMMENT_MODE]
|
||||
},
|
||||
{
|
||||
// regex can't start with space to parse x / 2 / 3 as two divisions
|
||||
// regex can't start with *, and it supports an "illegal" in the main mode
|
||||
begin: /\/(?![ *])(\\\/|.)*?\/[gim]*(?=\W|$)/
|
||||
}
|
||||
]
|
||||
},
|
||||
{
|
||||
className: 'property',
|
||||
begin: '@' + JS_IDENT_RE
|
||||
},
|
||||
{
|
||||
begin: '``', end: '``',
|
||||
excludeBegin: true, excludeEnd: true,
|
||||
subLanguage: 'javascript'
|
||||
}
|
||||
];
|
||||
SUBST.contains = EXPRESSIONS;
|
||||
|
||||
var PARAMS = {
|
||||
className: 'params',
|
||||
begin: '\\(', returnBegin: true,
|
||||
/* We need another contained nameless mode to not have every nested
|
||||
pair of parens to be called "params" */
|
||||
contains: [
|
||||
{
|
||||
begin: /\(/, end: /\)/,
|
||||
keywords: KEYWORDS,
|
||||
contains: ['self'].concat(EXPRESSIONS)
|
||||
}
|
||||
]
|
||||
};
|
||||
|
||||
return {
|
||||
aliases: ['ls'],
|
||||
keywords: KEYWORDS,
|
||||
illegal: /\/\*/,
|
||||
contains: EXPRESSIONS.concat([
|
||||
{
|
||||
className: 'comment',
|
||||
begin: '\\/\\*', end: '\\*\\/'
|
||||
},
|
||||
hljs.HASH_COMMENT_MODE,
|
||||
{
|
||||
className: 'function',
|
||||
contains: [TITLE, PARAMS],
|
||||
returnBegin: true,
|
||||
variants: [
|
||||
{
|
||||
begin: '(' + JS_IDENT_RE + '\\s*(?:=|:=)\\s*)?(\\(.*\\))?\\s*\\B\\->\\*?', end: '\\->\\*?'
|
||||
},
|
||||
{
|
||||
begin: '(' + JS_IDENT_RE + '\\s*(?:=|:=)\\s*)?!?(\\(.*\\))?\\s*\\B[-~]{1,2}>\\*?', end: '[-~]{1,2}>\\*?'
|
||||
},
|
||||
{
|
||||
begin: '(' + JS_IDENT_RE + '\\s*(?:=|:=)\\s*)?(\\(.*\\))?\\s*\\B!?[-~]{1,2}>\\*?', end: '!?[-~]{1,2}>\\*?'
|
||||
}
|
||||
]
|
||||
},
|
||||
{
|
||||
className: 'class',
|
||||
beginKeywords: 'class',
|
||||
end: '$',
|
||||
illegal: /[:="\[\]]/,
|
||||
contains: [
|
||||
{
|
||||
beginKeywords: 'extends',
|
||||
endsWithParent: true,
|
||||
illegal: /[:="\[\]]/,
|
||||
contains: [TITLE]
|
||||
},
|
||||
TITLE
|
||||
]
|
||||
},
|
||||
{
|
||||
className: 'attribute',
|
||||
begin: JS_IDENT_RE + ':', end: ':',
|
||||
returnBegin: true, returnEnd: true,
|
||||
relevance: 0
|
||||
}
|
||||
])
|
||||
};
|
||||
}
|
||||
@@ -1,6 +1,7 @@
|
||||
/*
|
||||
Language: Lua
|
||||
Author: Andrew Fedorov <dmmdrs@mail.ru>
|
||||
Category: scripting
|
||||
*/
|
||||
|
||||
function(hljs) {
|
||||
@@ -54,7 +55,7 @@ function(hljs) {
|
||||
className: 'string',
|
||||
begin: OPENING_LONG_BRACKET, end: CLOSING_LONG_BRACKET,
|
||||
contains: [LONG_BRACKETS],
|
||||
relevance: 10
|
||||
relevance: 5
|
||||
}
|
||||
])
|
||||
};
|
||||
|
||||
@@ -1,6 +1,7 @@
|
||||
/*
|
||||
Language: Makefile
|
||||
Author: Ivan Sagalaev <maniac@softwaremaniacs.org>
|
||||
Category: common
|
||||
*/
|
||||
|
||||
function(hljs) {
|
||||
@@ -39,6 +40,7 @@ function(hljs) {
|
||||
},
|
||||
{
|
||||
begin: /^\t+/, end: /$/,
|
||||
relevance: 0,
|
||||
contains: [
|
||||
hljs.QUOTE_STRING_MODE,
|
||||
VARIABLE
|
||||
|
||||
@@ -3,6 +3,7 @@ Language: Markdown
|
||||
Requires: xml.js
|
||||
Author: John Crepezzi <john.crepezzi@gmail.com>
|
||||
Website: http://seejohncode.com/
|
||||
Category: common
|
||||
*/
|
||||
|
||||
function(hljs) {
|
||||
@@ -65,7 +66,7 @@ function(hljs) {
|
||||
},
|
||||
// using links - title and link
|
||||
{
|
||||
begin: '\\[.+?\\][\\(\\[].+?[\\)\\]]',
|
||||
begin: '\\[.+?\\][\\(\\[].*?[\\)\\]]',
|
||||
returnBegin: true,
|
||||
contains: [
|
||||
{
|
||||
@@ -89,17 +90,17 @@ function(hljs) {
|
||||
relevance: 10
|
||||
},
|
||||
{
|
||||
begin: '^\\[\.+\\]:', end: '$',
|
||||
begin: '^\\[\.+\\]:',
|
||||
returnBegin: true,
|
||||
contains: [
|
||||
{
|
||||
className: 'link_reference',
|
||||
begin: '\\[', end: '\\]',
|
||||
excludeBegin: true, excludeEnd: true
|
||||
},
|
||||
{
|
||||
className: 'link_url',
|
||||
begin: '\\s', end: '$'
|
||||
begin: '\\[', end: '\\]:',
|
||||
excludeBegin: true, excludeEnd: true,
|
||||
starts: {
|
||||
className: 'link_url',
|
||||
end: '$'
|
||||
}
|
||||
}
|
||||
]
|
||||
}
|
||||
|
||||
@@ -1,6 +1,7 @@
|
||||
/*
|
||||
Language: Mathematica
|
||||
Author: Daniel Kvasnicka <dkvasnicka@vendavo.com>
|
||||
Category: scientific
|
||||
*/
|
||||
|
||||
function(hljs) {
|
||||
|
||||
@@ -2,6 +2,7 @@
|
||||
Language: Matlab
|
||||
Author: Denis Bardadym <bardadymchik@gmail.com>
|
||||
Contributors: Eugene Nizhibitsky <nizhibitsky@ya.ru>
|
||||
Category: scientific
|
||||
*/
|
||||
|
||||
function(hljs) {
|
||||
@@ -13,6 +14,14 @@ function(hljs) {
|
||||
contains: [hljs.BACKSLASH_ESCAPE, {begin: '\'\''}]
|
||||
}
|
||||
];
|
||||
var TRANSPOSE = {
|
||||
relevance: 0,
|
||||
contains: [
|
||||
{
|
||||
className: 'operator', begin: /'['\.]*/
|
||||
}
|
||||
]
|
||||
};
|
||||
|
||||
return {
|
||||
keywords: {
|
||||
@@ -53,25 +62,38 @@ function(hljs) {
|
||||
]
|
||||
},
|
||||
{
|
||||
className: 'transposed_variable',
|
||||
begin: '[a-zA-Z_][a-zA-Z_0-9]*(\'+[\\.\']*|[\\.\']+)', end: '',
|
||||
relevance: 0
|
||||
begin: /[a-zA-Z_][a-zA-Z_0-9]*'['\.]*/,
|
||||
returnBegin: true,
|
||||
relevance: 0,
|
||||
contains: [
|
||||
{begin: /[a-zA-Z_][a-zA-Z_0-9]*/, relevance: 0},
|
||||
TRANSPOSE.contains[0]
|
||||
]
|
||||
},
|
||||
{
|
||||
className: 'matrix',
|
||||
begin: '\\[', end: '\\]\'*[\\.\']*',
|
||||
begin: '\\[', end: '\\]',
|
||||
contains: COMMON_CONTAINS,
|
||||
relevance: 0
|
||||
relevance: 0,
|
||||
starts: TRANSPOSE
|
||||
},
|
||||
{
|
||||
className: 'cell',
|
||||
begin: '\\{',
|
||||
begin: '\\{', end: /}/,
|
||||
contains: COMMON_CONTAINS,
|
||||
illegal: /:/,
|
||||
variants: [
|
||||
{end: /\}'[\.']*/},
|
||||
{end: /\}/, relevance: 0}
|
||||
]
|
||||
relevance: 0,
|
||||
starts: TRANSPOSE
|
||||
},
|
||||
{
|
||||
// transpose operators at the end of a function call
|
||||
begin: /\)/,
|
||||
relevance: 0,
|
||||
starts: TRANSPOSE
|
||||
},
|
||||
{
|
||||
// Block comment
|
||||
className: 'comment',
|
||||
begin: '^\\s*\\%\\{\\s*$', end: '^\\s*\\%\\}\\s*$'
|
||||
},
|
||||
{
|
||||
className: 'comment',
|
||||
|
||||
@@ -2,6 +2,7 @@
|
||||
Language: MEL
|
||||
Description: Maya Embedded Language
|
||||
Author: Shuen-Huei Guan <drake.guan@gmail.com>
|
||||
Category: graphics
|
||||
*/
|
||||
|
||||
function(hljs) {
|
||||
|
||||
94
vendor/assets/javascripts/highlight_js/languages/mercury.js
vendored
Normal file
94
vendor/assets/javascripts/highlight_js/languages/mercury.js
vendored
Normal file
@@ -0,0 +1,94 @@
|
||||
/*
|
||||
Language: Mercury
|
||||
Author: mucaho <mkucko@gmail.com>
|
||||
Description: Mercury is a logic/functional programming language which combines the clarity and expressiveness of declarative programming with advanced static analysis and error detection features.
|
||||
*/
|
||||
|
||||
function(hljs) {
|
||||
var KEYWORDS = {
|
||||
keyword:
|
||||
'module use_module import_module include_module end_module initialise ' +
|
||||
'mutable initialize finalize finalise interface implementation pred ' +
|
||||
'mode func type inst solver any_pred any_func is semidet det nondet ' +
|
||||
'multi erroneous failure cc_nondet cc_multi typeclass instance where ' +
|
||||
'pragma promise external trace atomic or_else require_complete_switch ' +
|
||||
'require_det require_semidet require_multi require_nondet ' +
|
||||
'require_cc_multi require_cc_nondet require_erroneous require_failure',
|
||||
pragma:
|
||||
'inline no_inline type_spec source_file fact_table obsolete memo ' +
|
||||
'loop_check minimal_model terminates does_not_terminate ' +
|
||||
'check_termination promise_equivalent_clauses',
|
||||
preprocessor:
|
||||
'foreign_proc foreign_decl foreign_code foreign_type ' +
|
||||
'foreign_import_module foreign_export_enum foreign_export ' +
|
||||
'foreign_enum may_call_mercury will_not_call_mercury thread_safe ' +
|
||||
'not_thread_safe maybe_thread_safe promise_pure promise_semipure ' +
|
||||
'tabled_for_io local untrailed trailed attach_to_io_state ' +
|
||||
'can_pass_as_mercury_type stable will_not_throw_exception ' +
|
||||
'may_modify_trail will_not_modify_trail may_duplicate ' +
|
||||
'may_not_duplicate affects_liveness does_not_affect_liveness ' +
|
||||
'doesnt_affect_liveness no_sharing unknown_sharing sharing',
|
||||
built_in:
|
||||
'some all not if then else true fail false try catch catch_any ' +
|
||||
'semidet_true semidet_false semidet_fail impure_true impure semipure'
|
||||
};
|
||||
|
||||
var TODO = {
|
||||
className: 'label',
|
||||
begin: 'XXX', end: '$', endsWithParent: true,
|
||||
relevance: 0
|
||||
};
|
||||
var COMMENT = hljs.inherit(hljs.C_LINE_COMMENT_MODE, {begin: '%'});
|
||||
var CCOMMENT = hljs.inherit(hljs.C_BLOCK_COMMENT_MODE, {relevance: 0});
|
||||
COMMENT.contains.push(TODO);
|
||||
CCOMMENT.contains.push(TODO);
|
||||
|
||||
var NUMCODE = {
|
||||
className: 'number',
|
||||
begin: "0'.\\|0[box][0-9a-fA-F]*"
|
||||
};
|
||||
|
||||
var ATOM = hljs.inherit(hljs.APOS_STRING_MODE, {relevance: 0});
|
||||
var STRING = hljs.inherit(hljs.QUOTE_STRING_MODE, {relevance: 0});
|
||||
var STRING_FMT = {
|
||||
className: 'constant',
|
||||
begin: '\\\\[abfnrtv]\\|\\\\x[0-9a-fA-F]*\\\\\\|%[-+# *.0-9]*[dioxXucsfeEgGp]',
|
||||
relevance: 0
|
||||
};
|
||||
STRING.contains.push(STRING_FMT);
|
||||
|
||||
var IMPLICATION = {
|
||||
className: 'built_in',
|
||||
variants: [
|
||||
{begin: '<=>'},
|
||||
{begin: '<=', relevance: 0},
|
||||
{begin: '=>', relevance: 0},
|
||||
{begin: '/\\\\'},
|
||||
{begin: '\\\\/'}
|
||||
]
|
||||
};
|
||||
|
||||
var HEAD_BODY_CONJUNCTION = {
|
||||
className: 'built_in',
|
||||
variants: [
|
||||
{begin: ':-\\|-->'},
|
||||
{begin: '=', relevance: 0}
|
||||
]
|
||||
};
|
||||
|
||||
return {
|
||||
aliases: ['m', 'moo'],
|
||||
keywords: KEYWORDS,
|
||||
contains: [
|
||||
IMPLICATION,
|
||||
HEAD_BODY_CONJUNCTION,
|
||||
COMMENT,
|
||||
CCOMMENT,
|
||||
NUMCODE,
|
||||
hljs.NUMBER_MODE,
|
||||
ATOM,
|
||||
STRING,
|
||||
{begin: /:-/} // relevance booster
|
||||
]
|
||||
};
|
||||
}
|
||||
@@ -1,23 +1,26 @@
|
||||
/*
|
||||
Language: Mizar
|
||||
Author: Kelley van Evert <kelleyvanevert@gmail.com>
|
||||
Language: Mizar
|
||||
Author: Kelley van Evert <kelleyvanevert@gmail.com>
|
||||
Category: scientific
|
||||
*/
|
||||
|
||||
function(hljs) {
|
||||
return {
|
||||
keywords: [
|
||||
"environ vocabularies notations constructors definitions registrations theorems schemes requirements",
|
||||
"begin end definition registration cluster existence pred func defpred deffunc theorem proof",
|
||||
"let take assume then thus hence ex for st holds consider reconsider such that and in provided of as from",
|
||||
"be being by means equals implies iff redefine define now not or attr is mode suppose per cases set",
|
||||
"thesis contradiction scheme reserve struct",
|
||||
"correctness compatibility coherence symmetry assymetry reflexivity irreflexivity",
|
||||
"connectedness uniqueness commutativity idempotence involutiveness projectivity"
|
||||
].join(" "),
|
||||
keywords:
|
||||
'environ vocabularies notations constructors definitions ' +
|
||||
'registrations theorems schemes requirements begin end definition ' +
|
||||
'registration cluster existence pred func defpred deffunc theorem ' +
|
||||
'proof let take assume then thus hence ex for st holds consider ' +
|
||||
'reconsider such that and in provided of as from be being by means ' +
|
||||
'equals implies iff redefine define now not or attr is mode ' +
|
||||
'suppose per cases set thesis contradiction scheme reserve struct ' +
|
||||
'correctness compatibility coherence symmetry assymetry ' +
|
||||
'reflexivity irreflexivity connectedness uniqueness commutativity ' +
|
||||
'idempotence involutiveness projectivity',
|
||||
contains: [
|
||||
{
|
||||
className: "comment",
|
||||
begin: "::", end: "$"
|
||||
className: 'comment',
|
||||
begin: '::', end: '$'
|
||||
}
|
||||
]
|
||||
};
|
||||
|
||||
@@ -5,14 +5,14 @@ Author: Arthur Bikmullin <devolonter@gmail.com>
|
||||
|
||||
function(hljs) {
|
||||
var NUMBER = {
|
||||
className: 'number', relevance: 0,
|
||||
variants: [
|
||||
{
|
||||
className: 'number',
|
||||
begin: '[$][a-fA-F0-9]+'
|
||||
},
|
||||
hljs.NUMBER_MODE
|
||||
]
|
||||
}
|
||||
};
|
||||
|
||||
return {
|
||||
case_insensitive: true,
|
||||
|
||||
@@ -2,6 +2,7 @@
|
||||
Language: Nginx
|
||||
Author: Peter Leonov <gojpeg@yandex.ru>
|
||||
Contributors: Ivan Sagalaev <maniac@softwaremaniacs.org>
|
||||
Category: common, config
|
||||
*/
|
||||
|
||||
function(hljs) {
|
||||
@@ -35,7 +36,8 @@ function(hljs) {
|
||||
},
|
||||
{
|
||||
className: 'url',
|
||||
begin: '([a-z]+):/', end: '\\s', endsWithParent: true, excludeEnd: true
|
||||
begin: '([a-z]+):/', end: '\\s', endsWithParent: true, excludeEnd: true,
|
||||
contains: [VAR]
|
||||
},
|
||||
{
|
||||
className: 'regexp',
|
||||
|
||||
58
vendor/assets/javascripts/highlight_js/languages/nimrod.js
vendored
Normal file
58
vendor/assets/javascripts/highlight_js/languages/nimrod.js
vendored
Normal file
@@ -0,0 +1,58 @@
|
||||
/*
|
||||
Language: Nimrod
|
||||
*/
|
||||
|
||||
function(hljs) {
|
||||
return {
|
||||
keywords: {
|
||||
keyword: 'addr and as asm bind block break|0 case|0 cast const|0 continue|0 converter discard distinct|10 div do elif else|0 end|0 enum|0 except export finally for from generic if|0 import|0 in include|0 interface is isnot|10 iterator|10 let|0 macro method|10 mixin mod nil not notin|10 object|0 of or out proc|10 ptr raise ref|10 return shl shr static template|10 try|0 tuple type|0 using|0 var|0 when while|0 with without xor yield',
|
||||
literal: 'shared guarded stdin stdout stderr result|10 true false'
|
||||
},
|
||||
contains: [ {
|
||||
className: 'decorator', // Actually pragma
|
||||
begin: /{\./,
|
||||
end: /\.}/,
|
||||
relevance: 10
|
||||
}, {
|
||||
className: 'string',
|
||||
begin: /[a-zA-Z]\w*"/,
|
||||
end: /"/,
|
||||
contains: [{begin: /""/}]
|
||||
}, {
|
||||
className: 'string',
|
||||
begin: /([a-zA-Z]\w*)?"""/,
|
||||
end: /"""/
|
||||
}, {
|
||||
className: 'string',
|
||||
begin: /"/,
|
||||
end: /"/,
|
||||
illegal: /\n/,
|
||||
contains: [{begin: /\\./}]
|
||||
}, {
|
||||
className: 'type',
|
||||
begin: /\b[A-Z]\w+\b/,
|
||||
relevance: 0
|
||||
}, {
|
||||
className: 'type',
|
||||
begin: /\b(int|int8|int16|int32|int64|uint|uint8|uint16|uint32|uint64|float|float32|float64|bool|char|string|cstring|pointer|expr|stmt|void|auto|any|range|array|openarray|varargs|seq|set|clong|culong|cchar|cschar|cshort|cint|csize|clonglong|cfloat|cdouble|clongdouble|cuchar|cushort|cuint|culonglong|cstringarray|semistatic)\b/
|
||||
}, {
|
||||
className: 'number',
|
||||
begin: /\b(0[xX][0-9a-fA-F][_0-9a-fA-F]*)('?[iIuU](8|16|32|64))?/,
|
||||
relevance: 0
|
||||
}, {
|
||||
className: 'number',
|
||||
begin: /\b(0o[0-7][_0-7]*)('?[iIuUfF](8|16|32|64))?/,
|
||||
relevance: 0
|
||||
}, {
|
||||
className: 'number',
|
||||
begin: /\b(0(b|B)[01][_01]*)('?[iIuUfF](8|16|32|64))?/,
|
||||
relevance: 0
|
||||
}, {
|
||||
className: 'number',
|
||||
begin: /\b(\d[_\d]*)('?[iIuUfF](8|16|32|64))?/,
|
||||
relevance: 0
|
||||
},
|
||||
hljs.HASH_COMMENT_MODE
|
||||
]
|
||||
}
|
||||
}
|
||||
@@ -15,7 +15,7 @@ function(hljs) {
|
||||
var ANTIQUOTE = {
|
||||
className: 'subst',
|
||||
begin: /\$\{/,
|
||||
end: /\}/,
|
||||
end: /}/,
|
||||
keywords: NIX_KEYWORDS
|
||||
};
|
||||
var ATTRS = {
|
||||
@@ -46,7 +46,7 @@ function(hljs) {
|
||||
SINGLE_QUOTE,
|
||||
DOUBLE_QUOTE,
|
||||
ATTRS
|
||||
];
|
||||
];
|
||||
ANTIQUOTE.contains = EXPRESSIONS;
|
||||
return {
|
||||
aliases: ["nixos"],
|
||||
|
||||
@@ -39,7 +39,7 @@ function(hljs) {
|
||||
var COMPILER ={
|
||||
// !compiler_flags
|
||||
className: 'constant',
|
||||
begin: '\\!(addincludedir|addplugindir|appendfile|cd|define|delfile|echo|else|endif|error|execute|finalize|getdllversionsystem|ifdef|ifmacrodef|ifmacrondef|ifndef|if|include|insertmacro|macroend|macro|packhdr|searchparse|searchreplace|tempfile|undef|verbose|warning)'
|
||||
begin: '\\!(addincludedir|addplugindir|appendfile|cd|define|delfile|echo|else|endif|error|execute|finalize|getdllversionsystem|ifdef|ifmacrodef|ifmacrondef|ifndef|if|include|insertmacro|macroend|macro|makensis|packhdr|searchparse|searchreplace|tempfile|undef|verbose|warning)'
|
||||
};
|
||||
|
||||
return {
|
||||
|
||||
@@ -1,7 +1,8 @@
|
||||
/*
|
||||
Language: Objective C
|
||||
Author: Valerii Hiora <valerii.hiora@gmail.com>
|
||||
Contributors: Angel G. Olloqui <angelgarcia.mail@gmail.com>
|
||||
Contributors: Angel G. Olloqui <angelgarcia.mail@gmail.com>, Matt Diephouse <matt@diephouse.com>
|
||||
Category: common
|
||||
*/
|
||||
|
||||
function(hljs) {
|
||||
@@ -11,14 +12,16 @@ function(hljs) {
|
||||
'unsigned long volatile static bool mutable if do return goto void ' +
|
||||
'enum else break extern asm case short default double register explicit ' +
|
||||
'signed typename this switch continue wchar_t inline readonly assign ' +
|
||||
'self synchronized id ' +
|
||||
'nonatomic super unichar IBOutlet IBAction strong weak ' +
|
||||
'readwrite self @synchronized id typeof ' +
|
||||
'nonatomic super unichar IBOutlet IBAction strong weak copy ' +
|
||||
'in out inout bycopy byref oneway __strong __weak __block __autoreleasing ' +
|
||||
'@private @protected @public @try @property @end @throw @catch @finally ' +
|
||||
'@synthesize @dynamic @selector @optional @required',
|
||||
'@autoreleasepool @synthesize @dynamic @selector @optional @required',
|
||||
literal:
|
||||
'false true FALSE TRUE nil YES NO NULL',
|
||||
'false true FALSE TRUE nil YES NO NULL',
|
||||
built_in:
|
||||
'NSString NSDictionary CGRect CGPoint UIButton UILabel UITextView UIWebView MKMapView ' +
|
||||
'NSString NSData NSDictionary CGRect CGPoint UIButton UILabel UITextView UIWebView MKMapView ' +
|
||||
'NSView NSViewController NSWindow NSWindowController NSSet NSUUID NSIndexSet ' +
|
||||
'UISegmentedControl NSObject UITableViewDelegate UITableViewDataSource NSThread ' +
|
||||
'UIActivityIndicator UITabbar UIToolBar UIBarButtonItem UIImageView NSAutoreleasePool ' +
|
||||
'UITableView BOOL NSInteger CGFloat NSException NSLog NSMutableString NSMutableArray ' +
|
||||
@@ -29,6 +32,7 @@ function(hljs) {
|
||||
'UIFont UIApplication NSNotFound NSNotificationCenter NSNotification ' +
|
||||
'UILocalNotification NSBundle NSFileManager NSTimeInterval NSDate NSCalendar ' +
|
||||
'NSUserDefaults UIWindow NSRange NSArray NSError NSURLRequest NSURLConnection ' +
|
||||
'NSURLSession NSURLSessionDataTask NSURLSessionDownloadTask NSURLSessionUploadTask NSURLResponse' +
|
||||
'UIInterfaceOrientation MPMoviePlayerController dispatch_once_t ' +
|
||||
'dispatch_queue_t dispatch_sync dispatch_async dispatch_once'
|
||||
};
|
||||
@@ -45,32 +49,31 @@ function(hljs) {
|
||||
hljs.QUOTE_STRING_MODE,
|
||||
{
|
||||
className: 'string',
|
||||
begin: '\'',
|
||||
end: '[^\\\\]\'',
|
||||
illegal: '[^\\\\][^\']'
|
||||
},
|
||||
|
||||
{
|
||||
className: 'preprocessor',
|
||||
begin: '#import',
|
||||
end: '$',
|
||||
contains: [
|
||||
{
|
||||
className: 'title',
|
||||
begin: '\"',
|
||||
end: '\"'
|
||||
},
|
||||
{
|
||||
className: 'title',
|
||||
begin: '<',
|
||||
end: '>'
|
||||
}
|
||||
variants: [
|
||||
{
|
||||
begin: '@"', end: '"',
|
||||
illegal: '\\n',
|
||||
contains: [hljs.BACKSLASH_ESCAPE]
|
||||
},
|
||||
{
|
||||
begin: '\'', end: '[^\\\\]\'',
|
||||
illegal: '[^\\\\][^\']'
|
||||
}
|
||||
]
|
||||
},
|
||||
{
|
||||
className: 'preprocessor',
|
||||
begin: '#',
|
||||
end: '$'
|
||||
end: '$',
|
||||
contains: [
|
||||
{
|
||||
className: 'title',
|
||||
variants: [
|
||||
{ begin: '\"', end: '\"' },
|
||||
{ begin: '<', end: '>' }
|
||||
]
|
||||
}
|
||||
]
|
||||
},
|
||||
{
|
||||
className: 'class',
|
||||
|
||||
@@ -1,49 +1,74 @@
|
||||
/*
|
||||
Language: OCaml
|
||||
Author: Mehdi Dogguy <mehdi@dogguy.org>
|
||||
Contributors: Nicolas Braud-Santoni <nicolas.braud-santoni@ens-cachan.fr>
|
||||
Contributors: Nicolas Braud-Santoni <nicolas.braud-santoni@ens-cachan.fr>, Mickael Delahaye <mickael.delahaye@gmail.com>
|
||||
Description: OCaml language definition.
|
||||
Category: functional
|
||||
*/
|
||||
function(hljs) {
|
||||
/* missing support for heredoc-like string (OCaml 4.0.2+) */
|
||||
return {
|
||||
aliases: ['ml'],
|
||||
keywords: {
|
||||
keyword:
|
||||
'and as assert asr begin class constraint do done downto else end ' +
|
||||
'exception external false for fun function functor if in include ' +
|
||||
'inherit initializer land lazy let lor lsl lsr lxor match method ' +
|
||||
'mod module mutable new object of open or private rec ref sig struct ' +
|
||||
'then to true try type val virtual when while with parser value',
|
||||
'exception external for fun function functor if in include ' +
|
||||
'inherit! inherit initializer land lazy let lor lsl lsr lxor match method!|10 method ' +
|
||||
'mod module mutable new object of open! open or private rec sig struct ' +
|
||||
'then to try type val! val virtual when while with ' +
|
||||
/* camlp4 */
|
||||
'parser value',
|
||||
built_in:
|
||||
'bool char float int list unit array exn option int32 int64 nativeint ' +
|
||||
'format4 format6 lazy_t in_channel out_channel string'
|
||||
/* built-in types */
|
||||
'array bool bytes char exn|5 float int int32 int64 list lazy_t|5 nativeint|5 string unit ' +
|
||||
/* (some) types in Pervasives */
|
||||
'in_channel out_channel ref',
|
||||
literal:
|
||||
'true false'
|
||||
},
|
||||
illegal: /\/\//,
|
||||
illegal: /\/\/|>>/,
|
||||
lexemes: '[a-z_]\\w*!?',
|
||||
contains: [
|
||||
{
|
||||
className: 'string',
|
||||
begin: '"""', end: '"""'
|
||||
className: 'literal',
|
||||
begin: '\\[(\\|\\|)?\\]|\\(\\)'
|
||||
},
|
||||
{
|
||||
className: 'comment',
|
||||
begin: '\\(\\*', end: '\\*\\)',
|
||||
contains: ['self']
|
||||
contains: ['self'],
|
||||
},
|
||||
{
|
||||
className: 'class',
|
||||
beginKeywords: 'type', end: '\\(|=|$', excludeEnd: true,
|
||||
contains: [
|
||||
hljs.UNDERSCORE_TITLE_MODE
|
||||
]
|
||||
{ /* type variable */
|
||||
className: 'symbol',
|
||||
begin: '\'[A-Za-z_](?!\')[\\w\']*'
|
||||
/* the grammar is ambiguous on how 'a'b should be interpreted but not the compiler */
|
||||
},
|
||||
{
|
||||
className: 'annotation',
|
||||
begin: '\\[<', end: '>\\]'
|
||||
{ /* polymorphic variant */
|
||||
className: 'tag',
|
||||
begin: '`[A-Z][\\w\']*'
|
||||
},
|
||||
hljs.C_BLOCK_COMMENT_MODE,
|
||||
hljs.inherit(hljs.APOS_STRING_MODE, {illegal: null}),
|
||||
{ /* module or constructor */
|
||||
className: 'type',
|
||||
begin: '\\b[A-Z][\\w\']*',
|
||||
relevance: 0
|
||||
},
|
||||
{ /* don't color identifiers, but safely catch all identifiers with '*/
|
||||
begin: '[a-z_]\\w*\'[\\w\']*'
|
||||
},
|
||||
hljs.inherit(hljs.APOS_STRING_MODE, {className: 'char', relevance: 0}),
|
||||
hljs.inherit(hljs.QUOTE_STRING_MODE, {illegal: null}),
|
||||
hljs.C_NUMBER_MODE
|
||||
{
|
||||
className: 'number',
|
||||
begin:
|
||||
'\\b(0[xX][a-fA-F0-9_]+[Lln]?|' +
|
||||
'0[oO][0-7_]+[Lln]?|' +
|
||||
'0[bB][01_]+[Lln]?|' +
|
||||
'[0-9][0-9_]*([Lln]|(\\.[0-9_]*)?([eE][-+]?[0-9_]+)?)?)',
|
||||
relevance: 0
|
||||
},
|
||||
{
|
||||
begin: /[-=]>/ // relevance booster
|
||||
}
|
||||
]
|
||||
}
|
||||
}
|
||||
|
||||
@@ -1,70 +1,70 @@
|
||||
/*
|
||||
Language: Oxygene
|
||||
Author: Carlo Kok <ck@remobjects.com>
|
||||
Description: Language definition for RemObjects Oxygene (http://www.remobjects.com)
|
||||
*/
|
||||
|
||||
function(hljs) {
|
||||
var OXYGENE_KEYWORDS = 'abstract add and array as asc aspect assembly async begin break block by case class concat const copy constructor continue '+
|
||||
'create default delegate desc distinct div do downto dynamic each else empty end ensure enum equals event except exit extension external false '+
|
||||
'final finalize finalizer finally flags for forward from function future global group has if implementation implements implies in index inherited '+
|
||||
'inline interface into invariants is iterator join locked locking loop matching method mod module namespace nested new nil not notify nullable of '+
|
||||
'old on operator or order out override parallel params partial pinned private procedure property protected public queryable raise read readonly '+
|
||||
'record reintroduce remove repeat require result reverse sealed select self sequence set shl shr skip static step soft take then to true try tuple '+
|
||||
'type union unit unsafe until uses using var virtual raises volatile where while with write xor yield await mapped deprecated stdcall cdecl pascal '+
|
||||
'register safecall overload library platform reference packed strict published autoreleasepool selector strong weak unretained';
|
||||
var CURLY_COMMENT = {
|
||||
className: 'comment',
|
||||
begin: '{', end: '}',
|
||||
relevance: 0
|
||||
};
|
||||
var PAREN_COMMENT = {
|
||||
className: 'comment',
|
||||
begin: '\\(\\*', end: '\\*\\)',
|
||||
relevance: 10
|
||||
};
|
||||
var STRING = {
|
||||
className: 'string',
|
||||
begin: '\'', end: '\'',
|
||||
contains: [{begin: '\'\''}]
|
||||
};
|
||||
var CHAR_STRING = {
|
||||
className: 'string', begin: '(#\\d+)+'
|
||||
};
|
||||
var FUNCTION = {
|
||||
className: 'function',
|
||||
beginKeywords: 'function constructor destructor procedure method', end: '[:;]',
|
||||
keywords: 'function constructor|10 destructor|10 procedure|10 method|10',
|
||||
contains: [
|
||||
hljs.TITLE_MODE,
|
||||
{
|
||||
className: 'params',
|
||||
begin: '\\(', end: '\\)',
|
||||
keywords: OXYGENE_KEYWORDS,
|
||||
contains: [STRING, CHAR_STRING]
|
||||
},
|
||||
CURLY_COMMENT, PAREN_COMMENT
|
||||
]
|
||||
};
|
||||
return {
|
||||
case_insensitive: true,
|
||||
keywords: OXYGENE_KEYWORDS,
|
||||
illegal: '("|\\$[G-Zg-z]|\\/\\*|</)',
|
||||
contains: [
|
||||
CURLY_COMMENT, PAREN_COMMENT, hljs.C_LINE_COMMENT_MODE,
|
||||
STRING, CHAR_STRING,
|
||||
hljs.NUMBER_MODE,
|
||||
FUNCTION,
|
||||
{
|
||||
className: 'class',
|
||||
begin: '=\\bclass\\b', end: 'end;',
|
||||
keywords: OXYGENE_KEYWORDS,
|
||||
contains: [
|
||||
STRING, CHAR_STRING,
|
||||
CURLY_COMMENT, PAREN_COMMENT, hljs.C_LINE_COMMENT_MODE,
|
||||
FUNCTION
|
||||
]
|
||||
}
|
||||
]
|
||||
};
|
||||
}
|
||||
/*
|
||||
Language: Oxygene
|
||||
Author: Carlo Kok <ck@remobjects.com>
|
||||
Description: Language definition for RemObjects Oxygene (http://www.remobjects.com)
|
||||
*/
|
||||
|
||||
function(hljs) {
|
||||
var OXYGENE_KEYWORDS = 'abstract add and array as asc aspect assembly async begin break block by case class concat const copy constructor continue '+
|
||||
'create default delegate desc distinct div do downto dynamic each else empty end ensure enum equals event except exit extension external false '+
|
||||
'final finalize finalizer finally flags for forward from function future global group has if implementation implements implies in index inherited '+
|
||||
'inline interface into invariants is iterator join locked locking loop matching method mod module namespace nested new nil not notify nullable of '+
|
||||
'old on operator or order out override parallel params partial pinned private procedure property protected public queryable raise read readonly '+
|
||||
'record reintroduce remove repeat require result reverse sealed select self sequence set shl shr skip static step soft take then to true try tuple '+
|
||||
'type union unit unsafe until uses using var virtual raises volatile where while with write xor yield await mapped deprecated stdcall cdecl pascal '+
|
||||
'register safecall overload library platform reference packed strict published autoreleasepool selector strong weak unretained';
|
||||
var CURLY_COMMENT = {
|
||||
className: 'comment',
|
||||
begin: '{', end: '}',
|
||||
relevance: 0
|
||||
};
|
||||
var PAREN_COMMENT = {
|
||||
className: 'comment',
|
||||
begin: '\\(\\*', end: '\\*\\)',
|
||||
relevance: 10
|
||||
};
|
||||
var STRING = {
|
||||
className: 'string',
|
||||
begin: '\'', end: '\'',
|
||||
contains: [{begin: '\'\''}]
|
||||
};
|
||||
var CHAR_STRING = {
|
||||
className: 'string', begin: '(#\\d+)+'
|
||||
};
|
||||
var FUNCTION = {
|
||||
className: 'function',
|
||||
beginKeywords: 'function constructor destructor procedure method', end: '[:;]',
|
||||
keywords: 'function constructor|10 destructor|10 procedure|10 method|10',
|
||||
contains: [
|
||||
hljs.TITLE_MODE,
|
||||
{
|
||||
className: 'params',
|
||||
begin: '\\(', end: '\\)',
|
||||
keywords: OXYGENE_KEYWORDS,
|
||||
contains: [STRING, CHAR_STRING]
|
||||
},
|
||||
CURLY_COMMENT, PAREN_COMMENT
|
||||
]
|
||||
};
|
||||
return {
|
||||
case_insensitive: true,
|
||||
keywords: OXYGENE_KEYWORDS,
|
||||
illegal: '("|\\$[G-Zg-z]|\\/\\*|</|=>|->)',
|
||||
contains: [
|
||||
CURLY_COMMENT, PAREN_COMMENT, hljs.C_LINE_COMMENT_MODE,
|
||||
STRING, CHAR_STRING,
|
||||
hljs.NUMBER_MODE,
|
||||
FUNCTION,
|
||||
{
|
||||
className: 'class',
|
||||
begin: '=\\bclass\\b', end: 'end;',
|
||||
keywords: OXYGENE_KEYWORDS,
|
||||
contains: [
|
||||
STRING, CHAR_STRING,
|
||||
CURLY_COMMENT, PAREN_COMMENT, hljs.C_LINE_COMMENT_MODE,
|
||||
FUNCTION
|
||||
]
|
||||
}
|
||||
]
|
||||
};
|
||||
}
|
||||
|
||||
@@ -2,6 +2,7 @@
|
||||
Language: Parser3
|
||||
Requires: xml.js
|
||||
Author: Oleg Volchkov <oleg@volchkov.net>
|
||||
Category: template
|
||||
*/
|
||||
|
||||
function(hljs) {
|
||||
|
||||
@@ -1,6 +1,7 @@
|
||||
/*
|
||||
Language: Perl
|
||||
Author: Peter Leonov <gojpeg@yandex.ru>
|
||||
Category: common
|
||||
*/
|
||||
|
||||
function(hljs) {
|
||||
@@ -36,8 +37,8 @@ function(hljs) {
|
||||
className: 'variable',
|
||||
variants: [
|
||||
{begin: /\$\d/},
|
||||
{begin: /[\$\%\@](\^\w\b|#\w+(\:\:\w+)*|{\w+}|\w+(\:\:\w*)*)/},
|
||||
{begin: /[\$\%\@][^\s\w{]/, relevance: 0}
|
||||
{begin: /[\$%@](\^\w\b|#\w+(::\w+)*|{\w+}|\w+(::\w*)*)/},
|
||||
{begin: /[\$%@][^\s\w{]/, relevance: 0}
|
||||
]
|
||||
};
|
||||
var COMMENT = {
|
||||
|
||||
58
vendor/assets/javascripts/highlight_js/languages/pf.js
vendored
Normal file
58
vendor/assets/javascripts/highlight_js/languages/pf.js
vendored
Normal file
@@ -0,0 +1,58 @@
|
||||
/*
|
||||
Language: pf
|
||||
Category: config
|
||||
Author: Peter Piwowarski <oldlaptop654@aol.com>
|
||||
Description: The pf.conf(5) format as of OpenBSD 5.6
|
||||
*/
|
||||
|
||||
function(hljs) {
|
||||
var MACRO = {
|
||||
className: 'variable',
|
||||
begin: /\$[\w\d#@][\w\d_]*/
|
||||
};
|
||||
var TABLE = {
|
||||
className: 'variable',
|
||||
begin: /</, end: />/
|
||||
};
|
||||
var QUOTE_STRING = {
|
||||
className: 'string',
|
||||
begin: /"/, end: /"/
|
||||
};
|
||||
|
||||
return {
|
||||
aliases: ['pf.conf'],
|
||||
lexemes: /[a-z0-9_<>-]+/,
|
||||
keywords: {
|
||||
built_in: /* block match pass are "actions" in pf.conf(5), the rest are
|
||||
* lexically similar top-level commands.
|
||||
*/
|
||||
'block match pass load anchor|5 antispoof|10 set table',
|
||||
keyword:
|
||||
'in out log quick on rdomain inet inet6 proto from port os to route' +
|
||||
'allow-opts divert-packet divert-reply divert-to flags group icmp-type' +
|
||||
'icmp6-type label once probability recieved-on rtable prio queue' +
|
||||
'tos tag tagged user keep fragment for os drop' +
|
||||
'af-to|10 binat-to|10 nat-to|10 rdr-to|10 bitmask least-stats random round-robin' +
|
||||
'source-hash static-port' +
|
||||
'dup-to reply-to route-to' +
|
||||
'parent bandwidth default min max qlimit' +
|
||||
'block-policy debug fingerprints hostid limit loginterface optimization' +
|
||||
'reassemble ruleset-optimization basic none profile skip state-defaults' +
|
||||
'state-policy timeout' +
|
||||
'const counters persist' +
|
||||
'no modulate synproxy state|5 floating if-bound no-sync pflow|10 sloppy' +
|
||||
'source-track global rule max-src-nodes max-src-states max-src-conn' +
|
||||
'max-src-conn-rate overload flush' +
|
||||
'scrub|5 max-mss min-ttl no-df|10 random-id',
|
||||
literal:
|
||||
'all any no-route self urpf-failed egress|5 unknown',
|
||||
},
|
||||
contains: [
|
||||
hljs.HASH_COMMENT_MODE,
|
||||
hljs.NUMBER_MODE,
|
||||
hljs.QUOTE_STRING_MODE,
|
||||
MACRO,
|
||||
TABLE,
|
||||
]
|
||||
};
|
||||
}
|
||||
@@ -2,11 +2,12 @@
|
||||
Language: PHP
|
||||
Author: Victor Karamzin <Victor.Karamzin@enterra-inc.com>
|
||||
Contributors: Evgeny Stepanischev <imbolk@gmail.com>, Ivan Sagalaev <maniac@softwaremaniacs.org>
|
||||
Category: common
|
||||
*/
|
||||
|
||||
function(hljs) {
|
||||
var VARIABLE = {
|
||||
className: 'variable', begin: '(\\$|->)+[a-zA-Z_\x7f-\xff][a-zA-Z0-9_\x7f-\xff]*'
|
||||
className: 'variable', begin: '\\$+[a-zA-Z_\x7f-\xff][a-zA-Z0-9_\x7f-\xff]*'
|
||||
};
|
||||
var PREPROCESSOR = {
|
||||
className: 'preprocessor', begin: /<\?(php)?|\?>/
|
||||
@@ -64,6 +65,10 @@ function(hljs) {
|
||||
},
|
||||
PREPROCESSOR,
|
||||
VARIABLE,
|
||||
{
|
||||
// swallow class members to avoid parsing them as keywords
|
||||
begin: /->+[a-zA-Z_\x7f-\xff][a-zA-Z0-9_\x7f-\xff]*/
|
||||
},
|
||||
{
|
||||
className: 'function',
|
||||
beginKeywords: 'function', end: /[;{]/, excludeEnd: true,
|
||||
@@ -88,10 +93,7 @@ function(hljs) {
|
||||
beginKeywords: 'class interface', end: '{', excludeEnd: true,
|
||||
illegal: /[:\(\$"]/,
|
||||
contains: [
|
||||
{
|
||||
beginKeywords: 'extends implements',
|
||||
relevance: 10
|
||||
},
|
||||
{beginKeywords: 'extends implements'},
|
||||
hljs.UNDERSCORE_TITLE_MODE
|
||||
]
|
||||
},
|
||||
|
||||
57
vendor/assets/javascripts/highlight_js/languages/powershell.js
vendored
Normal file
57
vendor/assets/javascripts/highlight_js/languages/powershell.js
vendored
Normal file
@@ -0,0 +1,57 @@
|
||||
/*
|
||||
Language: PowerShell
|
||||
Author: David Mohundro <david@mohundro.com>
|
||||
Contributors: Nicholas Blumhardt <nblumhardt@nblumhardt.com>
|
||||
*/
|
||||
|
||||
function(hljs) {
|
||||
var backtickEscape = {
|
||||
begin: '`[\\s\\S]',
|
||||
relevance: 0
|
||||
};
|
||||
var dollarEscape = {
|
||||
begin: '\\$\\$[\\s\\S]',
|
||||
relevance: 0
|
||||
};
|
||||
var VAR = {
|
||||
className: 'variable',
|
||||
variants: [
|
||||
{begin: /\$[\w\d][\w\d_:]*/}
|
||||
]
|
||||
};
|
||||
var QUOTE_STRING = {
|
||||
className: 'string',
|
||||
begin: /"/, end: /"/,
|
||||
contains: [
|
||||
backtickEscape,
|
||||
VAR,
|
||||
{
|
||||
className: 'variable',
|
||||
begin: /\$[A-z]/, end: /[^A-z]/
|
||||
}
|
||||
]
|
||||
};
|
||||
var APOS_STRING = {
|
||||
className: 'string',
|
||||
begin: /'/, end: /'/
|
||||
};
|
||||
|
||||
return {
|
||||
aliases: ['ps'],
|
||||
lexemes: /-?[A-z\.\-]+/,
|
||||
case_insensitive: true,
|
||||
keywords: {
|
||||
keyword: 'if else foreach return function do while until elseif begin for trap data dynamicparam end break throw param continue finally in switch exit filter try process catch',
|
||||
literal: '$null $true $false',
|
||||
built_in: 'Add-Content Add-History Add-Member Add-PSSnapin Clear-Content Clear-Item Clear-Item Property Clear-Variable Compare-Object ConvertFrom-SecureString Convert-Path ConvertTo-Html ConvertTo-SecureString Copy-Item Copy-ItemProperty Export-Alias Export-Clixml Export-Console Export-Csv ForEach-Object Format-Custom Format-List Format-Table Format-Wide Get-Acl Get-Alias Get-AuthenticodeSignature Get-ChildItem Get-Command Get-Content Get-Credential Get-Culture Get-Date Get-EventLog Get-ExecutionPolicy Get-Help Get-History Get-Host Get-Item Get-ItemProperty Get-Location Get-Member Get-PfxCertificate Get-Process Get-PSDrive Get-PSProvider Get-PSSnapin Get-Service Get-TraceSource Get-UICulture Get-Unique Get-Variable Get-WmiObject Group-Object Import-Alias Import-Clixml Import-Csv Invoke-Expression Invoke-History Invoke-Item Join-Path Measure-Command Measure-Object Move-Item Move-ItemProperty New-Alias New-Item New-ItemProperty New-Object New-PSDrive New-Service New-TimeSpan New-Variable Out-Default Out-File Out-Host Out-Null Out-Printer Out-String Pop-Location Push-Location Read-Host Remove-Item Remove-ItemProperty Remove-PSDrive Remove-PSSnapin Remove-Variable Rename-Item Rename-ItemProperty Resolve-Path Restart-Service Resume-Service Select-Object Select-String Set-Acl Set-Alias Set-AuthenticodeSignature Set-Content Set-Date Set-ExecutionPolicy Set-Item Set-ItemProperty Set-Location Set-PSDebug Set-Service Set-TraceSource Set-Variable Sort-Object Split-Path Start-Service Start-Sleep Start-Transcript Stop-Process Stop-Service Stop-Transcript Suspend-Service Tee-Object Test-Path Trace-Command Update-FormatData Update-TypeData Where-Object Write-Debug Write-Error Write-Host Write-Output Write-Progress Write-Verbose Write-Warning',
|
||||
operator: '-ne -eq -lt -gt -ge -le -not -like -notlike -match -notmatch -contains -notcontains -in -notin -replace'
|
||||
},
|
||||
contains: [
|
||||
hljs.HASH_COMMENT_MODE,
|
||||
hljs.NUMBER_MODE,
|
||||
QUOTE_STRING,
|
||||
APOS_STRING,
|
||||
VAR
|
||||
]
|
||||
};
|
||||
}
|
||||
53
vendor/assets/javascripts/highlight_js/languages/processing.js
vendored
Normal file
53
vendor/assets/javascripts/highlight_js/languages/processing.js
vendored
Normal file
@@ -0,0 +1,53 @@
|
||||
/*
|
||||
Language: Processing
|
||||
Author: Erik Paluka <erik.paluka@gmail.com>
|
||||
Category: graphics
|
||||
*/
|
||||
|
||||
function(hljs) {
|
||||
return {
|
||||
keywords: {
|
||||
keyword: 'BufferedReader PVector PFont PImage PGraphics HashMap boolean byte char color ' +
|
||||
'double float int long String Array FloatDict FloatList IntDict IntList JSONArray JSONObject ' +
|
||||
'Object StringDict StringList Table TableRow XML ' +
|
||||
// Java keywords
|
||||
'false synchronized int abstract float private char boolean static null if const ' +
|
||||
'for true while long throw strictfp finally protected import native final return void ' +
|
||||
'enum else break transient new catch instanceof byte super volatile case assert short ' +
|
||||
'package default double public try this switch continue throws protected public private',
|
||||
constant: 'P2D P3D HALF_PI PI QUARTER_PI TAU TWO_PI',
|
||||
variable: 'displayHeight displayWidth mouseY mouseX mousePressed pmouseX pmouseY key ' +
|
||||
'keyCode pixels focused frameCount frameRate height width',
|
||||
title: 'setup draw',
|
||||
built_in: 'size createGraphics beginDraw createShape loadShape PShape arc ellipse line point ' +
|
||||
'quad rect triangle bezier bezierDetail bezierPoint bezierTangent curve curveDetail curvePoint ' +
|
||||
'curveTangent curveTightness shape shapeMode beginContour beginShape bezierVertex curveVertex ' +
|
||||
'endContour endShape quadraticVertex vertex ellipseMode noSmooth rectMode smooth strokeCap ' +
|
||||
'strokeJoin strokeWeight mouseClicked mouseDragged mouseMoved mousePressed mouseReleased ' +
|
||||
'mouseWheel keyPressed keyPressedkeyReleased keyTyped print println save saveFrame day hour ' +
|
||||
'millis minute month second year background clear colorMode fill noFill noStroke stroke alpha ' +
|
||||
'blue brightness color green hue lerpColor red saturation modelX modelY modelZ screenX screenY ' +
|
||||
'screenZ ambient emissive shininess specular add createImage beginCamera camera endCamera frustum ' +
|
||||
'ortho perspective printCamera printProjection cursor frameRate noCursor exit loop noLoop popStyle ' +
|
||||
'pushStyle redraw binary boolean byte char float hex int str unbinary unhex join match matchAll nf ' +
|
||||
'nfc nfp nfs split splitTokens trim append arrayCopy concat expand reverse shorten sort splice subset ' +
|
||||
'box sphere sphereDetail createInput createReader loadBytes loadJSONArray loadJSONObject loadStrings ' +
|
||||
'loadTable loadXML open parseXML saveTable selectFolder selectInput beginRaw beginRecord createOutput ' +
|
||||
'createWriter endRaw endRecord PrintWritersaveBytes saveJSONArray saveJSONObject saveStream saveStrings ' +
|
||||
'saveXML selectOutput popMatrix printMatrix pushMatrix resetMatrix rotate rotateX rotateY rotateZ scale ' +
|
||||
'shearX shearY translate ambientLight directionalLight lightFalloff lights lightSpecular noLights normal ' +
|
||||
'pointLight spotLight image imageMode loadImage noTint requestImage tint texture textureMode textureWrap ' +
|
||||
'blend copy filter get loadPixels set updatePixels blendMode loadShader PShaderresetShader shader createFont ' +
|
||||
'loadFont text textFont textAlign textLeading textMode textSize textWidth textAscent textDescent abs ceil ' +
|
||||
'constrain dist exp floor lerp log mag map max min norm pow round sq sqrt acos asin atan atan2 cos degrees ' +
|
||||
'radians sin tan noise noiseDetail noiseSeed random randomGaussian randomSeed'
|
||||
},
|
||||
contains: [
|
||||
hljs.C_LINE_COMMENT_MODE,
|
||||
hljs.C_BLOCK_COMMENT_MODE,
|
||||
hljs.APOS_STRING_MODE,
|
||||
hljs.QUOTE_STRING_MODE,
|
||||
hljs.C_NUMBER_MODE
|
||||
]
|
||||
};
|
||||
}
|
||||
@@ -2,6 +2,7 @@
|
||||
Language: Protocol Buffers
|
||||
Author: Dan Tao <daniel.tao@gmail.com>
|
||||
Description: Protocol buffer message definition format
|
||||
Category: protocols
|
||||
*/
|
||||
|
||||
function(hljs) {
|
||||
|
||||
115
vendor/assets/javascripts/highlight_js/languages/puppet.js
vendored
Normal file
115
vendor/assets/javascripts/highlight_js/languages/puppet.js
vendored
Normal file
@@ -0,0 +1,115 @@
|
||||
/*
|
||||
Language: Puppet
|
||||
Author: Jose Molina Colmenero <gaudy41@gmail.com>
|
||||
Category: config
|
||||
*/
|
||||
|
||||
function(hljs) {
|
||||
var PUPPET_TYPE_REFERENCE =
|
||||
'augeas computer cron exec file filebucket host interface k5login macauthorization mailalias maillist mcx mount nagios_command ' +
|
||||
'nagios_contact nagios_contactgroup nagios_host nagios_hostdependency nagios_hostescalation nagios_hostextinfo nagios_hostgroup nagios_service firewall ' +
|
||||
'nagios_servicedependency nagios_serviceescalation nagios_serviceextinfo nagios_servicegroup nagios_timeperiod notify package resources ' +
|
||||
'router schedule scheduled_task selboolean selmodule service ssh_authorized_key sshkey stage tidy user vlan yumrepo zfs zone zpool';
|
||||
|
||||
var PUPPET_ATTRIBUTES =
|
||||
/* metaparameters */
|
||||
'alias audit before loglevel noop require subscribe tag ' +
|
||||
/* normal attributes */
|
||||
'owner ensure group mode name|0 changes context force incl lens load_path onlyif provider returns root show_diff type_check ' +
|
||||
'en_address ip_address realname command environment hour monute month monthday special target weekday '+
|
||||
'creates cwd ogoutput refresh refreshonly tries try_sleep umask backup checksum content ctime force ignore ' +
|
||||
'links mtime purge recurse recurselimit replace selinux_ignore_defaults selrange selrole seltype seluser source ' +
|
||||
'souirce_permissions sourceselect validate_cmd validate_replacement allowdupe attribute_membership auth_membership forcelocal gid '+
|
||||
'ia_load_module members system host_aliases ip allowed_trunk_vlans description device_url duplex encapsulation etherchannel ' +
|
||||
'native_vlan speed principals allow_root auth_class auth_type authenticate_user k_of_n mechanisms rule session_owner shared options ' +
|
||||
'device fstype enable hasrestart directory present absent link atboot blockdevice device dump pass remounts poller_tag use ' +
|
||||
'message withpath adminfile allow_virtual allowcdrom category configfiles flavor install_options instance package_settings platform ' +
|
||||
'responsefile status uninstall_options vendor unless_system_user unless_uid binary control flags hasstatus manifest pattern restart running ' +
|
||||
'start stop allowdupe auths expiry gid groups home iterations key_membership keys managehome membership password password_max_age ' +
|
||||
'password_min_age profile_membership profiles project purge_ssh_keys role_membership roles salt shell uid baseurl cost descr enabled ' +
|
||||
'enablegroups exclude failovermethod gpgcheck gpgkey http_caching include includepkgs keepalive metadata_expire metalink mirrorlist ' +
|
||||
'priority protect proxy proxy_password proxy_username repo_gpgcheck s3_enabled skip_if_unavailable sslcacert sslclientcert sslclientkey ' +
|
||||
'sslverify mounted';
|
||||
|
||||
var PUPPET_KEYWORDS =
|
||||
{
|
||||
keyword:
|
||||
/* language keywords */
|
||||
'and case class default define else elsif false if in import enherits node or true undef unless main settings $string ' + PUPPET_TYPE_REFERENCE,
|
||||
literal:
|
||||
PUPPET_ATTRIBUTES,
|
||||
|
||||
built_in:
|
||||
/* core facts */
|
||||
'architecture augeasversion blockdevices boardmanufacturer boardproductname boardserialnumber cfkey dhcp_servers ' +
|
||||
'domain ec2_ ec2_userdata facterversion filesystems ldom fqdn gid hardwareisa hardwaremodel hostname id|0 interfaces '+
|
||||
'ipaddress ipaddress_ ipaddress6 ipaddress6_ iphostnumber is_virtual kernel kernelmajversion kernelrelease kernelversion ' +
|
||||
'kernelrelease kernelversion lsbdistcodename lsbdistdescription lsbdistid lsbdistrelease lsbmajdistrelease lsbminordistrelease ' +
|
||||
'lsbrelease macaddress macaddress_ macosx_buildversion macosx_productname macosx_productversion macosx_productverson_major ' +
|
||||
'macosx_productversion_minor manufacturer memoryfree memorysize netmask metmask_ network_ operatingsystem operatingsystemmajrelease '+
|
||||
'operatingsystemrelease osfamily partitions path physicalprocessorcount processor processorcount productname ps puppetversion '+
|
||||
'rubysitedir rubyversion selinux selinux_config_mode selinux_config_policy selinux_current_mode selinux_current_mode selinux_enforced '+
|
||||
'selinux_policyversion serialnumber sp_ sshdsakey sshecdsakey sshrsakey swapencrypted swapfree swapsize timezone type uniqueid uptime '+
|
||||
'uptime_days uptime_hours uptime_seconds uuid virtual vlans xendomains zfs_version zonenae zones zpool_version'
|
||||
};
|
||||
|
||||
var COMMENT = {
|
||||
className: 'comment',
|
||||
begin: '#', end: '$'
|
||||
};
|
||||
|
||||
var STRING = {
|
||||
className: 'string',
|
||||
contains: [hljs.BACKSLASH_ESCAPE],
|
||||
variants: [
|
||||
{begin: /'/, end: /'/},
|
||||
{begin: /"/, end: /"/}
|
||||
]
|
||||
};
|
||||
|
||||
var PUPPET_DEFAULT_CONTAINS = [
|
||||
STRING,
|
||||
COMMENT,
|
||||
{
|
||||
className: 'keyword',
|
||||
beginKeywords: 'class', end: '$|;',
|
||||
illegal: /=/,
|
||||
contains: [
|
||||
hljs.inherit(hljs.TITLE_MODE, {begin: '(::)?[A-Za-z_]\\w*(::\\w+)*'}),
|
||||
COMMENT,
|
||||
STRING
|
||||
]
|
||||
},
|
||||
{
|
||||
className: 'keyword',
|
||||
begin: '([a-zA-Z_(::)]+ *\\{)',
|
||||
contains:[STRING, COMMENT],
|
||||
relevance: 0
|
||||
},
|
||||
{
|
||||
className: 'keyword',
|
||||
begin: '(\\}|\\{)',
|
||||
relevance: 0
|
||||
},
|
||||
{
|
||||
className: 'function',
|
||||
begin:'[a-zA-Z_]+\\s*=>'
|
||||
},
|
||||
{
|
||||
className: 'constant',
|
||||
begin: '(::)?(\\b[A-Z][a-z_]*(::)?)+',
|
||||
relevance: 0
|
||||
},
|
||||
{
|
||||
className: 'number',
|
||||
begin: '(\\b0[0-7_]+)|(\\b0x[0-9a-fA-F_]+)|(\\b[1-9][0-9_]*(\\.[0-9_]+)?)|[0_]\\b',
|
||||
relevance: 0
|
||||
}
|
||||
];
|
||||
|
||||
return {
|
||||
aliases: ['pp'],
|
||||
keywords: PUPPET_KEYWORDS,
|
||||
contains: PUPPET_DEFAULT_CONTAINS
|
||||
}
|
||||
}
|
||||
@@ -1,5 +1,6 @@
|
||||
/*
|
||||
Language: Python
|
||||
Category: common
|
||||
*/
|
||||
|
||||
function(hljs) {
|
||||
@@ -51,12 +52,6 @@ function(hljs) {
|
||||
begin: /\(/, end: /\)/,
|
||||
contains: ['self', PROMPT, NUMBER, STRING]
|
||||
};
|
||||
var FUNC_CLASS_PROTO = {
|
||||
end: /:/,
|
||||
illegal: /[${=;\n]/,
|
||||
contains: [hljs.UNDERSCORE_TITLE_MODE, PARAMS]
|
||||
};
|
||||
|
||||
return {
|
||||
aliases: ['py', 'gyp'],
|
||||
keywords: {
|
||||
@@ -73,8 +68,15 @@ function(hljs) {
|
||||
NUMBER,
|
||||
STRING,
|
||||
hljs.HASH_COMMENT_MODE,
|
||||
hljs.inherit(FUNC_CLASS_PROTO, {className: 'function', beginKeywords: 'def', relevance: 10}),
|
||||
hljs.inherit(FUNC_CLASS_PROTO, {className: 'class', beginKeywords: 'class'}),
|
||||
{
|
||||
variants: [
|
||||
{className: 'function', beginKeywords: 'def', relevance: 10},
|
||||
{className: 'class', beginKeywords: 'class'}
|
||||
],
|
||||
end: /:/,
|
||||
illegal: /[${=;\n]/,
|
||||
contains: [hljs.UNDERSCORE_TITLE_MODE, PARAMS]
|
||||
},
|
||||
{
|
||||
className: 'decorator',
|
||||
begin: /@/, end: /$/
|
||||
|
||||
27
vendor/assets/javascripts/highlight_js/languages/q.js
vendored
Normal file
27
vendor/assets/javascripts/highlight_js/languages/q.js
vendored
Normal file
@@ -0,0 +1,27 @@
|
||||
/*
|
||||
Language: Q
|
||||
Author: Sergey Vidyuk <svidyuk@gmail.com>
|
||||
Description: K/Q/Kdb+ from Kx Systems
|
||||
*/
|
||||
function(hljs) {
|
||||
var Q_KEYWORDS = {
|
||||
keyword:
|
||||
'do while select delete by update from',
|
||||
constant:
|
||||
'0b 1b',
|
||||
built_in:
|
||||
'neg not null string reciprocal floor ceiling signum mod xbar xlog and or each scan over prior mmu lsq inv md5 ltime gtime count first var dev med cov cor all any rand sums prds mins maxs fills deltas ratios avgs differ prev next rank reverse iasc idesc asc desc msum mcount mavg mdev xrank mmin mmax xprev rotate distinct group where flip type key til get value attr cut set upsert raze union inter except cross sv vs sublist enlist read0 read1 hopen hclose hdel hsym hcount peach system ltrim rtrim trim lower upper ssr view tables views cols xcols keys xkey xcol xasc xdesc fkeys meta lj aj aj0 ij pj asof uj ww wj wj1 fby xgroup ungroup ej save load rsave rload show csv parse eval min max avg wavg wsum sin cos tan sum',
|
||||
typename:
|
||||
'`float `double int `timestamp `timespan `datetime `time `boolean `symbol `char `byte `short `long `real `month `date `minute `second `guid'
|
||||
};
|
||||
return {
|
||||
aliases:['k', 'kdb'],
|
||||
keywords: Q_KEYWORDS,
|
||||
lexemes: /\b(`?)[A-Za-z0-9_]+\b/,
|
||||
contains: [
|
||||
hljs.C_LINE_COMMENT_MODE,
|
||||
hljs.QUOTE_STRING_MODE,
|
||||
hljs.C_NUMBER_MODE
|
||||
]
|
||||
};
|
||||
}
|
||||
@@ -1,6 +1,7 @@
|
||||
/*
|
||||
Language: R
|
||||
Author: Joe Cheng <joe@rstudio.org>
|
||||
Category: scientific
|
||||
*/
|
||||
|
||||
function(hljs) {
|
||||
|
||||
@@ -2,6 +2,7 @@
|
||||
Language: RenderMan RIB
|
||||
Author: Konstantin Evdokimenko <qewerty@gmail.com>
|
||||
Contributors: Shuen-Huei Guan <drake.guan@gmail.com>
|
||||
Category: graphics
|
||||
*/
|
||||
|
||||
function(hljs) {
|
||||
|
||||
67
vendor/assets/javascripts/highlight_js/languages/roboconf.js
vendored
Normal file
67
vendor/assets/javascripts/highlight_js/languages/roboconf.js
vendored
Normal file
@@ -0,0 +1,67 @@
|
||||
/*
|
||||
Language: Roboconf
|
||||
Author: Vincent Zurczak <vzurczak@linagora.com>
|
||||
Website: http://roboconf.net
|
||||
Description: Syntax highlighting for Roboconf's DSL
|
||||
Category: config
|
||||
*/
|
||||
|
||||
function(hljs) {
|
||||
var IDENTIFIER = '[a-zA-Z-_][^\n{\r\n]+\\{';
|
||||
|
||||
return {
|
||||
aliases: ['graph', 'instances'],
|
||||
case_insensitive: true,
|
||||
keywords: 'import',
|
||||
contains: [
|
||||
// Facet sections
|
||||
{
|
||||
className: 'facet',
|
||||
begin: '^facet ' + IDENTIFIER,
|
||||
end: '}',
|
||||
keywords: 'facet installer exports children extends',
|
||||
contains: [
|
||||
hljs.HASH_COMMENT_MODE
|
||||
]
|
||||
},
|
||||
|
||||
// Instance sections
|
||||
{
|
||||
className: 'instance-of',
|
||||
begin: '^instance of ' + IDENTIFIER,
|
||||
end: '}',
|
||||
keywords: 'name count channels instance-data instance-state instance of',
|
||||
contains: [
|
||||
// Instance overridden properties
|
||||
{
|
||||
className: 'keyword',
|
||||
begin: '[a-zA-Z-_]+( |\t)*:'
|
||||
},
|
||||
hljs.HASH_COMMENT_MODE
|
||||
]
|
||||
},
|
||||
|
||||
// Component sections
|
||||
{
|
||||
className: 'component',
|
||||
begin: '^' + IDENTIFIER,
|
||||
end: '}',
|
||||
lexemes: '\\(?[a-zA-Z]+\\)?',
|
||||
keywords: 'installer exports children extends imports facets alias (optional)',
|
||||
contains: [
|
||||
// Imported component variables
|
||||
{
|
||||
className: 'string',
|
||||
begin: '\\.[a-zA-Z-_]+',
|
||||
end: '\\s|,|;',
|
||||
excludeEnd: true
|
||||
},
|
||||
hljs.HASH_COMMENT_MODE
|
||||
]
|
||||
},
|
||||
|
||||
// Comments
|
||||
hljs.HASH_COMMENT_MODE
|
||||
]
|
||||
};
|
||||
}
|
||||
@@ -2,6 +2,7 @@
|
||||
Language: RenderMan RSL
|
||||
Author: Konstantin Evdokimenko <qewerty@gmail.com>
|
||||
Contributors: Shuen-Huei Guan <drake.guan@gmail.com>
|
||||
Category: graphics
|
||||
*/
|
||||
|
||||
function(hljs) {
|
||||
|
||||
@@ -1,7 +1,8 @@
|
||||
/*
|
||||
Language: Ruby
|
||||
Author: Anton Kovalyov <anton@kovalyov.net>
|
||||
Contributors: Peter Leonov <gojpeg@yandex.ru>, Vasily Polovnyov <vast@whiteants.net>, Loren Segal <lsegal@soen.ca>, Pascal Hurni <phi@ruby-reactive.org>
|
||||
Contributors: Peter Leonov <gojpeg@yandex.ru>, Vasily Polovnyov <vast@whiteants.net>, Loren Segal <lsegal@soen.ca>, Pascal Hurni <phi@ruby-reactive.org>, Cedric Sohrauer <sohrauer@googlemail.com>
|
||||
Category: common
|
||||
*/
|
||||
|
||||
function(hljs) {
|
||||
@@ -46,14 +47,15 @@ function(hljs) {
|
||||
variants: [
|
||||
{begin: /'/, end: /'/},
|
||||
{begin: /"/, end: /"/},
|
||||
{begin: '%[qw]?\\(', end: '\\)'},
|
||||
{begin: '%[qw]?\\[', end: '\\]'},
|
||||
{begin: '%[qw]?{', end: '}'},
|
||||
{begin: '%[qw]?<', end: '>'},
|
||||
{begin: '%[qw]?/', end: '/'},
|
||||
{begin: '%[qw]?%', end: '%'},
|
||||
{begin: '%[qw]?-', end: '-'},
|
||||
{begin: '%[qw]?\\|', end: '\\|'},
|
||||
{begin: /`/, end: /`/},
|
||||
{begin: '%[qQwWx]?\\(', end: '\\)'},
|
||||
{begin: '%[qQwWx]?\\[', end: '\\]'},
|
||||
{begin: '%[qQwWx]?{', end: '}'},
|
||||
{begin: '%[qQwWx]?<', end: '>'},
|
||||
{begin: '%[qQwWx]?/', end: '/'},
|
||||
{begin: '%[qQwWx]?%', end: '%'},
|
||||
{begin: '%[qQwWx]?-', end: '-'},
|
||||
{begin: '%[qQwWx]?\\|', end: '\\|'},
|
||||
{
|
||||
// \B in the beginning suppresses recognition of ?-sequences where ?
|
||||
// is the last character of a preceding identifier, as in: `func?4`
|
||||
@@ -105,13 +107,13 @@ function(hljs) {
|
||||
},
|
||||
{
|
||||
className: 'symbol',
|
||||
begin: ':',
|
||||
contains: [STRING, {begin: RUBY_METHOD_RE}],
|
||||
begin: hljs.UNDERSCORE_IDENT_RE + '(\\!|\\?)?:',
|
||||
relevance: 0
|
||||
},
|
||||
{
|
||||
className: 'symbol',
|
||||
begin: hljs.UNDERSCORE_IDENT_RE + '(\\!|\\?)?:',
|
||||
begin: ':',
|
||||
contains: [STRING, {begin: RUBY_METHOD_RE}],
|
||||
relevance: 0
|
||||
},
|
||||
{
|
||||
@@ -146,45 +148,31 @@ function(hljs) {
|
||||
];
|
||||
SUBST.contains = RUBY_DEFAULT_CONTAINS;
|
||||
PARAMS.contains = RUBY_DEFAULT_CONTAINS;
|
||||
|
||||
|
||||
var SIMPLE_PROMPT = "[>?]>";
|
||||
var DEFAULT_PROMPT = "[\\w#]+\\(\\w+\\):\\d+:\\d+>";
|
||||
var RVM_PROMPT = "(\\w+-)?\\d+\\.\\d+\\.\\d(p\\d+)?[^>]+>";
|
||||
|
||||
var IRB_DEFAULT = [
|
||||
{
|
||||
relevance: 1,
|
||||
className: 'output',
|
||||
begin: '^\\s*=> ', end: "$",
|
||||
returnBegin: true,
|
||||
contains: [
|
||||
{
|
||||
className: 'status',
|
||||
begin: '^\\s*=>'
|
||||
},
|
||||
{
|
||||
begin: ' ', end: '$',
|
||||
contains: RUBY_DEFAULT_CONTAINS
|
||||
}
|
||||
]
|
||||
begin: /^\s*=>/,
|
||||
className: 'status',
|
||||
starts: {
|
||||
end: '$', contains: RUBY_DEFAULT_CONTAINS
|
||||
}
|
||||
},
|
||||
{
|
||||
relevance: 1,
|
||||
className: 'input',
|
||||
begin: '^[^ ][^=>]*>+ ', end: "$",
|
||||
returnBegin: true,
|
||||
contains: [
|
||||
{
|
||||
className: 'prompt',
|
||||
begin: '^[^ ][^=>]*>+'
|
||||
},
|
||||
{
|
||||
begin: ' ', end: '$',
|
||||
contains: RUBY_DEFAULT_CONTAINS
|
||||
}
|
||||
]
|
||||
className: 'prompt',
|
||||
begin: '^('+SIMPLE_PROMPT+"|"+DEFAULT_PROMPT+'|'+RVM_PROMPT+')',
|
||||
starts: {
|
||||
end: '$', contains: RUBY_DEFAULT_CONTAINS
|
||||
}
|
||||
}
|
||||
];
|
||||
|
||||
return {
|
||||
aliases: ['rb', 'gemspec', 'podspec', 'thor', 'irb'],
|
||||
keywords: RUBY_KEYWORDS,
|
||||
contains: IRB_DEFAULT.concat(RUBY_DEFAULT_CONTAINS)
|
||||
contains: [COMMENT].concat(IRB_DEFAULT).concat(RUBY_DEFAULT_CONTAINS)
|
||||
};
|
||||
}
|
||||
|
||||
@@ -2,6 +2,7 @@
|
||||
Language: Oracle Rules Language
|
||||
Author: Jason Jacobson <jason.a.jacobson@gmail.com>
|
||||
Description: The Oracle Utilities Rules Language is used to program the Oracle Utilities Applications acquired from LODESTAR Corporation. The products include Billing Component, LPSS, Pricing Component etc. through version 1.6.1.
|
||||
Category: enterprise
|
||||
*/
|
||||
|
||||
function(hljs) {
|
||||
|
||||
@@ -2,24 +2,36 @@
|
||||
Language: Rust
|
||||
Author: Andrey Vlasovskikh <andrey.vlasovskikh@gmail.com>
|
||||
Contributors: Roman Shmatov <romanshmatov@gmail.com>
|
||||
Category: system
|
||||
*/
|
||||
|
||||
function(hljs) {
|
||||
var BLOCK_COMMENT = hljs.inherit(hljs.C_BLOCK_COMMENT_MODE);
|
||||
BLOCK_COMMENT.contains.push('self');
|
||||
return {
|
||||
aliases: ['rs'],
|
||||
keywords:
|
||||
'alignof as be box break const continue crate do else enum extern ' +
|
||||
'false fn for if impl in let loop match mod mut offsetof once priv ' +
|
||||
'proc pub pure ref return self sizeof static struct super trait true ' +
|
||||
'type typeof unsafe unsized use virtual while yield ' +
|
||||
'int i8 i16 i32 i64 ' +
|
||||
'uint u8 u32 u64 ' +
|
||||
'float f32 f64 ' +
|
||||
'str char bool',
|
||||
keywords: {
|
||||
keyword:
|
||||
'alignof as be box break const continue crate do else enum extern ' +
|
||||
'false fn for if impl in let loop match mod mut offsetof once priv ' +
|
||||
'proc pub pure ref return self sizeof static struct super trait true ' +
|
||||
'type typeof unsafe unsized use virtual while yield ' +
|
||||
'int i8 i16 i32 i64 ' +
|
||||
'uint u8 u32 u64 ' +
|
||||
'float f32 f64 ' +
|
||||
'str char bool',
|
||||
built_in:
|
||||
'assert! assert_eq! bitflags! bytes! cfg! col! concat! concat_idents! ' +
|
||||
'debug_assert! debug_assert_eq! env! panic! file! format! format_args! ' +
|
||||
'include_bin! include_str! line! local_data_key! module_path! ' +
|
||||
'option_env! print! println! select! stringify! try! unimplemented! ' +
|
||||
'unreachable! vec! write! writeln!'
|
||||
},
|
||||
lexemes: hljs.IDENT_RE + '!?',
|
||||
illegal: '</',
|
||||
contains: [
|
||||
hljs.C_LINE_COMMENT_MODE,
|
||||
hljs.C_BLOCK_COMMENT_MODE,
|
||||
BLOCK_COMMENT,
|
||||
hljs.inherit(hljs.QUOTE_STRING_MODE, {illegal: null}),
|
||||
{
|
||||
className: 'string',
|
||||
@@ -34,7 +46,7 @@ function(hljs) {
|
||||
},
|
||||
{
|
||||
className: 'number',
|
||||
begin: '\\b(0[xb][A-Za-z0-9_]+|[0-9_]+(\\.[0-9_]+)?([uif](8|16|32|64)?)?)',
|
||||
begin: /\b(0[xb][A-Za-z0-9_]+|[0-9_]+(\.[0-9_]+)?([eE][+-]?[0-9_]+)?)([uif](8|16|32|64)?)?/,
|
||||
relevance: 0
|
||||
},
|
||||
{
|
||||
@@ -44,7 +56,7 @@ function(hljs) {
|
||||
},
|
||||
{
|
||||
className: 'preprocessor',
|
||||
begin: '#\\[', end: '\\]'
|
||||
begin: '#\\!?\\[', end: '\\]'
|
||||
},
|
||||
{
|
||||
beginKeywords: 'type', end: '(=|<)',
|
||||
|
||||
@@ -1,61 +1,76 @@
|
||||
/*
|
||||
Language: Scala
|
||||
Author: Jan Berkel <jan.berkel@gmail.com>
|
||||
Contributors: Erik Osheim <d_m@plastic-idolatry.com>
|
||||
*/
|
||||
|
||||
function(hljs) {
|
||||
|
||||
var ANNOTATION = {
|
||||
className: 'annotation', begin: '@[A-Za-z]+'
|
||||
};
|
||||
|
||||
var STRING = {
|
||||
className: 'string',
|
||||
begin: 'u?r?"""', end: '"""',
|
||||
relevance: 10
|
||||
};
|
||||
|
||||
var SYMBOL = {
|
||||
className: 'symbol',
|
||||
begin: '\'\\w[\\w\\d_]*(?!\')'
|
||||
};
|
||||
|
||||
var TYPE = {
|
||||
className: 'type',
|
||||
begin: '\\b[A-Z][A-Za-z0-9_]*',
|
||||
relevance: 0
|
||||
};
|
||||
|
||||
var NAME = {
|
||||
className: 'title',
|
||||
begin: /[^0-9\n\t "'(),.`{}\[\]:;][^\n\t "'(),.`{}\[\]:;]+|[^0-9\n\t "'(),.`{}\[\]:;=]/,
|
||||
relevance: 0
|
||||
};
|
||||
|
||||
var CLASS = {
|
||||
className: 'class',
|
||||
beginKeywords: 'class object trait type',
|
||||
end: /[:={\[(\n;]/,
|
||||
contains: [{className: 'keyword', beginKeywords: 'extends with', relevance: 10}, NAME]
|
||||
};
|
||||
|
||||
var METHOD = {
|
||||
className: 'function',
|
||||
beginKeywords: 'def val',
|
||||
end: /[:={\[(\n;]/,
|
||||
contains: [NAME]
|
||||
};
|
||||
|
||||
var JAVADOC = {
|
||||
className: 'javadoc',
|
||||
begin: '/\\*\\*', end: '\\*/',
|
||||
contains: [{
|
||||
className: 'javadoctag',
|
||||
begin: '@[A-Za-z]+'
|
||||
}],
|
||||
relevance: 10
|
||||
};
|
||||
|
||||
return {
|
||||
keywords:
|
||||
'type yield lazy override def with val var false true sealed abstract private trait ' +
|
||||
'object null if for while throw finally protected extends import final return else ' +
|
||||
'break new catch super class case package default try this match continue throws',
|
||||
keywords: {
|
||||
literal: 'true false null',
|
||||
keyword: 'type yield lazy override def with val var sealed abstract private trait object if forSome for while throw finally protected extends import final return else break new catch super class case package default try this match continue throws implicit'
|
||||
},
|
||||
contains: [
|
||||
{
|
||||
className: 'javadoc',
|
||||
begin: '/\\*\\*', end: '\\*/',
|
||||
contains: [{
|
||||
className: 'javadoctag',
|
||||
begin: '@[A-Za-z]+'
|
||||
}],
|
||||
relevance: 10
|
||||
},
|
||||
hljs.C_LINE_COMMENT_MODE, hljs.C_BLOCK_COMMENT_MODE,
|
||||
STRING, hljs.QUOTE_STRING_MODE,
|
||||
hljs.C_LINE_COMMENT_MODE,
|
||||
hljs.C_BLOCK_COMMENT_MODE,
|
||||
STRING,
|
||||
hljs.QUOTE_STRING_MODE,
|
||||
SYMBOL,
|
||||
{
|
||||
className: 'class',
|
||||
begin: '((case )?class |object |trait )', // beginKeywords won't work because a single "case" shouldn't start this mode
|
||||
end: '({|$)', excludeEnd: true,
|
||||
illegal: ':',
|
||||
keywords: 'case class trait object',
|
||||
contains: [
|
||||
{
|
||||
beginKeywords: 'extends with',
|
||||
relevance: 10
|
||||
},
|
||||
hljs.UNDERSCORE_TITLE_MODE,
|
||||
{
|
||||
className: 'params',
|
||||
begin: '\\(', end: '\\)',
|
||||
contains: [
|
||||
hljs.QUOTE_STRING_MODE, STRING,
|
||||
ANNOTATION
|
||||
]
|
||||
}
|
||||
]
|
||||
},
|
||||
TYPE,
|
||||
METHOD,
|
||||
CLASS,
|
||||
hljs.C_NUMBER_MODE,
|
||||
ANNOTATION
|
||||
]
|
||||
|
||||
127
vendor/assets/javascripts/highlight_js/languages/scheme.js
vendored
Normal file
127
vendor/assets/javascripts/highlight_js/languages/scheme.js
vendored
Normal file
@@ -0,0 +1,127 @@
|
||||
/*
|
||||
Language: Scheme
|
||||
Description: Keywords based on http://community.schemewiki.org/?scheme-keywords
|
||||
Author: JP Verkamp <me@jverkamp.com>
|
||||
Contributors: Ivan Sagalaev <maniac@softwaremaniacs.org>
|
||||
Origin: clojure.js
|
||||
Category: lisp
|
||||
*/
|
||||
|
||||
function(hljs) {
|
||||
var SCHEME_IDENT_RE = '[^\\(\\)\\[\\]\\{\\}",\'`;#|\\\\\\s]+';
|
||||
var SCHEME_SIMPLE_NUMBER_RE = '(\\-|\\+)?\\d+([./]\\d+)?';
|
||||
var SCHEME_COMPLEX_NUMBER_RE = SCHEME_SIMPLE_NUMBER_RE + '[+\\-]' + SCHEME_SIMPLE_NUMBER_RE + 'i';
|
||||
var BUILTINS = {
|
||||
built_in:
|
||||
'case-lambda call/cc class define-class exit-handler field import ' +
|
||||
'inherit init-field interface let*-values let-values let/ec mixin ' +
|
||||
'opt-lambda override protect provide public rename require ' +
|
||||
'require-for-syntax syntax syntax-case syntax-error unit/sig unless ' +
|
||||
'when with-syntax and begin call-with-current-continuation ' +
|
||||
'call-with-input-file call-with-output-file case cond define ' +
|
||||
'define-syntax delay do dynamic-wind else for-each if lambda let let* ' +
|
||||
'let-syntax letrec letrec-syntax map or syntax-rules \' * + , ,@ - ... / ' +
|
||||
'; < <= = => > >= ` abs acos angle append apply asin assoc assq assv atan ' +
|
||||
'boolean? caar cadr call-with-input-file call-with-output-file ' +
|
||||
'call-with-values car cdddar cddddr cdr ceiling char->integer ' +
|
||||
'char-alphabetic? char-ci<=? char-ci<? char-ci=? char-ci>=? char-ci>? ' +
|
||||
'char-downcase char-lower-case? char-numeric? char-ready? char-upcase ' +
|
||||
'char-upper-case? char-whitespace? char<=? char<? char=? char>=? char>? ' +
|
||||
'char? close-input-port close-output-port complex? cons cos ' +
|
||||
'current-input-port current-output-port denominator display eof-object? ' +
|
||||
'eq? equal? eqv? eval even? exact->inexact exact? exp expt floor ' +
|
||||
'force gcd imag-part inexact->exact inexact? input-port? integer->char ' +
|
||||
'integer? interaction-environment lcm length list list->string ' +
|
||||
'list->vector list-ref list-tail list? load log magnitude make-polar ' +
|
||||
'make-rectangular make-string make-vector max member memq memv min ' +
|
||||
'modulo negative? newline not null-environment null? number->string ' +
|
||||
'number? numerator odd? open-input-file open-output-file output-port? ' +
|
||||
'pair? peek-char port? positive? procedure? quasiquote quote quotient ' +
|
||||
'rational? rationalize read read-char real-part real? remainder reverse ' +
|
||||
'round scheme-report-environment set! set-car! set-cdr! sin sqrt string ' +
|
||||
'string->list string->number string->symbol string-append string-ci<=? ' +
|
||||
'string-ci<? string-ci=? string-ci>=? string-ci>? string-copy ' +
|
||||
'string-fill! string-length string-ref string-set! string<=? string<? ' +
|
||||
'string=? string>=? string>? string? substring symbol->string symbol? ' +
|
||||
'tan transcript-off transcript-on truncate values vector ' +
|
||||
'vector->list vector-fill! vector-length vector-ref vector-set! ' +
|
||||
'with-input-from-file with-output-to-file write write-char zero?'
|
||||
};
|
||||
|
||||
var SHEBANG = {
|
||||
className: 'shebang',
|
||||
begin: '^#!',
|
||||
end: '$'
|
||||
};
|
||||
|
||||
var LITERAL = {
|
||||
className: 'literal',
|
||||
begin: '(#t|#f|#\\\\' + SCHEME_IDENT_RE + '|#\\\\.)'
|
||||
};
|
||||
|
||||
var NUMBER = {
|
||||
className: 'number',
|
||||
variants: [
|
||||
{ begin: SCHEME_SIMPLE_NUMBER_RE, relevance: 0 },
|
||||
{ begin: SCHEME_COMPLEX_NUMBER_RE, relevance: 0 },
|
||||
{ begin: '#b[0-1]+(/[0-1]+)?' },
|
||||
{ begin: '#o[0-7]+(/[0-7]+)?' },
|
||||
{ begin: '#x[0-9a-f]+(/[0-9a-f]+)?' }
|
||||
]
|
||||
};
|
||||
|
||||
var STRING = hljs.QUOTE_STRING_MODE;
|
||||
|
||||
var REGULAR_EXPRESSION = {
|
||||
className: 'regexp',
|
||||
begin: '#[pr]x"',
|
||||
end: '[^\\\\]"'
|
||||
};
|
||||
|
||||
var COMMENT = {
|
||||
className: 'comment',
|
||||
variants: [
|
||||
{ begin: ';', end: '$', relevance: 0 },
|
||||
{ begin: '#\\|', end: '\\|#' }
|
||||
]
|
||||
};
|
||||
|
||||
var IDENT = {
|
||||
begin: SCHEME_IDENT_RE,
|
||||
relevance: 0
|
||||
};
|
||||
|
||||
var QUOTED_IDENT = {
|
||||
className: 'variable',
|
||||
begin: '\'' + SCHEME_IDENT_RE
|
||||
};
|
||||
|
||||
var BODY = {
|
||||
endsWithParent: true,
|
||||
relevance: 0
|
||||
};
|
||||
|
||||
var LIST = {
|
||||
className: 'list',
|
||||
variants: [
|
||||
{ begin: '\\(', end: '\\)' },
|
||||
{ begin: '\\[', end: '\\]' }
|
||||
],
|
||||
contains: [
|
||||
{
|
||||
className: 'keyword',
|
||||
begin: SCHEME_IDENT_RE,
|
||||
lexemes: SCHEME_IDENT_RE,
|
||||
keywords: BUILTINS
|
||||
},
|
||||
BODY
|
||||
]
|
||||
};
|
||||
|
||||
BODY.contains = [LITERAL, NUMBER, STRING, COMMENT, IDENT, QUOTED_IDENT, LIST];
|
||||
|
||||
return {
|
||||
illegal: /\S/,
|
||||
contains: [SHEBANG, NUMBER, STRING, COMMENT, QUOTED_IDENT, LIST]
|
||||
};
|
||||
}
|
||||
@@ -3,6 +3,7 @@ Language: Scilab
|
||||
Author: Sylvestre Ledru <sylvestre.ledru@scilab-enterprises.com>
|
||||
Origin: matlab.js
|
||||
Description: Scilab is a port from Matlab
|
||||
Category: scientific
|
||||
*/
|
||||
|
||||
function(hljs) {
|
||||
|
||||
@@ -1,6 +1,7 @@
|
||||
/*
|
||||
Language: SCSS
|
||||
Author: Kurt Emch <kurt@kurtemch.com>
|
||||
Category: css
|
||||
*/
|
||||
function(hljs) {
|
||||
var IDENT_RE = '[a-zA-Z-][a-zA-Z0-9_-]*';
|
||||
@@ -10,7 +11,7 @@ function(hljs) {
|
||||
};
|
||||
var FUNCTION = {
|
||||
className: 'function',
|
||||
begin: IDENT_RE + '\\(',
|
||||
begin: IDENT_RE + '\\(',
|
||||
returnBegin: true,
|
||||
excludeEnd: true,
|
||||
end: '\\('
|
||||
|
||||
86
vendor/assets/javascripts/highlight_js/languages/smali.js
vendored
Normal file
86
vendor/assets/javascripts/highlight_js/languages/smali.js
vendored
Normal file
@@ -0,0 +1,86 @@
|
||||
/*
|
||||
Language: Smali
|
||||
Author: Dennis Titze <dennis.titze@gmail.com>
|
||||
Description: Basic Smali highlighting
|
||||
*/
|
||||
|
||||
function(hljs) {
|
||||
var smali_instr_low_prio = ['add', 'and', 'cmp', 'cmpg', 'cmpl', 'const', 'div', 'double', 'float', 'goto', 'if', 'int', 'long', 'move', 'mul', 'neg', 'new', 'nop', 'not', 'or', 'rem', 'return', 'shl', 'shr', 'sput', 'sub', 'throw', 'ushr', 'xor'];
|
||||
var smali_instr_high_prio = ['aget', 'aput', 'array', 'check', 'execute', 'fill', 'filled', 'goto/16', 'goto/32', 'iget', 'instance', 'invoke', 'iput', 'monitor', 'packed', 'sget', 'sparse'];
|
||||
var smali_keywords = ['transient', 'constructor', 'abstract', 'final', 'synthetic', 'public', 'private', 'protected', 'static', 'bridge', 'system'];
|
||||
return {
|
||||
aliases: ['smali'],
|
||||
contains: [
|
||||
{
|
||||
className: 'string',
|
||||
begin: '"', end: '"',
|
||||
relevance: 0
|
||||
},
|
||||
{
|
||||
className: 'comment',
|
||||
begin: '#', end: '$',
|
||||
relevance: 0
|
||||
},
|
||||
{
|
||||
className: 'keyword',
|
||||
begin: '\\s*\\.end\\s[a-zA-Z0-9]*',
|
||||
relevance: 1
|
||||
},
|
||||
{
|
||||
className: 'keyword',
|
||||
begin: '^[ ]*\\.[a-zA-Z]*',
|
||||
relevance: 0
|
||||
},
|
||||
{
|
||||
className: 'keyword',
|
||||
begin: '\\s:[a-zA-Z_0-9]*',
|
||||
relevance: 0
|
||||
},
|
||||
{
|
||||
className: 'keyword',
|
||||
begin: '\\s('+smali_keywords.join('|')+')',
|
||||
relevance: 1
|
||||
},
|
||||
{
|
||||
className: 'keyword',
|
||||
begin: '\\[',
|
||||
relevance: 0
|
||||
},
|
||||
{
|
||||
className: 'instruction',
|
||||
begin: '\\s('+smali_instr_low_prio.join('|')+')\\s',
|
||||
relevance: 1
|
||||
},
|
||||
{
|
||||
className: 'instruction',
|
||||
begin: '\\s('+smali_instr_low_prio.join('|')+')((\\-|/)[a-zA-Z0-9]+)+\\s',
|
||||
relevance: 10
|
||||
},
|
||||
{
|
||||
className: 'instruction',
|
||||
begin: '\\s('+smali_instr_high_prio.join('|')+')((\\-|/)[a-zA-Z0-9]+)*\\s',
|
||||
relevance: 10
|
||||
},
|
||||
{
|
||||
className: 'class',
|
||||
begin: 'L[^\(;:\n]*;',
|
||||
relevance: 0
|
||||
},
|
||||
{
|
||||
className: 'function',
|
||||
begin: '( |->)[^(\n ;"]*\\(',
|
||||
relevance: 0
|
||||
},
|
||||
{
|
||||
className: 'function',
|
||||
begin: '\\)',
|
||||
relevance: 0
|
||||
},
|
||||
{
|
||||
className: 'variable',
|
||||
begin: '[vp][0-9]+',
|
||||
relevance: 0
|
||||
}
|
||||
]
|
||||
};
|
||||
}
|
||||
69
vendor/assets/javascripts/highlight_js/languages/sml.js
vendored
Normal file
69
vendor/assets/javascripts/highlight_js/languages/sml.js
vendored
Normal file
@@ -0,0 +1,69 @@
|
||||
/*
|
||||
Language: SML
|
||||
Author: Edwin Dalorzo <edwin@dalorzo.org>
|
||||
Description: SML language definition.
|
||||
Origin: ocaml.js
|
||||
Category: functional
|
||||
*/
|
||||
function(hljs) {
|
||||
return {
|
||||
aliases: ['ml'],
|
||||
keywords: {
|
||||
keyword:
|
||||
/* according to Definition of Standard ML 97 */
|
||||
'abstype and andalso as case datatype do else end eqtype ' +
|
||||
'exception fn fun functor handle if in include infix infixr ' +
|
||||
'let local nonfix of op open orelse raise rec sharing sig ' +
|
||||
'signature struct structure then type val with withtype where while',
|
||||
built_in:
|
||||
/* built-in types according to basis library */
|
||||
'array bool char exn int list option order real ref string substring vector unit word',
|
||||
literal:
|
||||
'true false NONE SOME LESS EQUAL GREATER nil'
|
||||
},
|
||||
illegal: /\/\/|>>/,
|
||||
lexemes: '[a-z_]\\w*!?',
|
||||
contains: [
|
||||
{
|
||||
className: 'literal',
|
||||
begin: '\\[(\\|\\|)?\\]|\\(\\)'
|
||||
},
|
||||
{
|
||||
className: 'comment',
|
||||
begin: '\\(\\*', end: '\\*\\)',
|
||||
contains: ['self', hljs.PHRASAL_WORDS_MODE],
|
||||
},
|
||||
{ /* type variable */
|
||||
className: 'symbol',
|
||||
begin: '\'[A-Za-z_](?!\')[\\w\']*'
|
||||
/* the grammar is ambiguous on how 'a'b should be interpreted but not the compiler */
|
||||
},
|
||||
{ /* polymorphic variant */
|
||||
className: 'tag',
|
||||
begin: '`[A-Z][\\w\']*'
|
||||
},
|
||||
{ /* module or constructor */
|
||||
className: 'type',
|
||||
begin: '\\b[A-Z][\\w\']*',
|
||||
relevance: 0
|
||||
},
|
||||
{ /* don't color identifiers, but safely catch all identifiers with '*/
|
||||
begin: '[a-z_]\\w*\'[\\w\']*'
|
||||
},
|
||||
hljs.inherit(hljs.APOS_STRING_MODE, {className: 'char', relevance: 0}),
|
||||
hljs.inherit(hljs.QUOTE_STRING_MODE, {illegal: null}),
|
||||
{
|
||||
className: 'number',
|
||||
begin:
|
||||
'\\b(0[xX][a-fA-F0-9_]+[Lln]?|' +
|
||||
'0[oO][0-7_]+[Lln]?|' +
|
||||
'0[bB][01_]+[Lln]?|' +
|
||||
'[0-9][0-9_]*([Lln]|(\\.[0-9_]*)?([eE][-+]?[0-9_]+)?)?)',
|
||||
relevance: 0
|
||||
},
|
||||
{
|
||||
begin: /[-=]>/ // relevance booster
|
||||
}
|
||||
]
|
||||
};
|
||||
}
|
||||
@@ -1,6 +1,7 @@
|
||||
/*
|
||||
Language: SQL
|
||||
Contributors: Nikolay Lisienko <info@neor.ru>, Heiko August <post@auge8472.de>, Travis Odom <travis.a.odom@gmail.com>
|
||||
Category: common
|
||||
*/
|
||||
|
||||
function(hljs) {
|
||||
|
||||
48
vendor/assets/javascripts/highlight_js/languages/stata.js
vendored
Normal file
48
vendor/assets/javascripts/highlight_js/languages/stata.js
vendored
Normal file
File diff suppressed because one or more lines are too long
61
vendor/assets/javascripts/highlight_js/languages/step21.js
vendored
Normal file
61
vendor/assets/javascripts/highlight_js/languages/step21.js
vendored
Normal file
@@ -0,0 +1,61 @@
|
||||
/*
|
||||
Language: STEP Part 21 (ISO 10303-21)
|
||||
Contributors: Adam Joseph Cook <adam.joseph.cook@gmail.com>
|
||||
Description: Syntax highlighter for STEP Part 21 files (ISO 10303-21).
|
||||
*/
|
||||
|
||||
function(hljs) {
|
||||
var STEP21_IDENT_RE = '[A-Z_][A-Z0-9_.]*';
|
||||
var STEP21_CLOSE_RE = 'END-ISO-10303-21;';
|
||||
var STEP21_KEYWORDS = {
|
||||
literal: '',
|
||||
built_in: '',
|
||||
keyword:
|
||||
'HEADER ENDSEC DATA'
|
||||
};
|
||||
var STEP21_START = {
|
||||
className: 'preprocessor',
|
||||
begin: 'ISO-10303-21;',
|
||||
relevance: 10
|
||||
};
|
||||
var STEP21_CODE = [
|
||||
hljs.C_LINE_COMMENT_MODE,
|
||||
{
|
||||
className: 'comment',
|
||||
begin: '/\\*\\*!', end: '\\*/',
|
||||
contains: [hljs.PHRASAL_WORDS_MODE]
|
||||
},
|
||||
hljs.C_BLOCK_COMMENT_MODE,
|
||||
hljs.C_NUMBER_MODE,
|
||||
hljs.inherit(hljs.APOS_STRING_MODE, {illegal: null}),
|
||||
hljs.inherit(hljs.QUOTE_STRING_MODE, {illegal: null}),
|
||||
{
|
||||
className: 'string',
|
||||
begin: "'", end: "'"
|
||||
},
|
||||
{
|
||||
className: 'label',
|
||||
variants: [
|
||||
{
|
||||
begin: '#', end: '\\d+',
|
||||
illegal: '\\W'
|
||||
}
|
||||
]
|
||||
}
|
||||
];
|
||||
|
||||
return {
|
||||
aliases: ['p21', 'step', 'stp'],
|
||||
case_insensitive: true, // STEP 21 is case insensitive in theory, in practice all non-comments are capitalized.
|
||||
lexemes: STEP21_IDENT_RE,
|
||||
keywords: STEP21_KEYWORDS,
|
||||
contains: [
|
||||
{
|
||||
className: 'preprocessor',
|
||||
begin: STEP21_CLOSE_RE,
|
||||
relevance: 10
|
||||
},
|
||||
STEP21_START
|
||||
].concat(STEP21_CODE)
|
||||
};
|
||||
}
|
||||
448
vendor/assets/javascripts/highlight_js/languages/stylus.js
vendored
Normal file
448
vendor/assets/javascripts/highlight_js/languages/stylus.js
vendored
Normal file
@@ -0,0 +1,448 @@
|
||||
/*
|
||||
Language: Stylus
|
||||
Author: Bryant Williams <b.n.williams@gmail.com>
|
||||
Description: Stylus (https://github.com/LearnBoost/stylus/)
|
||||
Category: css
|
||||
*/
|
||||
|
||||
function(hljs) {
|
||||
|
||||
var VARIABLE = {
|
||||
className: 'variable',
|
||||
begin: '\\$' + hljs.IDENT_RE
|
||||
};
|
||||
|
||||
var HEX_COLOR = {
|
||||
className: 'hexcolor',
|
||||
begin: '#([a-fA-F0-9]{6}|[a-fA-F0-9]{3})',
|
||||
relevance: 10
|
||||
};
|
||||
|
||||
var AT_KEYWORDS = [
|
||||
'charset',
|
||||
'css',
|
||||
'debug',
|
||||
'extend',
|
||||
'font-face',
|
||||
'for',
|
||||
'import',
|
||||
'include',
|
||||
'media',
|
||||
'mixin',
|
||||
'page',
|
||||
'warn',
|
||||
'while'
|
||||
];
|
||||
|
||||
var PSEUDO_SELECTORS = [
|
||||
'after',
|
||||
'before',
|
||||
'first-letter',
|
||||
'first-line',
|
||||
'active',
|
||||
'first-child',
|
||||
'focus',
|
||||
'hover',
|
||||
'lang',
|
||||
'link',
|
||||
'visited'
|
||||
];
|
||||
|
||||
var TAGS = [
|
||||
'a',
|
||||
'abbr',
|
||||
'address',
|
||||
'article',
|
||||
'aside',
|
||||
'audio',
|
||||
'b',
|
||||
'blockquote',
|
||||
'body',
|
||||
'button',
|
||||
'canvas',
|
||||
'caption',
|
||||
'cite',
|
||||
'code',
|
||||
'dd',
|
||||
'del',
|
||||
'details',
|
||||
'dfn',
|
||||
'div',
|
||||
'dl',
|
||||
'dt',
|
||||
'em',
|
||||
'fieldset',
|
||||
'figcaption',
|
||||
'figure',
|
||||
'footer',
|
||||
'form',
|
||||
'h1',
|
||||
'h2',
|
||||
'h3',
|
||||
'h4',
|
||||
'h5',
|
||||
'h6',
|
||||
'header',
|
||||
'hgroup',
|
||||
'html',
|
||||
'i',
|
||||
'iframe',
|
||||
'img',
|
||||
'input',
|
||||
'ins',
|
||||
'kbd',
|
||||
'label',
|
||||
'legend',
|
||||
'li',
|
||||
'mark',
|
||||
'menu',
|
||||
'nav',
|
||||
'object',
|
||||
'ol',
|
||||
'p',
|
||||
'q',
|
||||
'quote',
|
||||
'samp',
|
||||
'section',
|
||||
'span',
|
||||
'strong',
|
||||
'summary',
|
||||
'sup',
|
||||
'table',
|
||||
'tbody',
|
||||
'td',
|
||||
'textarea',
|
||||
'tfoot',
|
||||
'th',
|
||||
'thead',
|
||||
'time',
|
||||
'tr',
|
||||
'ul',
|
||||
'var',
|
||||
'video'
|
||||
];
|
||||
|
||||
var TAG_END = '[\\.\\s\\n\\[\\:,]';
|
||||
|
||||
var ATTRIBUTES = [
|
||||
'align-content',
|
||||
'align-items',
|
||||
'align-self',
|
||||
'animation',
|
||||
'animation-delay',
|
||||
'animation-direction',
|
||||
'animation-duration',
|
||||
'animation-fill-mode',
|
||||
'animation-iteration-count',
|
||||
'animation-name',
|
||||
'animation-play-state',
|
||||
'animation-timing-function',
|
||||
'auto',
|
||||
'backface-visibility',
|
||||
'background',
|
||||
'background-attachment',
|
||||
'background-clip',
|
||||
'background-color',
|
||||
'background-image',
|
||||
'background-origin',
|
||||
'background-position',
|
||||
'background-repeat',
|
||||
'background-size',
|
||||
'border',
|
||||
'border-bottom',
|
||||
'border-bottom-color',
|
||||
'border-bottom-left-radius',
|
||||
'border-bottom-right-radius',
|
||||
'border-bottom-style',
|
||||
'border-bottom-width',
|
||||
'border-collapse',
|
||||
'border-color',
|
||||
'border-image',
|
||||
'border-image-outset',
|
||||
'border-image-repeat',
|
||||
'border-image-slice',
|
||||
'border-image-source',
|
||||
'border-image-width',
|
||||
'border-left',
|
||||
'border-left-color',
|
||||
'border-left-style',
|
||||
'border-left-width',
|
||||
'border-radius',
|
||||
'border-right',
|
||||
'border-right-color',
|
||||
'border-right-style',
|
||||
'border-right-width',
|
||||
'border-spacing',
|
||||
'border-style',
|
||||
'border-top',
|
||||
'border-top-color',
|
||||
'border-top-left-radius',
|
||||
'border-top-right-radius',
|
||||
'border-top-style',
|
||||
'border-top-width',
|
||||
'border-width',
|
||||
'bottom',
|
||||
'box-decoration-break',
|
||||
'box-shadow',
|
||||
'box-sizing',
|
||||
'break-after',
|
||||
'break-before',
|
||||
'break-inside',
|
||||
'caption-side',
|
||||
'clear',
|
||||
'clip',
|
||||
'clip-path',
|
||||
'color',
|
||||
'column-count',
|
||||
'column-fill',
|
||||
'column-gap',
|
||||
'column-rule',
|
||||
'column-rule-color',
|
||||
'column-rule-style',
|
||||
'column-rule-width',
|
||||
'column-span',
|
||||
'column-width',
|
||||
'columns',
|
||||
'content',
|
||||
'counter-increment',
|
||||
'counter-reset',
|
||||
'cursor',
|
||||
'direction',
|
||||
'display',
|
||||
'empty-cells',
|
||||
'filter',
|
||||
'flex',
|
||||
'flex-basis',
|
||||
'flex-direction',
|
||||
'flex-flow',
|
||||
'flex-grow',
|
||||
'flex-shrink',
|
||||
'flex-wrap',
|
||||
'float',
|
||||
'font',
|
||||
'font-family',
|
||||
'font-feature-settings',
|
||||
'font-kerning',
|
||||
'font-language-override',
|
||||
'font-size',
|
||||
'font-size-adjust',
|
||||
'font-stretch',
|
||||
'font-style',
|
||||
'font-variant',
|
||||
'font-variant-ligatures',
|
||||
'font-weight',
|
||||
'height',
|
||||
'hyphens',
|
||||
'icon',
|
||||
'image-orientation',
|
||||
'image-rendering',
|
||||
'image-resolution',
|
||||
'ime-mode',
|
||||
'inherit',
|
||||
'initial',
|
||||
'justify-content',
|
||||
'left',
|
||||
'letter-spacing',
|
||||
'line-height',
|
||||
'list-style',
|
||||
'list-style-image',
|
||||
'list-style-position',
|
||||
'list-style-type',
|
||||
'margin',
|
||||
'margin-bottom',
|
||||
'margin-left',
|
||||
'margin-right',
|
||||
'margin-top',
|
||||
'marks',
|
||||
'mask',
|
||||
'max-height',
|
||||
'max-width',
|
||||
'min-height',
|
||||
'min-width',
|
||||
'nav-down',
|
||||
'nav-index',
|
||||
'nav-left',
|
||||
'nav-right',
|
||||
'nav-up',
|
||||
'none',
|
||||
'normal',
|
||||
'object-fit',
|
||||
'object-position',
|
||||
'opacity',
|
||||
'order',
|
||||
'orphans',
|
||||
'outline',
|
||||
'outline-color',
|
||||
'outline-offset',
|
||||
'outline-style',
|
||||
'outline-width',
|
||||
'overflow',
|
||||
'overflow-wrap',
|
||||
'overflow-x',
|
||||
'overflow-y',
|
||||
'padding',
|
||||
'padding-bottom',
|
||||
'padding-left',
|
||||
'padding-right',
|
||||
'padding-top',
|
||||
'page-break-after',
|
||||
'page-break-before',
|
||||
'page-break-inside',
|
||||
'perspective',
|
||||
'perspective-origin',
|
||||
'pointer-events',
|
||||
'position',
|
||||
'quotes',
|
||||
'resize',
|
||||
'right',
|
||||
'tab-size',
|
||||
'table-layout',
|
||||
'text-align',
|
||||
'text-align-last',
|
||||
'text-decoration',
|
||||
'text-decoration-color',
|
||||
'text-decoration-line',
|
||||
'text-decoration-style',
|
||||
'text-indent',
|
||||
'text-overflow',
|
||||
'text-rendering',
|
||||
'text-shadow',
|
||||
'text-transform',
|
||||
'text-underline-position',
|
||||
'top',
|
||||
'transform',
|
||||
'transform-origin',
|
||||
'transform-style',
|
||||
'transition',
|
||||
'transition-delay',
|
||||
'transition-duration',
|
||||
'transition-property',
|
||||
'transition-timing-function',
|
||||
'unicode-bidi',
|
||||
'vertical-align',
|
||||
'visibility',
|
||||
'white-space',
|
||||
'widows',
|
||||
'width',
|
||||
'word-break',
|
||||
'word-spacing',
|
||||
'word-wrap',
|
||||
'z-index'
|
||||
];
|
||||
|
||||
// illegals
|
||||
var ILLEGAL = [
|
||||
'\\{',
|
||||
'\\}',
|
||||
'\\?',
|
||||
'(\\bReturn\\b)', // monkey
|
||||
'(\\bEnd\\b)', // monkey
|
||||
'(\\bend\\b)', // vbscript
|
||||
';', // sql
|
||||
'#\\s', // markdown
|
||||
'\\*\\s', // markdown
|
||||
'===\\s', // markdown
|
||||
'\\|'
|
||||
];
|
||||
|
||||
return {
|
||||
aliases: ['styl'],
|
||||
case_insensitive: false,
|
||||
illegal: '(' + ILLEGAL.join('|') + ')',
|
||||
keywords: 'if else for in',
|
||||
contains: [
|
||||
|
||||
// strings
|
||||
hljs.QUOTE_STRING_MODE,
|
||||
hljs.APOS_STRING_MODE,
|
||||
|
||||
// comments
|
||||
hljs.C_LINE_COMMENT_MODE,
|
||||
hljs.C_BLOCK_COMMENT_MODE,
|
||||
|
||||
// hex colors
|
||||
HEX_COLOR,
|
||||
|
||||
// class tag
|
||||
{
|
||||
begin: '\\.[a-zA-Z][a-zA-Z0-9_-]*' + TAG_END,
|
||||
returnBegin: true,
|
||||
contains: [
|
||||
{className: 'class', begin: '\\.[a-zA-Z][a-zA-Z0-9_-]*'}
|
||||
]
|
||||
},
|
||||
|
||||
// id tag
|
||||
{
|
||||
begin: '\\#[a-zA-Z][a-zA-Z0-9_-]*' + TAG_END,
|
||||
returnBegin: true,
|
||||
contains: [
|
||||
{className: 'id', begin: '\\#[a-zA-Z][a-zA-Z0-9_-]*'}
|
||||
]
|
||||
},
|
||||
|
||||
// tags
|
||||
{
|
||||
begin: '\\b(' + TAGS.join('|') + ')' + TAG_END,
|
||||
returnBegin: true,
|
||||
contains: [
|
||||
{className: 'tag', begin: '\\b[a-zA-Z][a-zA-Z0-9_-]*'}
|
||||
]
|
||||
},
|
||||
|
||||
// psuedo selectors
|
||||
{
|
||||
className: 'pseudo',
|
||||
begin: '&?:?:\\b(' + PSEUDO_SELECTORS.join('|') + ')' + TAG_END
|
||||
},
|
||||
|
||||
// @ keywords
|
||||
{
|
||||
className: 'at_rule',
|
||||
begin: '\@(' + AT_KEYWORDS.join('|') + ')\\b'
|
||||
},
|
||||
|
||||
// variables
|
||||
VARIABLE,
|
||||
|
||||
// dimension
|
||||
hljs.CSS_NUMBER_MODE,
|
||||
|
||||
// number
|
||||
hljs.NUMBER_MODE,
|
||||
|
||||
// functions
|
||||
// - only from beginning of line + whitespace
|
||||
{
|
||||
className: 'function',
|
||||
begin: '\\b[a-zA-Z][a-zA-Z0-9_\-]*\\(.*\\)',
|
||||
illegal: '[\\n]',
|
||||
returnBegin: true,
|
||||
contains: [
|
||||
{className: 'title', begin: '\\b[a-zA-Z][a-zA-Z0-9_\-]*'},
|
||||
{
|
||||
className: 'params',
|
||||
begin: /\(/,
|
||||
end: /\)/,
|
||||
contains: [
|
||||
HEX_COLOR,
|
||||
VARIABLE,
|
||||
hljs.APOS_STRING_MODE,
|
||||
hljs.CSS_NUMBER_MODE,
|
||||
hljs.NUMBER_MODE,
|
||||
hljs.QUOTE_STRING_MODE
|
||||
]
|
||||
}
|
||||
]
|
||||
},
|
||||
|
||||
// attributes
|
||||
// - only from beginning of line + whitespace
|
||||
// - must have whitespace after it
|
||||
{
|
||||
className: 'attribute',
|
||||
begin: '\\b(' + ATTRIBUTES.reverse().join('|') + ')\\b'
|
||||
}
|
||||
]
|
||||
};
|
||||
}
|
||||
116
vendor/assets/javascripts/highlight_js/languages/swift.js
vendored
Normal file
116
vendor/assets/javascripts/highlight_js/languages/swift.js
vendored
Normal file
@@ -0,0 +1,116 @@
|
||||
/*
|
||||
Language: Swift
|
||||
Author: Chris Eidhof <chris@eidhof.nl>
|
||||
Contributors: Nate Cook <natecook@gmail.com>
|
||||
Category: system
|
||||
*/
|
||||
|
||||
|
||||
function(hljs) {
|
||||
var SWIFT_KEYWORDS = {
|
||||
keyword: 'class deinit enum extension func import init let protocol static ' +
|
||||
'struct subscript typealias var break case continue default do ' +
|
||||
'else fallthrough if in for return switch where while as dynamicType ' +
|
||||
'is new super self Self Type __COLUMN__ __FILE__ __FUNCTION__ ' +
|
||||
'__LINE__ associativity didSet get infix inout left mutating none ' +
|
||||
'nonmutating operator override postfix precedence prefix right set '+
|
||||
'unowned unowned safe unsafe weak willSet',
|
||||
literal: 'true false nil',
|
||||
built_in: 'abs advance alignof alignofValue assert bridgeFromObjectiveC ' +
|
||||
'bridgeFromObjectiveCUnconditional bridgeToObjectiveC ' +
|
||||
'bridgeToObjectiveCUnconditional c contains count countElements ' +
|
||||
'countLeadingZeros debugPrint debugPrintln distance dropFirst dropLast dump ' +
|
||||
'encodeBitsAsWords enumerate equal false filter find getBridgedObjectiveCType ' +
|
||||
'getVaList indices insertionSort isBridgedToObjectiveC ' +
|
||||
'isBridgedVerbatimToObjectiveC isUniquelyReferenced join ' +
|
||||
'lexicographicalCompare map max maxElement min minElement nil numericCast ' +
|
||||
'partition posix print println quickSort reduce reflect reinterpretCast ' +
|
||||
'reverse roundUpToAlignment sizeof sizeofValue sort split startsWith strideof ' +
|
||||
'strideofValue swap swift toString transcode true underestimateCount ' +
|
||||
'unsafeReflect withExtendedLifetime withObjectAtPlusZero withUnsafePointer ' +
|
||||
'withUnsafePointerToObject withUnsafePointers withVaList'
|
||||
};
|
||||
|
||||
var TYPE = {
|
||||
className: 'type',
|
||||
begin: '\\b[A-Z][\\w\']*',
|
||||
relevance: 0
|
||||
};
|
||||
var BLOCK_COMMENT = {
|
||||
className: 'comment',
|
||||
begin: '/\\*', end: '\\*/',
|
||||
contains: [hljs.PHRASAL_WORDS_MODE, 'self']
|
||||
};
|
||||
var SUBST = {
|
||||
className: 'subst',
|
||||
begin: /\\\(/, end: '\\)',
|
||||
keywords: SWIFT_KEYWORDS,
|
||||
contains: [] // assigned later
|
||||
};
|
||||
var NUMBERS = {
|
||||
className: 'number',
|
||||
begin: '\\b([\\d_]+(\\.[\\deE_]+)?|0x[a-fA-F0-9_]+(\\.[a-fA-F0-9p_]+)?|0b[01_]+|0o[0-7_]+)\\b',
|
||||
relevance: 0
|
||||
};
|
||||
var QUOTE_STRING_MODE = hljs.inherit(hljs.QUOTE_STRING_MODE, {
|
||||
contains: [SUBST, hljs.BACKSLASH_ESCAPE]
|
||||
});
|
||||
SUBST.contains = [NUMBERS];
|
||||
|
||||
return {
|
||||
keywords: SWIFT_KEYWORDS,
|
||||
contains: [
|
||||
QUOTE_STRING_MODE,
|
||||
hljs.C_LINE_COMMENT_MODE,
|
||||
BLOCK_COMMENT,
|
||||
TYPE,
|
||||
NUMBERS,
|
||||
{
|
||||
className: 'func',
|
||||
beginKeywords: 'func', end: '{', excludeEnd: true,
|
||||
contains: [
|
||||
hljs.inherit(hljs.TITLE_MODE, {
|
||||
begin: /[A-Za-z$_][0-9A-Za-z$_]*/,
|
||||
illegal: /\(/
|
||||
}),
|
||||
{
|
||||
className: 'generics',
|
||||
begin: /</, end: />/,
|
||||
illegal: />/
|
||||
},
|
||||
{
|
||||
className: 'params',
|
||||
begin: /\(/, end: /\)/,
|
||||
keywords: SWIFT_KEYWORDS,
|
||||
contains: [
|
||||
'self',
|
||||
NUMBERS,
|
||||
QUOTE_STRING_MODE,
|
||||
hljs.C_BLOCK_COMMENT_MODE,
|
||||
{begin: ':'} // relevance booster
|
||||
],
|
||||
illegal: /["']/
|
||||
}
|
||||
],
|
||||
illegal: /\[|%/
|
||||
},
|
||||
{
|
||||
className: 'class',
|
||||
beginKeywords: 'struct protocol class extension enum',
|
||||
keywords: SWIFT_KEYWORDS,
|
||||
end: '\\{',
|
||||
excludeEnd: true,
|
||||
contains: [
|
||||
hljs.inherit(hljs.TITLE_MODE, {begin: /[A-Za-z$_][0-9A-Za-z$_]*/})
|
||||
]
|
||||
},
|
||||
{
|
||||
className: 'preprocessor', // @attributes
|
||||
begin: '(@assignment|@class_protocol|@exported|@final|@lazy|@noreturn|' +
|
||||
'@NSCopying|@NSManaged|@objc|@optional|@required|@auto_closure|' +
|
||||
'@noreturn|@IBAction|@IBDesignable|@IBInspectable|@IBOutlet|' +
|
||||
'@infix|@prefix|@postfix)'
|
||||
}
|
||||
]
|
||||
};
|
||||
}
|
||||
71
vendor/assets/javascripts/highlight_js/languages/tcl.js
vendored
Normal file
71
vendor/assets/javascripts/highlight_js/languages/tcl.js
vendored
Normal file
@@ -0,0 +1,71 @@
|
||||
/*
|
||||
Language: Tcl
|
||||
Author: Radek Liska <radekliska@gmail.com>
|
||||
*/
|
||||
|
||||
function(hljs) {
|
||||
return {
|
||||
aliases: ['tk'],
|
||||
keywords: 'after append apply array auto_execok auto_import auto_load auto_mkindex ' +
|
||||
'auto_mkindex_old auto_qualify auto_reset bgerror binary break catch cd chan clock ' +
|
||||
'close concat continue dde dict encoding eof error eval exec exit expr fblocked ' +
|
||||
'fconfigure fcopy file fileevent filename flush for foreach format gets glob global ' +
|
||||
'history http if incr info interp join lappend|10 lassign|10 lindex|10 linsert|10 list ' +
|
||||
'llength|10 load lrange|10 lrepeat|10 lreplace|10 lreverse|10 lsearch|10 lset|10 lsort|10 '+
|
||||
'mathfunc mathop memory msgcat namespace open package parray pid pkg::create pkg_mkIndex '+
|
||||
'platform platform::shell proc puts pwd read refchan regexp registry regsub|10 rename '+
|
||||
'return safe scan seek set socket source split string subst switch tcl_endOfWord '+
|
||||
'tcl_findLibrary tcl_startOfNextWord tcl_startOfPreviousWord tcl_wordBreakAfter '+
|
||||
'tcl_wordBreakBefore tcltest tclvars tell time tm trace unknown unload unset update '+
|
||||
'uplevel upvar variable vwait while',
|
||||
contains: [
|
||||
{
|
||||
className: 'comment',
|
||||
variants: [
|
||||
{begin: ';[ \\t]*#', end: '$'},
|
||||
{begin: '^[ \\t]*#', end: '$'}
|
||||
]
|
||||
},
|
||||
{
|
||||
beginKeywords: 'proc',
|
||||
end: '[\\{]',
|
||||
excludeEnd: true,
|
||||
contains: [
|
||||
{
|
||||
className: 'symbol',
|
||||
begin: '[ \\t\\n\\r]+(::)?[a-zA-Z_]((::)?[a-zA-Z0-9_])*',
|
||||
end: '[ \\t\\n\\r]',
|
||||
endsWithParent: true,
|
||||
excludeEnd: true
|
||||
}
|
||||
]
|
||||
},
|
||||
{
|
||||
className: 'variable',
|
||||
excludeEnd: true,
|
||||
variants: [
|
||||
{
|
||||
begin: '\\$(\\{)?(::)?[a-zA-Z_]((::)?[a-zA-Z0-9_])*\\(([a-zA-Z0-9_])*\\)',
|
||||
end: '[^a-zA-Z0-9_\\}\\$]'
|
||||
},
|
||||
{
|
||||
begin: '\\$(\\{)?(::)?[a-zA-Z_]((::)?[a-zA-Z0-9_])*',
|
||||
end: '(\\))?[^a-zA-Z0-9_\\}\\$]'
|
||||
}
|
||||
]
|
||||
},
|
||||
{
|
||||
className: 'string',
|
||||
contains: [hljs.BACKSLASH_ESCAPE],
|
||||
variants: [
|
||||
hljs.inherit(hljs.APOS_STRING_MODE, {illegal: null}),
|
||||
hljs.inherit(hljs.QUOTE_STRING_MODE, {illegal: null})
|
||||
]
|
||||
},
|
||||
{
|
||||
className: 'number',
|
||||
variants: [hljs.BINARY_NUMBER_MODE, hljs.C_NUMBER_MODE]
|
||||
}
|
||||
]
|
||||
}
|
||||
}
|
||||
@@ -2,6 +2,7 @@
|
||||
Language: Thrift
|
||||
Author: Oleg Efimov <efimovov@gmail.com>
|
||||
Description: Thrift message definition format
|
||||
Category: protocols
|
||||
*/
|
||||
|
||||
function(hljs) {
|
||||
@@ -31,7 +32,6 @@ function(hljs) {
|
||||
]
|
||||
},
|
||||
{
|
||||
className: 'stl_container',
|
||||
begin: '\\b(set|list|map)\\s*<', end: '>',
|
||||
keywords: BUILT_IN_TYPES,
|
||||
contains: ['self']
|
||||
|
||||
67
vendor/assets/javascripts/highlight_js/languages/twig.js
vendored
Normal file
67
vendor/assets/javascripts/highlight_js/languages/twig.js
vendored
Normal file
@@ -0,0 +1,67 @@
|
||||
/*
|
||||
Language: Twig
|
||||
Requires: xml.js
|
||||
Author: Luke Holder <lukemh@gmail.com>
|
||||
Description: Twig is a templating language for PHP
|
||||
Category: template
|
||||
*/
|
||||
|
||||
function(hljs) {
|
||||
var PARAMS = {
|
||||
className: 'params',
|
||||
begin: '\\(', end: '\\)'
|
||||
};
|
||||
|
||||
var FUNCTION_NAMES = 'attribute block constant cycle date dump include ' +
|
||||
'max min parent random range source template_from_string';
|
||||
|
||||
var FUNCTIONS = {
|
||||
className: 'function',
|
||||
beginKeywords: FUNCTION_NAMES,
|
||||
relevance: 0,
|
||||
contains: [
|
||||
PARAMS
|
||||
]
|
||||
};
|
||||
|
||||
var FILTER = {
|
||||
className: 'filter',
|
||||
begin: /\|[A-Za-z]+:?/,
|
||||
keywords:
|
||||
'abs batch capitalize convert_encoding date date_modify default ' +
|
||||
'escape first format join json_encode keys last length lower ' +
|
||||
'merge nl2br number_format raw replace reverse round slice sort split ' +
|
||||
'striptags title trim upper url_encode',
|
||||
contains: [
|
||||
FUNCTIONS
|
||||
]
|
||||
};
|
||||
|
||||
var TAGS = 'autoescape block do embed extends filter flush for ' +
|
||||
'if import include macro sandbox set spaceless use verbatim';
|
||||
|
||||
TAGS = TAGS + ' ' + TAGS.split(' ').map(function(t){return 'end' + t}).join(' ');
|
||||
|
||||
return {
|
||||
aliases: ['craftcms'],
|
||||
case_insensitive: true,
|
||||
subLanguage: 'xml', subLanguageMode: 'continuous',
|
||||
contains: [
|
||||
{
|
||||
className: 'comment',
|
||||
begin: /\{#/, end: /#}/
|
||||
},
|
||||
{
|
||||
className: 'template_tag',
|
||||
begin: /\{%/, end: /%}/,
|
||||
keywords: TAGS,
|
||||
contains: [FILTER, FUNCTIONS]
|
||||
},
|
||||
{
|
||||
className: 'variable',
|
||||
begin: /\{\{/, end: /}}/,
|
||||
contains: [FILTER, FUNCTIONS]
|
||||
}
|
||||
]
|
||||
};
|
||||
}
|
||||
93
vendor/assets/javascripts/highlight_js/languages/typescript.js
vendored
Normal file
93
vendor/assets/javascripts/highlight_js/languages/typescript.js
vendored
Normal file
@@ -0,0 +1,93 @@
|
||||
/*
|
||||
Language: TypeScript
|
||||
Author: Panu Horsmalahti <panu.horsmalahti@iki.fi>
|
||||
Description: TypeScript is a strict superset of JavaScript
|
||||
Category: scripting
|
||||
*/
|
||||
|
||||
function(hljs) {
|
||||
return {
|
||||
aliases: ['ts'],
|
||||
keywords: {
|
||||
keyword:
|
||||
'in if for while finally var new function|0 do return void else break catch ' +
|
||||
'instanceof with throw case default try this switch continue typeof delete ' +
|
||||
'let yield const class public private get set super interface extends' +
|
||||
'static constructor implements enum export import declare',
|
||||
literal:
|
||||
'true false null undefined NaN Infinity',
|
||||
built_in:
|
||||
'eval isFinite isNaN parseFloat parseInt decodeURI decodeURIComponent ' +
|
||||
'encodeURI encodeURIComponent escape unescape Object Function Boolean Error ' +
|
||||
'EvalError InternalError RangeError ReferenceError StopIteration SyntaxError ' +
|
||||
'TypeError URIError Number Math Date String RegExp Array Float32Array ' +
|
||||
'Float64Array Int16Array Int32Array Int8Array Uint16Array Uint32Array ' +
|
||||
'Uint8Array Uint8ClampedArray ArrayBuffer DataView JSON Intl arguments require ' +
|
||||
'module console window document any number boolean string void'
|
||||
},
|
||||
contains: [
|
||||
{
|
||||
className: 'pi',
|
||||
begin: /^\s*('|")use strict('|")/,
|
||||
relevance: 0
|
||||
},
|
||||
hljs.APOS_STRING_MODE,
|
||||
hljs.QUOTE_STRING_MODE,
|
||||
hljs.C_LINE_COMMENT_MODE,
|
||||
hljs.C_BLOCK_COMMENT_MODE,
|
||||
hljs.C_NUMBER_MODE,
|
||||
{ // "value" container
|
||||
begin: '(' + hljs.RE_STARTERS_RE + '|\\b(case|return|throw)\\b)\\s*',
|
||||
keywords: 'return throw case',
|
||||
contains: [
|
||||
hljs.C_LINE_COMMENT_MODE,
|
||||
hljs.C_BLOCK_COMMENT_MODE,
|
||||
hljs.REGEXP_MODE,
|
||||
{ // E4X
|
||||
begin: /</, end: />;/,
|
||||
relevance: 0,
|
||||
subLanguage: 'xml'
|
||||
}
|
||||
],
|
||||
relevance: 0
|
||||
},
|
||||
{
|
||||
className: 'function',
|
||||
beginKeywords: 'function', end: /\{/, excludeEnd: true,
|
||||
contains: [
|
||||
hljs.inherit(hljs.TITLE_MODE, {begin: /[A-Za-z$_][0-9A-Za-z$_]*/}),
|
||||
{
|
||||
className: 'params',
|
||||
begin: /\(/, end: /\)/,
|
||||
contains: [
|
||||
hljs.C_LINE_COMMENT_MODE,
|
||||
hljs.C_BLOCK_COMMENT_MODE
|
||||
],
|
||||
illegal: /["'\(]/
|
||||
}
|
||||
],
|
||||
illegal: /\[|%/,
|
||||
relevance: 0 // () => {} is more typical in TypeScript
|
||||
},
|
||||
{
|
||||
className: 'constructor',
|
||||
beginKeywords: 'constructor', end: /\{/, excludeEnd: true,
|
||||
relevance: 10
|
||||
},
|
||||
{
|
||||
className: 'module',
|
||||
beginKeywords: 'module', end: /\{/, excludeEnd: true
|
||||
},
|
||||
{
|
||||
className: 'interface',
|
||||
beginKeywords: 'interface', end: /\{/, excludeEnd: true
|
||||
},
|
||||
{
|
||||
begin: /\$[(.]/ // relevance booster for a pattern common to JS libs: `$(something)` and `$.something`
|
||||
},
|
||||
{
|
||||
begin: '\\.' + hljs.IDENT_RE, relevance: 0 // hack: prevents detection of keywords after dots
|
||||
}
|
||||
]
|
||||
};
|
||||
}
|
||||
Some files were not shown because too many files have changed in this diff Show More
Reference in New Issue
Block a user