highlight.js
Advanced tools
Comparing version 8.1.0 to 8.2.0
@@ -21,3 +21,3 @@ var Highlight = function() { | ||
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/.test(c);})[0]; | ||
} | ||
@@ -43,4 +43,2 @@ | ||
offset += child.nodeValue.length; | ||
else if (tag(child) == 'br') | ||
offset += 1; | ||
else if (child.nodeType == 1) { | ||
@@ -53,7 +51,12 @@ result.push({ | ||
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 | ||
}); | ||
} | ||
} | ||
@@ -229,4 +232,2 @@ } | ||
mode.terminators = terminators.length ? langRe(terminators.join('|'), true) : {exec: function(s) {return null;}}; | ||
mode.continuation = {}; | ||
} | ||
@@ -310,3 +311,3 @@ | ||
} | ||
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, subLanguageTop) : highlightAuto(mode_buffer); | ||
// Counting embedded language score towards the host language may be disabled | ||
@@ -320,3 +321,3 @@ // with zeroing the containing mode relevance. Usecase in point is Markdown that | ||
if (top.subLanguageMode == 'continuous') { | ||
top.continuation.top = result.top; | ||
subLanguageTop = result.top; | ||
} | ||
@@ -403,6 +404,7 @@ return buildSpan(result.language, result.value, false, true); | ||
var top = continuation || language; | ||
var subLanguageTop; | ||
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; | ||
} | ||
@@ -508,14 +510,21 @@ } | ||
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/.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); | ||
} | ||
@@ -522,0 +531,0 @@ result.value = fixMarkup(result.value); |
148
lib/index.js
var Highlight = require('./highlight'); | ||
var hljs = new Highlight(); | ||
hljs.registerLanguage('bash', require('./languages/bash.js')); | ||
hljs.registerLanguage('fix', require('./languages/fix.js')); | ||
hljs.registerLanguage('nsis', require('./languages/nsis.js')); | ||
hljs.registerLanguage('xml', require('./languages/xml.js')); | ||
hljs.registerLanguage('asciidoc', require('./languages/asciidoc.js')); | ||
hljs.registerLanguage('rsl', require('./languages/rsl.js')); | ||
hljs.registerLanguage('autohotkey', require('./languages/autohotkey.js')); | ||
hljs.registerLanguage('elixir', require('./languages/elixir.js')); | ||
hljs.registerLanguage('django', require('./languages/django.js')); | ||
hljs.registerLanguage('vhdl', require('./languages/vhdl.js')); | ||
hljs.registerLanguage('haxe', require('./languages/haxe.js')); | ||
hljs.registerLanguage('erlang', require('./languages/erlang.js')); | ||
hljs.registerLanguage('cs', require('./languages/cs.js')); | ||
hljs.registerLanguage('protobuf', require('./languages/protobuf.js')); | ||
hljs.registerLanguage('vim', require('./languages/vim.js')); | ||
hljs.registerLanguage('brainfuck', require('./languages/brainfuck.js')); | ||
hljs.registerLanguage('ruby', require('./languages/ruby.js')); | ||
hljs.registerLanguage('nimrod', require('./languages/nimrod.js')); | ||
hljs.registerLanguage('rust', require('./languages/rust.js')); | ||
hljs.registerLanguage('ruleslanguage', require('./languages/ruleslanguage.js')); | ||
hljs.registerLanguage('rib', require('./languages/rib.js')); | ||
hljs.registerLanguage('diff', require('./languages/diff.js')); | ||
hljs.registerLanguage('haml', require('./languages/haml.js')); | ||
hljs.registerLanguage('coffeescript', require('./languages/coffeescript.js')); | ||
hljs.registerLanguage('mel', require('./languages/mel.js')); | ||
hljs.registerLanguage('nginx', require('./languages/nginx.js')); | ||
hljs.registerLanguage('oxygene', require('./languages/oxygene.js')); | ||
hljs.registerLanguage('livecodeserver', require('./languages/livecodeserver.js')); | ||
hljs.registerLanguage('monkey', require('./languages/monkey.js')); | ||
hljs.registerLanguage('dust', require('./languages/dust.js')); | ||
hljs.registerLanguage('go', require('./languages/go.js')); | ||
hljs.registerLanguage('json', require('./languages/json.js')); | ||
hljs.registerLanguage('cmake', require('./languages/cmake.js')); | ||
hljs.registerLanguage('clojure', require('./languages/clojure.js')); | ||
hljs.registerLanguage('scheme', require('./languages/scheme.js')); | ||
hljs.registerLanguage('lasso', require('./languages/lasso.js')); | ||
hljs.registerLanguage('http', require('./languages/http.js')); | ||
hljs.registerLanguage('javascript', require('./languages/javascript.js')); | ||
hljs.registerLanguage('mizar', require('./languages/mizar.js')); | ||
hljs.registerLanguage('markdown', require('./languages/markdown.js')); | ||
hljs.registerLanguage('dart', require('./languages/dart.js')); | ||
hljs.registerLanguage('glsl', require('./languages/glsl.js')); | ||
hljs.registerLanguage('rsl', require('./languages/rsl.js')); | ||
hljs.registerLanguage('lua', require('./languages/lua.js')); | ||
hljs.registerLanguage('xml', require('./languages/xml.js')); | ||
hljs.registerLanguage('markdown', require('./languages/markdown.js')); | ||
hljs.registerLanguage('css', require('./languages/css.js')); | ||
hljs.registerLanguage('capnproto', require('./languages/capnproto.js')); | ||
hljs.registerLanguage('lisp', require('./languages/lisp.js')); | ||
hljs.registerLanguage('profile', require('./languages/profile.js')); | ||
hljs.registerLanguage('http', require('./languages/http.js')); | ||
hljs.registerLanguage('java', require('./languages/java.js')); | ||
hljs.registerLanguage('gherkin', require('./languages/gherkin.js')); | ||
hljs.registerLanguage('fsharp', require('./languages/fsharp.js')); | ||
hljs.registerLanguage('mathematica', require('./languages/mathematica.js')); | ||
hljs.registerLanguage('swift', require('./languages/swift.js')); | ||
hljs.registerLanguage('php', require('./languages/php.js')); | ||
hljs.registerLanguage('haskell', require('./languages/haskell.js')); | ||
hljs.registerLanguage('1c', require('./languages/1c.js')); | ||
hljs.registerLanguage('x86asm', require('./languages/x86asm.js')); | ||
hljs.registerLanguage('python', require('./languages/python.js')); | ||
hljs.registerLanguage('smalltalk', require('./languages/smalltalk.js')); | ||
hljs.registerLanguage('tex', require('./languages/tex.js')); | ||
hljs.registerLanguage('actionscript', require('./languages/actionscript.js')); | ||
hljs.registerLanguage('sql', require('./languages/sql.js')); | ||
hljs.registerLanguage('nix', require('./languages/nix.js')); | ||
hljs.registerLanguage('handlebars', require('./languages/handlebars.js')); | ||
hljs.registerLanguage('thrift', require('./languages/thrift.js')); | ||
hljs.registerLanguage('gherkin', require('./languages/gherkin.js')); | ||
hljs.registerLanguage('php', require('./languages/php.js')); | ||
hljs.registerLanguage('applescript', require('./languages/applescript.js')); | ||
hljs.registerLanguage('profile', require('./languages/profile.js')); | ||
hljs.registerLanguage('brainfuck', require('./languages/brainfuck.js')); | ||
hljs.registerLanguage('makefile', require('./languages/makefile.js')); | ||
hljs.registerLanguage('vbnet', require('./languages/vbnet.js')); | ||
hljs.registerLanguage('vala', require('./languages/vala.js')); | ||
hljs.registerLanguage('vbscript', require('./languages/vbscript.js')); | ||
hljs.registerLanguage('bash', require('./languages/bash.js')); | ||
hljs.registerLanguage('gcode', require('./languages/gcode.js')); | ||
hljs.registerLanguage('nimrod', require('./languages/nimrod.js')); | ||
hljs.registerLanguage('vim', require('./languages/vim.js')); | ||
hljs.registerLanguage('scss', require('./languages/scss.js')); | ||
hljs.registerLanguage('gradle', require('./languages/gradle.js')); | ||
hljs.registerLanguage('delphi', require('./languages/delphi.js')); | ||
hljs.registerLanguage('cpp', require('./languages/cpp.js')); | ||
hljs.registerLanguage('perl', require('./languages/perl.js')); | ||
hljs.registerLanguage('haskell', require('./languages/haskell.js')); | ||
hljs.registerLanguage('smalltalk', require('./languages/smalltalk.js')); | ||
hljs.registerLanguage('ini', require('./languages/ini.js')); | ||
hljs.registerLanguage('livecodeserver', require('./languages/livecodeserver.js')); | ||
hljs.registerLanguage('rib', require('./languages/rib.js')); | ||
hljs.registerLanguage('d', require('./languages/d.js')); | ||
hljs.registerLanguage('vbnet', require('./languages/vbnet.js')); | ||
hljs.registerLanguage('apache', require('./languages/apache.js')); | ||
hljs.registerLanguage('ruleslanguage', require('./languages/ruleslanguage.js')); | ||
hljs.registerLanguage('mathematica', require('./languages/mathematica.js')); | ||
hljs.registerLanguage('scala', require('./languages/scala.js')); | ||
hljs.registerLanguage('tex', require('./languages/tex.js')); | ||
hljs.registerLanguage('java', require('./languages/java.js')); | ||
hljs.registerLanguage('r', require('./languages/r.js')); | ||
hljs.registerLanguage('axapta', require('./languages/axapta.js')); | ||
hljs.registerLanguage('perl', require('./languages/perl.js')); | ||
hljs.registerLanguage('scala', require('./languages/scala.js')); | ||
hljs.registerLanguage('cmake', require('./languages/cmake.js')); | ||
hljs.registerLanguage('actionscript', require('./languages/actionscript.js')); | ||
hljs.registerLanguage('nix', require('./languages/nix.js')); | ||
hljs.registerLanguage('q', require('./languages/q.js')); | ||
hljs.registerLanguage('lisp', require('./languages/lisp.js')); | ||
hljs.registerLanguage('ruby', require('./languages/ruby.js')); | ||
hljs.registerLanguage('haml', require('./languages/haml.js')); | ||
hljs.registerLanguage('avrasm', require('./languages/avrasm.js')); | ||
hljs.registerLanguage('dos', require('./languages/dos.js')); | ||
hljs.registerLanguage('erlang', require('./languages/erlang.js')); | ||
hljs.registerLanguage('1c', require('./languages/1c.js')); | ||
hljs.registerLanguage('cs', require('./languages/cs.js')); | ||
hljs.registerLanguage('protobuf', require('./languages/protobuf.js')); | ||
hljs.registerLanguage('rust', require('./languages/rust.js')); | ||
hljs.registerLanguage('fsharp', require('./languages/fsharp.js')); | ||
hljs.registerLanguage('lua', require('./languages/lua.js')); | ||
hljs.registerLanguage('fix', require('./languages/fix.js')); | ||
hljs.registerLanguage('parser3', require('./languages/parser3.js')); | ||
hljs.registerLanguage('scilab', require('./languages/scilab.js')); | ||
hljs.registerLanguage('diff', require('./languages/diff.js')); | ||
hljs.registerLanguage('typescript', require('./languages/typescript.js')); | ||
hljs.registerLanguage('ocaml', require('./languages/ocaml.js')); | ||
hljs.registerLanguage('autohotkey', require('./languages/autohotkey.js')); | ||
hljs.registerLanguage('groovy', require('./languages/groovy.js')); | ||
hljs.registerLanguage('objectivec', require('./languages/objectivec.js')); | ||
hljs.registerLanguage('avrasm', require('./languages/avrasm.js')); | ||
hljs.registerLanguage('vhdl', require('./languages/vhdl.js')); | ||
hljs.registerLanguage('coffeescript', require('./languages/coffeescript.js')); | ||
hljs.registerLanguage('mizar', require('./languages/mizar.js')); | ||
hljs.registerLanguage('nginx', require('./languages/nginx.js')); | ||
hljs.registerLanguage('css', require('./languages/css.js')); | ||
hljs.registerLanguage('thrift', require('./languages/thrift.js')); | ||
hljs.registerLanguage('capnproto', require('./languages/capnproto.js')); | ||
hljs.registerLanguage('erlang-repl', require('./languages/erlang-repl.js')); | ||
hljs.registerLanguage('r', require('./languages/r.js')); | ||
hljs.registerLanguage('json', require('./languages/json.js')); | ||
hljs.registerLanguage('django', require('./languages/django.js')); | ||
hljs.registerLanguage('delphi', require('./languages/delphi.js')); | ||
hljs.registerLanguage('vbscript', require('./languages/vbscript.js')); | ||
hljs.registerLanguage('oxygene', require('./languages/oxygene.js')); | ||
hljs.registerLanguage('mel', require('./languages/mel.js')); | ||
hljs.registerLanguage('dos', require('./languages/dos.js')); | ||
hljs.registerLanguage('apache', require('./languages/apache.js')); | ||
hljs.registerLanguage('scss', require('./languages/scss.js')); | ||
hljs.registerLanguage('monkey', require('./languages/monkey.js')); | ||
hljs.registerLanguage('applescript', require('./languages/applescript.js')); | ||
hljs.registerLanguage('lasso', require('./languages/lasso.js')); | ||
hljs.registerLanguage('cpp', require('./languages/cpp.js')); | ||
hljs.registerLanguage('python', require('./languages/python.js')); | ||
hljs.registerLanguage('x86asm', require('./languages/x86asm.js')); | ||
hljs.registerLanguage('matlab', require('./languages/matlab.js')); | ||
hljs.registerLanguage('scilab', require('./languages/scilab.js')); | ||
hljs.registerLanguage('makefile', require('./languages/makefile.js')); | ||
hljs.registerLanguage('asciidoc', require('./languages/asciidoc.js')); | ||
hljs.registerLanguage('parser3', require('./languages/parser3.js')); | ||
hljs.registerLanguage('clojure', require('./languages/clojure.js')); | ||
hljs.registerLanguage('elixir', require('./languages/elixir.js')); | ||
hljs.registerLanguage('typescript', require('./languages/typescript.js')); | ||
hljs.registerLanguage('go', require('./languages/go.js')); | ||
hljs.registerLanguage('nsis', require('./languages/nsis.js')); | ||
module.exports = hljs; |
@@ -24,7 +24,3 @@ module.exports = function(hljs) { | ||
contains: [ | ||
{ | ||
className: 'inheritance', | ||
beginKeywords: 'extends implements', | ||
relevance: 10 | ||
}, | ||
{beginKeywords: 'extends implements'}, | ||
hljs.UNDERSCORE_TITLE_MODE | ||
@@ -31,0 +27,0 @@ ] |
@@ -5,3 +5,3 @@ module.exports = function(hljs) { | ||
// 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? '+ | ||
@@ -74,10 +74,10 @@ 'set? ifn? fn? associative? sequential? sorted? counted? reversible? number? decimal? '+ | ||
}; | ||
var TITLE = { | ||
var NAME = { | ||
keywords: keywords, | ||
lexemes: CLJ_IDENT_RE, | ||
className: 'title', begin: CLJ_IDENT_RE, | ||
className: 'keyword', begin: CLJ_IDENT_RE, | ||
starts: BODY | ||
}; | ||
LIST.contains = [{className: 'comment', begin: 'comment'}, TITLE, BODY]; | ||
LIST.contains = [{className: 'comment', begin: 'comment'}, NAME, BODY]; | ||
BODY.contains = [LIST, STRING, HINT, HINT_COL, COMMENT, KEY, COLLECTION, NUMBER]; | ||
@@ -84,0 +84,0 @@ COLLECTION.contains = [LIST, STRING, HINT, COMMENT, KEY, COLLECTION, NUMBER]; |
@@ -63,3 +63,5 @@ module.exports = function(hljs) { | ||
{ | ||
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,2 +85,3 @@ ] | ||
keywords: KEYWORDS, | ||
illegal: /\/\*/, | ||
contains: EXPRESSIONS.concat([ | ||
@@ -92,3 +95,3 @@ { | ||
className: 'function', | ||
begin: '(' + JS_IDENT_RE + '\\s*=\\s*)?(\\(.*\\))?\\s*\\B[-=]>', end: '[-=]>', | ||
begin: '(^\\s*|\\B)(' + JS_IDENT_RE + '\\s*=\\s*)?(\\(.*\\))?\\s*\\B[-=]>', end: '[-=]>', | ||
returnBegin: true, | ||
@@ -99,3 +102,3 @@ contains: [ | ||
className: 'params', | ||
begin: '\\(', returnBegin: true, | ||
begin: '\\([^\\(]', returnBegin: true, | ||
/* We need another contained nameless mode to not have every nested | ||
@@ -102,0 +105,0 @@ pair of parens to be called "params" */ |
@@ -10,5 +10,7 @@ module.exports = function(hljs) { | ||
'uint ulong unchecked unsafe ushort using virtual volatile void while async await ' + | ||
'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 { | ||
@@ -55,17 +57,38 @@ aliases: ['csharp'], | ||
{ | ||
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 | ||
] | ||
}, | ||
{ | ||
// this prevents 'new Name(...)' from being recognized as a function definition | ||
beginKeywords: 'new', end: /\s/, | ||
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] | ||
}, | ||
{ | ||
begin: hljs.IDENT_RE + '\\s*\\(', returnBegin: true, | ||
className: 'params', | ||
begin: /\(/, end: /\)/, | ||
keywords: KEYWORDS, | ||
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 | ||
] | ||
@@ -72,0 +95,0 @@ } |
module.exports = 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 { | ||
@@ -6,27 +16,32 @@ aliases: ['bat', 'cmd'], | ||
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: '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: 'envvar', begin: '![^ ]+?!' | ||
}, | ||
{ | ||
className: 'number', begin: '\\b\\d+', | ||
relevance: 0 | ||
}, | ||
{ | ||
className: 'comment', | ||
begin: '@?rem', end: '$' | ||
} | ||
COMMENT | ||
] | ||
}; | ||
}; |
@@ -6,4 +6,4 @@ module.exports = function(hljs) { | ||
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: | ||
@@ -10,0 +10,0 @@ 'false true' |
module.exports = 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 ' + | ||
@@ -29,3 +39,4 @@ 'downcast downto elif else end exception extern false finally for ' + | ||
contains: [ | ||
hljs.UNDERSCORE_TITLE_MODE | ||
hljs.UNDERSCORE_TITLE_MODE, | ||
TYPEPARAM | ||
] | ||
@@ -35,3 +46,4 @@ }, | ||
className: 'annotation', | ||
begin: '\\[<', end: '>\\]' | ||
begin: '\\[<', end: '>\\]', | ||
relevance: 10 | ||
}, | ||
@@ -38,0 +50,0 @@ { |
module.exports = function (hljs) { | ||
return { | ||
aliases: ['feature'], | ||
keywords: 'Feature Background Ability Business\ Need Scenario Scenarios Scenario\ Outline Scenario\ Template Examples Given And Then But When', | ||
@@ -4,0 +5,0 @@ contains: [ |
module.exports = function(hljs) { | ||
var GENERIC_IDENT_RE = hljs.UNDERSCORE_IDENT_RE + '(<' + hljs.UNDERSCORE_IDENT_RE + '>)?'; | ||
var KEYWORDS = | ||
@@ -6,3 +7,3 @@ 'false synchronized int abstract float private char boolean static null if const ' + | ||
'enum else break transient new catch instanceof byte super volatile case assert short ' + | ||
'package default double public try this switch continue throws'; | ||
'package default double public try this switch continue throws protected public private'; | ||
return { | ||
@@ -16,6 +17,6 @@ aliases: ['jsp'], | ||
begin: '/\\*\\*', end: '\\*/', | ||
relevance: 0, | ||
contains: [{ | ||
className: 'javadoctag', begin: '(^|\\s)@[A-Za-z]+' | ||
}], | ||
relevance: 10 | ||
}] | ||
}, | ||
@@ -27,23 +28,39 @@ hljs.C_LINE_COMMENT_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 | ||
] | ||
}, | ||
{ | ||
// this prevents 'new Name(...)' from being recognized as a function definition | ||
beginKeywords: 'new', end: /\s/, | ||
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, | ||
contains: [hljs.UNDERSCORE_TITLE_MODE] | ||
}, | ||
{ | ||
begin: hljs.UNDERSCORE_IDENT_RE + '\\s*\\(', returnBegin: true, | ||
className: 'params', | ||
begin: /\(/, end: /\)/, | ||
keywords: KEYWORDS, | ||
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 | ||
] | ||
@@ -50,0 +67,0 @@ }, |
@@ -25,3 +25,3 @@ module.exports = function(hljs) { | ||
className: 'comment', | ||
begin: ';', end: '$' | ||
begin: ';', end: '$', relevance: 0 | ||
}; | ||
@@ -49,3 +49,3 @@ var VARIABLE = { | ||
begin: '\\(quote ', end: '\\)', | ||
keywords: {title: 'quote'} | ||
keywords: 'quote' | ||
} | ||
@@ -66,3 +66,3 @@ ] | ||
}; | ||
LIST.contains = [{className: 'title', begin: LISP_IDENT_RE}, BODY]; | ||
LIST.contains = [{className: 'keyword', begin: LISP_IDENT_RE}, BODY]; | ||
BODY.contains = [QUOTED, QUOTED_ATOM, LIST, LITERAL, NUMBER, STRING, COMMENT, VARIABLE, KEYWORD]; | ||
@@ -69,0 +69,0 @@ |
@@ -37,2 +37,3 @@ module.exports = function(hljs) { | ||
begin: /^\t+/, end: /$/, | ||
relevance: 0, | ||
contains: [ | ||
@@ -39,0 +40,0 @@ hljs.QUOTE_STRING_MODE, |
@@ -61,3 +61,3 @@ module.exports = function(hljs) { | ||
{ | ||
begin: '\\[.+?\\][\\(\\[].+?[\\)\\]]', | ||
begin: '\\[.+?\\][\\(\\[].*?[\\)\\]]', | ||
returnBegin: true, | ||
@@ -86,3 +86,3 @@ contains: [ | ||
{ | ||
begin: '^\\[\.+\\]:', end: '$', | ||
begin: '^\\[\.+\\]:', | ||
returnBegin: true, | ||
@@ -92,8 +92,8 @@ 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: '$' | ||
} | ||
} | ||
@@ -100,0 +100,0 @@ ] |
@@ -32,3 +32,4 @@ module.exports = function(hljs) { | ||
className: 'url', | ||
begin: '([a-z]+):/', end: '\\s', endsWithParent: true, excludeEnd: true | ||
begin: '([a-z]+):/', end: '\\s', endsWithParent: true, excludeEnd: true, | ||
contains: [VAR] | ||
}, | ||
@@ -35,0 +36,0 @@ { |
@@ -16,3 +16,3 @@ module.exports = function(hljs) { | ||
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 ' + | ||
@@ -29,2 +29,3 @@ 'UISegmentedControl NSObject UITableViewDelegate UITableViewDataSource NSThread ' + | ||
'NSUserDefaults UIWindow NSRange NSArray NSError NSURLRequest NSURLConnection ' + | ||
'NSURLSession NSURLSessionDataTask NSURLSessionDownloadTask NSURLSessionUploadTask NSURLResponse' + | ||
'UIInterfaceOrientation MPMoviePlayerController dispatch_once_t ' + | ||
@@ -31,0 +32,0 @@ 'dispatch_queue_t dispatch_sync dispatch_async dispatch_once' |
@@ -85,6 +85,3 @@ module.exports = function(hljs) { | ||
contains: [ | ||
{ | ||
beginKeywords: 'extends implements', | ||
relevance: 10 | ||
}, | ||
{beginKeywords: 'extends implements'}, | ||
hljs.UNDERSCORE_TITLE_MODE | ||
@@ -91,0 +88,0 @@ ] |
@@ -102,4 +102,3 @@ module.exports = function(hljs) { | ||
className: 'symbol', | ||
begin: ':', | ||
contains: [STRING, {begin: RUBY_METHOD_RE}], | ||
begin: hljs.UNDERSCORE_IDENT_RE + '(\\!|\\?)?:', | ||
relevance: 0 | ||
@@ -109,3 +108,4 @@ }, | ||
className: 'symbol', | ||
begin: hljs.UNDERSCORE_IDENT_RE + '(\\!|\\?)?:', | ||
begin: ':', | ||
contains: [STRING, {begin: RUBY_METHOD_RE}], | ||
relevance: 0 | ||
@@ -145,35 +145,17 @@ }, | ||
PARAMS.contains = RUBY_DEFAULT_CONTAINS; | ||
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: /^\S[^=>\n]*>+/, | ||
starts: { | ||
end: '$', contains: RUBY_DEFAULT_CONTAINS | ||
} | ||
} | ||
@@ -185,4 +167,4 @@ ]; | ||
keywords: RUBY_KEYWORDS, | ||
contains: IRB_DEFAULT.concat(RUBY_DEFAULT_CONTAINS) | ||
contains: [COMMENT].concat(IRB_DEFAULT).concat(RUBY_DEFAULT_CONTAINS) | ||
}; | ||
}; |
module.exports = function(hljs) { | ||
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! fail! 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: '</', | ||
@@ -14,0 +23,0 @@ contains: [ |
module.exports = function(hljs) { | ||
var ANNOTATION = { | ||
className: 'annotation', begin: '@[A-Za-z]+' | ||
}; | ||
var STRING = { | ||
@@ -10,2 +12,3 @@ className: 'string', | ||
}; | ||
var SYMBOL = { | ||
@@ -15,42 +18,53 @@ className: 'symbol', | ||
}; | ||
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, | ||
@@ -57,0 +71,0 @@ ANNOTATION |
@@ -62,3 +62,3 @@ module.exports = function(hljs) { | ||
className: 'func', | ||
beginKeywords: 'func', excludeEnd: true, | ||
beginKeywords: 'func', end: '{', excludeEnd: true, | ||
contains: [ | ||
@@ -77,5 +77,9 @@ hljs.inherit(hljs.TITLE_MODE, { | ||
begin: /\(/, end: /\)/, | ||
keywords: SWIFT_KEYWORDS, | ||
contains: [ | ||
hljs.C_LINE_COMMENT_MODE, | ||
hljs.C_BLOCK_COMMENT_MODE | ||
'self', | ||
NUMBERS, | ||
QUOTE_STRING_MODE, | ||
hljs.C_BLOCK_COMMENT_MODE, | ||
{begin: ':'} // relevance booster | ||
], | ||
@@ -82,0 +86,0 @@ illegal: /["']/ |
@@ -96,3 +96,3 @@ module.exports = function(hljs) { | ||
{ | ||
className: 'title', begin: '[^ /><]+', relevance: 0 | ||
className: 'title', begin: /[^ \/><\n\t]+/, relevance: 0 | ||
}, | ||
@@ -99,0 +99,0 @@ TAG_INTERNALS |
764
package.json
{ | ||
"description": "Syntax highlighting with language autodetection.", | ||
"keywords": [ | ||
"highlight", | ||
"syntax" | ||
], | ||
"main": "./lib/index.js", | ||
"version": "8.1.0", | ||
"homepage": "http://highlightjs.org/", | ||
"bugs": { | ||
"url": "https://github.com/isagalaev/highlight.js/issues" | ||
}, | ||
"contributors": [ | ||
{ | ||
"email": "maniac@softwaremaniacs.org", | ||
"name": "Ivan Sagalaev (original author)" | ||
}, | ||
"name": "Ivan Sagalaev (original author)", | ||
"email": "maniac@softwaremaniacs.org" | ||
}, | ||
{ | ||
"email": "sourdrums@gmail.com", | ||
"name": "Jeremy Hull" | ||
}, | ||
"name": "Jeremy Hull", | ||
"email": "sourdrums@gmail.com" | ||
}, | ||
{ | ||
"email": "efimovov@gmail.com", | ||
"name": "Oleg Efimov" | ||
}, | ||
"name": "Oleg Efimov", | ||
"email": "efimovov@gmail.com" | ||
}, | ||
{ | ||
"email": "gojpeg@gmail.com", | ||
"name": "Peter Leonov" | ||
}, | ||
"name": "Peter Leonov", | ||
"email": "gojpeg@gmail.com" | ||
}, | ||
{ | ||
"email": "Victor.Karamzin@enterra-inc.com", | ||
"name": "Victor Karamzin" | ||
}, | ||
"name": "Victor Karamzin", | ||
"email": "Victor.Karamzin@enterra-inc.com" | ||
}, | ||
{ | ||
"email": "vsevolod.solovyov@gmail.com", | ||
"name": "Vsevolod Solovyov" | ||
}, | ||
"name": "Vsevolod Solovyov", | ||
"email": "vsevolod.solovyov@gmail.com" | ||
}, | ||
{ | ||
"email": "anton@kovalyov.net", | ||
"name": "Anton Kovalyov" | ||
}, | ||
"name": "Anton Kovalyov", | ||
"email": "anton@kovalyov.net" | ||
}, | ||
{ | ||
"email": "lenikita@yandex.ru", | ||
"name": "Nikita Ledyaev" | ||
}, | ||
"name": "Nikita Ledyaev", | ||
"email": "lenikita@yandex.ru" | ||
}, | ||
{ | ||
"email": "qewerty@gmail.com", | ||
"name": "Konstantin Evdokimenko" | ||
}, | ||
"name": "Konstantin Evdokimenko", | ||
"email": "qewerty@gmail.com" | ||
}, | ||
{ | ||
"email": "dmitri@roudakov.ru", | ||
"name": "Dmitri Roudakov" | ||
}, | ||
"name": "Dmitri Roudakov", | ||
"email": "dmitri@roudakov.ru" | ||
}, | ||
{ | ||
"email": "ivanov@supersoft.ru", | ||
"name": "Yuri Ivanov" | ||
}, | ||
"name": "Yuri Ivanov", | ||
"email": "ivanov@supersoft.ru" | ||
}, | ||
{ | ||
"email": "vooon341@mail.ru", | ||
"name": "Vladimir Ermakov" | ||
}, | ||
"name": "Vladimir Ermakov", | ||
"email": "vooon341@mail.ru" | ||
}, | ||
{ | ||
"email": "xonixx@gmail.com", | ||
"name": "Vladimir Gubarkov" | ||
}, | ||
"name": "Vladimir Gubarkov", | ||
"email": "xonixx@gmail.com" | ||
}, | ||
{ | ||
"email": "exogen@gmail.com", | ||
"name": "Brian Beck" | ||
}, | ||
"name": "Brian Beck", | ||
"email": "exogen@gmail.com" | ||
}, | ||
{ | ||
"email": "majestic2k@gmail.com", | ||
"name": "MajestiC" | ||
}, | ||
"name": "MajestiC", | ||
"email": "majestic2k@gmail.com" | ||
}, | ||
{ | ||
"email": "vast@whiteants.net", | ||
"name": "Vasily Polovnyov" | ||
}, | ||
"name": "Vasily Polovnyov", | ||
"email": "vast@whiteants.net" | ||
}, | ||
{ | ||
"email": "voldmar@voldmar.ru", | ||
"name": "Vladimir Epifanov" | ||
}, | ||
"name": "Vladimir Epifanov", | ||
"email": "voldmar@voldmar.ru" | ||
}, | ||
{ | ||
"email": "sam@rmcreative.ru", | ||
"name": "Alexander Makarov" | ||
}, | ||
"name": "Alexander Makarov", | ||
"email": "sam@rmcreative.ru" | ||
}, | ||
{ | ||
"email": "vahtenberg@gmail.com", | ||
"name": "Vah" | ||
}, | ||
"name": "Vah", | ||
"email": "vahtenberg@gmail.com" | ||
}, | ||
{ | ||
"email": "drake.guan@gmail.com", | ||
"name": "Shuen-Huei Guan" | ||
}, | ||
"name": "Shuen-Huei Guan", | ||
"email": "drake.guan@gmail.com" | ||
}, | ||
{ | ||
"email": "jason@diamond.name", | ||
"name": "Jason Diamond" | ||
}, | ||
"name": "Jason Diamond", | ||
"email": "jason@diamond.name" | ||
}, | ||
{ | ||
"email": "mgabru@gmail.com", | ||
"name": "Michal Gabrukiewicz" | ||
}, | ||
"name": "Michal Gabrukiewicz", | ||
"email": "mgabru@gmail.com" | ||
}, | ||
{ | ||
"email": "rukeba@gmail.com", | ||
"name": "Ruslan Keba" | ||
}, | ||
"name": "Ruslan Keba", | ||
"email": "rukeba@gmail.com" | ||
}, | ||
{ | ||
"email": "segyrn@yandex.ru", | ||
"name": "Sergey Baranov" | ||
}, | ||
"name": "Sergey Baranov", | ||
"email": "segyrn@yandex.ru" | ||
}, | ||
{ | ||
"email": "yur4ik7@ukr.net", | ||
"name": "Zaripov Yura" | ||
}, | ||
"name": "Zaripov Yura", | ||
"email": "yur4ik7@ukr.net" | ||
}, | ||
{ | ||
"email": "oleg@volchkov.net", | ||
"name": "Oleg Volchkov" | ||
}, | ||
"name": "Oleg Volchkov", | ||
"email": "oleg@volchkov.net" | ||
}, | ||
{ | ||
"email": "vaskas@programica.ru", | ||
"name": "Vasily Mikhailitchenko" | ||
}, | ||
"name": "Vasily Mikhailitchenko", | ||
"email": "vaskas@programica.ru" | ||
}, | ||
{ | ||
"email": "jan.berkel@gmail.com", | ||
"name": "Jan Berkel" | ||
}, | ||
"name": "Jan Berkel", | ||
"email": "jan.berkel@gmail.com" | ||
}, | ||
{ | ||
"email": "vladmos@gmail.com", | ||
"name": "Vladimir Moskva" | ||
}, | ||
"name": "Vladimir Moskva", | ||
"email": "vladmos@gmail.com" | ||
}, | ||
{ | ||
"email": "lsegal@soen.ca", | ||
"name": "Loren Segal" | ||
}, | ||
"name": "Loren Segal", | ||
"email": "lsegal@soen.ca" | ||
}, | ||
{ | ||
"email": "dmmdrs@mail.ru", | ||
"name": "Andrew Fedorov" | ||
}, | ||
"name": "Andrew Fedorov", | ||
"email": "dmmdrs@mail.ru" | ||
}, | ||
{ | ||
"email": "igor@kalnitsky.org", | ||
"name": "Igor Kalnitsky" | ||
}, | ||
"name": "Igor Kalnitsky", | ||
"email": "igor@kalnitsky.org" | ||
}, | ||
{ | ||
"email": "valerii.hiora@gmail.com", | ||
"name": "Valerii Hiora" | ||
}, | ||
"name": "Valerii Hiora", | ||
"email": "valerii.hiora@gmail.com" | ||
}, | ||
{ | ||
"email": "nikolay.desh@gmail.com", | ||
"name": "Nikolay Zakharov" | ||
}, | ||
"name": "Nikolay Zakharov", | ||
"email": "nikolay.desh@gmail.com" | ||
}, | ||
{ | ||
"email": "arhibot@gmail.com", | ||
"name": "Dmitry Kovega" | ||
}, | ||
"name": "Dmitry Kovega", | ||
"email": "arhibot@gmail.com" | ||
}, | ||
{ | ||
"email": "sergey@ignatov.spb.su", | ||
"name": "Sergey Ignatov" | ||
}, | ||
"name": "Sergey Ignatov", | ||
"email": "sergey@ignatov.spb.su" | ||
}, | ||
{ | ||
"email": "self@antono.info", | ||
"name": "Antono Vasiljev" | ||
}, | ||
"name": "Antono Vasiljev", | ||
"email": "self@antono.info" | ||
}, | ||
{ | ||
"email": "steplg@gmail.com", | ||
"name": "Stephan Kountso" | ||
}, | ||
"name": "Stephan Kountso", | ||
"email": "steplg@gmail.com" | ||
}, | ||
{ | ||
"email": "pumbur@pumbur.net", | ||
"name": "pumbur" | ||
}, | ||
"name": "pumbur", | ||
"email": "pumbur@pumbur.net" | ||
}, | ||
{ | ||
"email": "john.crepezzi@gmail.com", | ||
"name": "John Crepezzi" | ||
}, | ||
"name": "John Crepezzi", | ||
"email": "john.crepezzi@gmail.com" | ||
}, | ||
{ | ||
"email": "andrey.vlasovskikh@gmail.com", | ||
"name": "Andrey Vlasovskikh" | ||
}, | ||
"name": "Andrey Vlasovskikh", | ||
"email": "andrey.vlasovskikh@gmail.com" | ||
}, | ||
{ | ||
"email": "myadzel@gmail.com", | ||
"name": "Alexander Myadzel" | ||
}, | ||
"name": "Alexander Myadzel", | ||
"email": "myadzel@gmail.com" | ||
}, | ||
{ | ||
"email": "imbolk@gmail.com", | ||
"name": "Evgeny Stepanischev" | ||
}, | ||
"name": "Evgeny Stepanischev", | ||
"email": "imbolk@gmail.com" | ||
}, | ||
{ | ||
"email": "dnagir@gmail.com", | ||
"name": "Dmytrii Nagirniak" | ||
}, | ||
"name": "Dmytrii Nagirniak", | ||
"email": "dnagir@gmail.com" | ||
}, | ||
{ | ||
"email": "grigio.org@gmail.com", | ||
"name": "Luigi Maselli" | ||
}, | ||
"name": "Luigi Maselli", | ||
"email": "grigio.org@gmail.com" | ||
}, | ||
{ | ||
"email": "bardadymchik@gmail.com", | ||
"name": "Denis Bardadym" | ||
}, | ||
"name": "Denis Bardadym", | ||
"email": "bardadymchik@gmail.com" | ||
}, | ||
{ | ||
"email": "geekpanth3r@gmail.com", | ||
"name": "Aahan Krish" | ||
}, | ||
"name": "Aahan Krish", | ||
"email": "geekpanth3r@gmail.com" | ||
}, | ||
{ | ||
"email": "baryshev@gmail.com", | ||
"name": "Ilya Baryshev" | ||
}, | ||
"name": "Ilya Baryshev", | ||
"email": "baryshev@gmail.com" | ||
}, | ||
{ | ||
"email": "aleksandar@ruzicic.info", | ||
"name": "Aleksandar Ruzicic" | ||
}, | ||
"name": "Aleksandar Ruzicic", | ||
"email": "aleksandar@ruzicic.info" | ||
}, | ||
{ | ||
"email": "joe@rstudio.org", | ||
"name": "Joe Cheng" | ||
}, | ||
"name": "Joe Cheng", | ||
"email": "joe@rstudio.org" | ||
}, | ||
{ | ||
"email": "angelgarcia.mail@gmail.com", | ||
"name": "Angel G. Olloqui" | ||
}, | ||
"name": "Angel G. Olloqui", | ||
"email": "angelgarcia.mail@gmail.com" | ||
}, | ||
{ | ||
"email": "adminz@web-cms-designs.com", | ||
"name": "Jason Tate" | ||
}, | ||
"name": "Jason Tate", | ||
"email": "adminz@web-cms-designs.com" | ||
}, | ||
{ | ||
"email": "me@stikhomirov.com", | ||
"name": "Sergey Tikhomirov" | ||
}, | ||
"name": "Sergey Tikhomirov", | ||
"email": "me@stikhomirov.com" | ||
}, | ||
{ | ||
"email": "marc.fornos@gmail.com", | ||
"name": "Marc Fornos" | ||
}, | ||
"name": "Marc Fornos", | ||
"email": "marc.fornos@gmail.com" | ||
}, | ||
{ | ||
"email": "yjimbo@gmail.com", | ||
"name": "Yoshihide Jimbo" | ||
}, | ||
"name": "Yoshihide Jimbo", | ||
"email": "yjimbo@gmail.com" | ||
}, | ||
{ | ||
"email": "casey.duncan@gmail.com", | ||
"name": "Casey Duncan" | ||
}, | ||
"name": "Casey Duncan", | ||
"email": "casey.duncan@gmail.com" | ||
}, | ||
{ | ||
"email": "nizhibitsky@gmail.com", | ||
"name": "Eugene Nizhibitsky" | ||
}, | ||
"name": "Eugene Nizhibitsky", | ||
"email": "nizhibitsky@gmail.com" | ||
}, | ||
{ | ||
"email": "gimenete@gmail.com", | ||
"name": "Alberto Gimeno" | ||
}, | ||
"name": "Alberto Gimeno", | ||
"email": "gimenete@gmail.com" | ||
}, | ||
{ | ||
"email": "kimmel.k.programmer@gmail.com", | ||
"name": "Kirk Kimmel" | ||
}, | ||
"name": "Kirk Kimmel", | ||
"email": "kimmel.k.programmer@gmail.com" | ||
}, | ||
{ | ||
"email": "nathan@nathanamy.org", | ||
"name": "Nathan Grigg" | ||
}, | ||
"name": "Nathan Grigg", | ||
"email": "nathan@nathanamy.org" | ||
}, | ||
{ | ||
"email": "drdrang@gmail.com", | ||
"name": "Dr. Drang" | ||
}, | ||
"name": "Dr. Drang", | ||
"email": "drdrang@gmail.com" | ||
}, | ||
{ | ||
"email": "robin.ward@gmail.com", | ||
"name": "Robin Ward" | ||
}, | ||
"name": "Robin Ward", | ||
"email": "robin.ward@gmail.com" | ||
}, | ||
{ | ||
"email": "me@dmedvinsky.name", | ||
"name": "Dmitry Medvinsky" | ||
}, | ||
"name": "Dmitry Medvinsky", | ||
"email": "me@dmedvinsky.name" | ||
}, | ||
{ | ||
"email": "jason.a.jacobson@gmail.com", | ||
"name": "Jason Jacobson" | ||
}, | ||
"name": "Jason Jacobson", | ||
"email": "jason.a.jacobson@gmail.com" | ||
}, | ||
{ | ||
"email": "jonas@follesoe.no", | ||
"name": "Jonas Follesø" | ||
}, | ||
"name": "Jonas Follesø", | ||
"email": "jonas@follesoe.no" | ||
}, | ||
{ | ||
"email": "dan.j.allen@gmail.com", | ||
"name": "Dan Allen" | ||
}, | ||
"name": "Dan Allen", | ||
"email": "dan.j.allen@gmail.com" | ||
}, | ||
{ | ||
"email": "i@noformnocontent.com", | ||
"name": "noformnocontent" | ||
}, | ||
"name": "noformnocontent", | ||
"email": "i@noformnocontent.com" | ||
}, | ||
{ | ||
"email": "damien.white@visoftinc.com", | ||
"name": "Damien White" | ||
}, | ||
"name": "Damien White", | ||
"email": "damien.white@visoftinc.com" | ||
}, | ||
{ | ||
"email": "great_muchacho@mail.ru", | ||
"name": "Alexander Marenin" | ||
}, | ||
"name": "Alexander Marenin", | ||
"email": "great_muchacho@mail.ru" | ||
}, | ||
{ | ||
"email": "cedric.nehemie@gmail.com", | ||
"name": "Cédric Néhémie" | ||
}, | ||
"name": "Cédric Néhémie", | ||
"email": "cedric.nehemie@gmail.com" | ||
}, | ||
{ | ||
"email": "simon@angryrobotzombie.com", | ||
"name": "Simon Madine" | ||
}, | ||
"name": "Simon Madine", | ||
"email": "simon@angryrobotzombie.com" | ||
}, | ||
{ | ||
"email": "contact@sierrasoftworks.com", | ||
"name": "Benjamin Pannell" | ||
}, | ||
"name": "Benjamin Pannell", | ||
"email": "contact@sierrasoftworks.com" | ||
}, | ||
{ | ||
"email": "eric@lassosoft.com", | ||
"name": "Eric Knibbe" | ||
}, | ||
"name": "Eric Knibbe", | ||
"email": "eric@lassosoft.com" | ||
}, | ||
{ | ||
"email": "ren.chiang@gmail.com", | ||
"name": "Poren Chiang" | ||
}, | ||
"name": "Poren Chiang", | ||
"email": "ren.chiang@gmail.com" | ||
}, | ||
{ | ||
"email": "kelleyvanevert@gmail.com", | ||
"name": "Kelley van Evert" | ||
}, | ||
"name": "Kelley van Evert", | ||
"email": "kelleyvanevert@gmail.com" | ||
}, | ||
{ | ||
"email": "kurt@kurtemch.com", | ||
"name": "Kurt Emch" | ||
}, | ||
"name": "Kurt Emch", | ||
"email": "kurt@kurtemch.com" | ||
}, | ||
{ | ||
"email": "mehdi@dogguy.org", | ||
"name": "Mehdi Dogguy" | ||
}, | ||
"name": "Mehdi Dogguy", | ||
"email": "mehdi@dogguy.org" | ||
}, | ||
{ | ||
"email": "nicolas.braud-santoni@ens-cachan.fr", | ||
"name": "Nicolas Braud-Santoni" | ||
}, | ||
"name": "Nicolas Braud-Santoni", | ||
"email": "nicolas.braud-santoni@ens-cachan.fr" | ||
}, | ||
{ | ||
"email": "rabit@revigniter.com", | ||
"name": "Ralf Bitter" | ||
}, | ||
"name": "Ralf Bitter", | ||
"email": "rabit@revigniter.com" | ||
}, | ||
{ | ||
"email": "sylvestre.ledru@scilab-enterprises.com", | ||
"name": "Sylvestre Ledru" | ||
}, | ||
"name": "Sylvestre Ledru", | ||
"email": "sylvestre.ledru@scilab-enterprises.com" | ||
}, | ||
{ | ||
"email": "hello@troykershaw.com", | ||
"name": "Troy Kershaw" | ||
}, | ||
"name": "Troy Kershaw", | ||
"email": "hello@troykershaw.com" | ||
}, | ||
{ | ||
"email": "zena.treep@gmail.com", | ||
"name": "Zena Treep" | ||
}, | ||
"name": "Zena Treep", | ||
"email": "zena.treep@gmail.com" | ||
}, | ||
{ | ||
"email": "dkvasnicka@vendavo.com", | ||
"name": "Daniel Kvasnicka" | ||
}, | ||
"name": "Daniel Kvasnicka", | ||
"email": "dkvasnicka@vendavo.com" | ||
}, | ||
{ | ||
"email": "ck@remobjects.com", | ||
"name": "Carlo Kok" | ||
}, | ||
"name": "Carlo Kok", | ||
"email": "ck@remobjects.com" | ||
}, | ||
{ | ||
"email": "info@atelierbramdehaan.nl", | ||
"name": "Bram de Haan" | ||
}, | ||
"name": "Bram de Haan", | ||
"email": "info@atelierbramdehaan.nl" | ||
}, | ||
{ | ||
"email": "dlimpid@gmail.com", | ||
"name": "Seongwon Lee" | ||
}, | ||
"name": "Seongwon Lee", | ||
"email": "dlimpid@gmail.com" | ||
}, | ||
{ | ||
"email": "megalivoithos@gmail.com", | ||
"name": "Zaven Muradyan" | ||
}, | ||
"name": "Zaven Muradyan", | ||
"email": "megalivoithos@gmail.com" | ||
}, | ||
{ | ||
"email": "git@idleberg.com", | ||
"name": "Jan T. Sott" | ||
}, | ||
"name": "Jan T. Sott", | ||
"email": "git@idleberg.com" | ||
}, | ||
{ | ||
"email": "brent@brentium.com", | ||
"name": "Brent Bradbury" | ||
}, | ||
"name": "Brent Bradbury", | ||
"email": "brent@brentium.com" | ||
}, | ||
{ | ||
"email": "martindlling@gmail.com", | ||
"name": "Martin Dilling-Hansen" | ||
}, | ||
"name": "Martin Dilling-Hansen", | ||
"email": "martindlling@gmail.com" | ||
}, | ||
{ | ||
"email": "vassilevsky@gmail.com", | ||
"name": "Ilya Vassilevsky" | ||
}, | ||
"name": "Ilya Vassilevsky", | ||
"email": "vassilevsky@gmail.com" | ||
}, | ||
{ | ||
"email": "josh@isotope11.com", | ||
"name": "Josh Adams" | ||
}, | ||
"name": "Josh Adams", | ||
"email": "josh@isotope11.com" | ||
}, | ||
{ | ||
"email": "daniel.tao@gmail.com", | ||
"name": "Dan Tao" | ||
}, | ||
"name": "Dan Tao", | ||
"email": "daniel.tao@gmail.com" | ||
}, | ||
{ | ||
"email": "hello@jenius.me", | ||
"name": "Jeff Escalante" | ||
}, | ||
"name": "Jeff Escalante", | ||
"email": "hello@jenius.me" | ||
}, | ||
{ | ||
"email": "yangjvn@126.com", | ||
"name": "Jun Yang" | ||
}, | ||
"name": "Jun Yang", | ||
"email": "yangjvn@126.com" | ||
}, | ||
{ | ||
"email": "info@neor.ru", | ||
"name": "Nikolay Lisienko" | ||
}, | ||
"name": "Nikolay Lisienko", | ||
"email": "info@neor.ru" | ||
}, | ||
{ | ||
"email": "post@auge8472.de", | ||
"name": "Heiko August" | ||
}, | ||
"name": "Heiko August", | ||
"email": "post@auge8472.de" | ||
}, | ||
{ | ||
"email": "domen@dev.si", | ||
"name": "Domen Kožar" | ||
}, | ||
"name": "Domen Kožar", | ||
"email": "domen@dev.si" | ||
}, | ||
{ | ||
"email": "travis.a.odom@gmail.com", | ||
"name": "Travis Odom" | ||
}, | ||
"name": "Travis Odom", | ||
"email": "travis.a.odom@gmail.com" | ||
}, | ||
{ | ||
"email": "innocenat@gmail.com", | ||
"name": "innocenat" | ||
}, | ||
"name": "innocenat", | ||
"email": "innocenat@gmail.com" | ||
}, | ||
{ | ||
"email": "devolonter@gmail.com", | ||
"name": "Arthur Bikmullin" | ||
}, | ||
"name": "Arthur Bikmullin", | ||
"email": "devolonter@gmail.com" | ||
}, | ||
{ | ||
"email": "phi@ruby-reactive.org", | ||
"name": "Pascal Hurni" | ||
}, | ||
"name": "Pascal Hurni", | ||
"email": "phi@ruby-reactive.org" | ||
}, | ||
{ | ||
"email": "romanshmatov@gmail.com", | ||
"name": "Roman Shmatov" | ||
}, | ||
"name": "Roman Shmatov", | ||
"email": "romanshmatov@gmail.com" | ||
}, | ||
{ | ||
"email": "nic@letolab.com", | ||
"name": "Nic West" | ||
}, | ||
"name": "Nic West", | ||
"email": "nic@letolab.com" | ||
}, | ||
{ | ||
"email": "panu.horsmalahti@iki.fi", | ||
"name": "Panu Horsmalahti" | ||
}, | ||
"name": "Panu Horsmalahti", | ||
"email": "panu.horsmalahti@iki.fi" | ||
}, | ||
{ | ||
"email": "tamas.flaviu@gmail.com", | ||
"name": "Flaviu Tamas" | ||
}, | ||
"name": "Flaviu Tamas", | ||
"email": "tamas.flaviu@gmail.com" | ||
}, | ||
{ | ||
"email": "mee.damian@gmail.com", | ||
"name": "Damian Mee" | ||
}, | ||
"name": "Damian Mee", | ||
"email": "mee.damian@gmail.com" | ||
}, | ||
{ | ||
"email": "ikasoki@gmail.com", | ||
"name": "Christopher Kaster" | ||
}, | ||
"name": "Christopher Kaster", | ||
"email": "ikasoki@gmail.com" | ||
}, | ||
{ | ||
"email": "chris@eidhof.nl", | ||
"name": "Chris Eidhof" | ||
}, | ||
"name": "Chris Eidhof", | ||
"email": "chris@eidhof.nl" | ||
}, | ||
{ | ||
"email": "natecook@gmail.com", | ||
"name": "Nate Cook" | ||
}, | ||
"name": "Nate Cook", | ||
"email": "natecook@gmail.com" | ||
}, | ||
{ | ||
"email": "matt@diephouse.com", | ||
"name": "Matt Diephouse" | ||
"name": "Matt Diephouse", | ||
"email": "matt@diephouse.com" | ||
}, | ||
{ | ||
"name": "Erik Osheim", | ||
"email": "d_m@plastic-idolatry.com" | ||
}, | ||
{ | ||
"name": "Guillaume Laforge", | ||
"email": "glaforge@gmail.com" | ||
}, | ||
{ | ||
"name": "Lucas Mazza", | ||
"email": "lucastmazza@gmail.com" | ||
}, | ||
{ | ||
"name": "Maxim Dikun", | ||
"email": "dikmax@gmail.com" | ||
}, | ||
{ | ||
"name": "Henrik Feldt", | ||
"email": "henrik@haf.se" | ||
}, | ||
{ | ||
"name": "Anton Kochkov", | ||
"email": "anton.kochkov@gmail.com" | ||
}, | ||
{ | ||
"name": "Michael Allen", | ||
"email": "Michael.Allen@benefitfocus.com" | ||
}, | ||
{ | ||
"name": "JP Verkamp", | ||
"email": "me@jverkamp.com" | ||
}, | ||
{ | ||
"name": "Adam Joseph Cook", | ||
"email": "adam.joseph.cook@gmail.com" | ||
}, | ||
{ | ||
"name": "Sergey Vidyuk", | ||
"email": "svidyuk@gmail.com" | ||
} | ||
], | ||
], | ||
"engines": { | ||
"node": "*" | ||
}, | ||
"devDependencies": { | ||
"glob": "^4.0.5", | ||
"jsdom": "^0.11.1", | ||
"should": "^4.0.4", | ||
"mocha": "^1.21.4" | ||
}, | ||
"licenses": [ | ||
{ | ||
"url": "https://github.com/isagalaev/highlight.js/blob/master/LICENSE", | ||
"type": "BSD" | ||
"type": "BSD", | ||
"url": "https://github.com/isagalaev/highlight.js/blob/master/LICENSE" | ||
} | ||
], | ||
], | ||
"name": "highlight.js", | ||
"author": { | ||
"email": "maniac@softwaremaniacs.org", | ||
"name": "Ivan Sagalaev" | ||
}, | ||
"name": "Ivan Sagalaev", | ||
"email": "maniac@softwaremaniacs.org" | ||
}, | ||
"description": "Syntax highlighting with language autodetection.", | ||
"scripts": { | ||
"test": "./node_modules/.bin/mocha test/" | ||
}, | ||
"main": "./lib/index.js", | ||
"version": "8.2.0", | ||
"repository": { | ||
"url": "git://github.com/isagalaev/highlight.js.git", | ||
"type": "git" | ||
}, | ||
"scripts": {}, | ||
"name": "highlight.js", | ||
"bugs": { | ||
"url": "https://github.com/isagalaev/highlight.js/issues" | ||
}, | ||
"engines": { | ||
"node": "*" | ||
} | ||
"type": "git", | ||
"url": "git://github.com/isagalaev/highlight.js.git" | ||
}, | ||
"homepage": "https://highlightjs.org/", | ||
"keywords": [ | ||
"highlight", | ||
"syntax" | ||
] | ||
} |
# Highlight.js | ||
[![Build Status](https://travis-ci.org/isagalaev/highlight.js.svg?branch=master)](https://travis-ci.org/isagalaev/highlight.js) | ||
Highlight.js is a syntax highlighter written in JavaScript. It works in the | ||
@@ -30,6 +32,6 @@ browser as well as on the server. It works with pretty much any markup, | ||
To disable highlighting altogether use the `no-highlight` class: | ||
To disable highlighting altogether use the `nohighlight` class: | ||
```html | ||
<pre><code class="no-highlight">...</code></pre> | ||
<pre><code class="nohighlight">...</code></pre> | ||
``` | ||
@@ -50,3 +52,3 @@ | ||
}); | ||
};) | ||
}); | ||
``` | ||
@@ -87,3 +89,3 @@ | ||
The official site for the library is at <http://highlightjs.org/>. | ||
The official site for the library is at <https://highlightjs.org/>. | ||
@@ -98,3 +100,3 @@ Further in-depth documentation for the API and other topics is at | ||
[3]: http://highlightjs.readthedocs.org/en/latest/api.html#configure-options | ||
[4]: http://highlightjs.org/download/ | ||
[4]: https://highlightjs.org/download/ | ||
[5]: http://highlightjs.readthedocs.org/en/latest/building-testing.html | ||
@@ -101,0 +103,0 @@ [8]: http://highlightjs.readthedocs.org/en/latest/css-classes-reference.html |
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
540314
157
12761
102
4