@canopycanopycanopy/b-ber-markdown-renderer 1.2.16 → 2.0.2

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (111) hide show
  1. package/dist/highlightjs/highlight.js +50 -201
  2. package/dist/highlightjs/index.js +1 -1
  3. package/dist/highlightjs/languages/1c.js +91 -46
  4. package/dist/highlightjs/languages/accesslog.js +10 -5
  5. package/dist/highlightjs/languages/ada.js +26 -12
  6. package/dist/highlightjs/languages/angelscript.js +12 -5
  7. package/dist/highlightjs/languages/applescript.js +1 -4
  8. package/dist/highlightjs/languages/arcade.js +1 -4
  9. package/dist/highlightjs/languages/armasm.js +35 -16
  10. package/dist/highlightjs/languages/asciidoc.js +42 -21
  11. package/dist/highlightjs/languages/autohotkey.js +2 -2
  12. package/dist/highlightjs/languages/autoit.js +82 -82
  13. package/dist/highlightjs/languages/avrasm.js +7 -9
  14. package/dist/highlightjs/languages/bash.js +9 -5
  15. package/dist/highlightjs/languages/bnf.js +6 -3
  16. package/dist/highlightjs/languages/cal.js +0 -3
  17. package/dist/highlightjs/languages/capnproto.js +0 -2
  18. package/dist/highlightjs/languages/ceylon.js +4 -7
  19. package/dist/highlightjs/languages/clojure.js +2 -1
  20. package/dist/highlightjs/languages/cmake.js +10 -5
  21. package/dist/highlightjs/languages/coffeescript.js +10 -10
  22. package/dist/highlightjs/languages/cos.js +6 -2
  23. package/dist/highlightjs/languages/cpp.js +4 -4
  24. package/dist/highlightjs/languages/crystal.js +0 -4
  25. package/dist/highlightjs/languages/cs.js +4 -2
  26. package/dist/highlightjs/languages/d.js +34 -29
  27. package/dist/highlightjs/languages/dart.js +4 -3
  28. package/dist/highlightjs/languages/delphi.js +0 -3
  29. package/dist/highlightjs/languages/dns.js +4 -2
  30. package/dist/highlightjs/languages/dos.js +2 -1
  31. package/dist/highlightjs/languages/ebnf.js +2 -1
  32. package/dist/highlightjs/languages/elm.js +7 -2
  33. package/dist/highlightjs/languages/erlang.js +9 -6
  34. package/dist/highlightjs/languages/excel.js +2 -5
  35. package/dist/highlightjs/languages/gams.js +6 -3
  36. package/dist/highlightjs/languages/gauss.js +2 -6
  37. package/dist/highlightjs/languages/gcode.js +0 -3
  38. package/dist/highlightjs/languages/glsl.js +10 -5
  39. package/dist/highlightjs/languages/go.js +0 -1
  40. package/dist/highlightjs/languages/groovy.js +4 -2
  41. package/dist/highlightjs/languages/haml.js +4 -2
  42. package/dist/highlightjs/languages/haskell.js +9 -3
  43. package/dist/highlightjs/languages/hy.js +2 -1
  44. package/dist/highlightjs/languages/inform7.js +8 -4
  45. package/dist/highlightjs/languages/irpf90.js +4 -2
  46. package/dist/highlightjs/languages/isbl.js +292 -148
  47. package/dist/highlightjs/languages/java.js +8 -4
  48. package/dist/highlightjs/languages/javascript.js +3 -6
  49. package/dist/highlightjs/languages/json.js +0 -2
  50. package/dist/highlightjs/languages/julia.js +12 -5
  51. package/dist/highlightjs/languages/kotlin.js +15 -8
  52. package/dist/highlightjs/languages/lasso.js +0 -3
  53. package/dist/highlightjs/languages/less.js +20 -17
  54. package/dist/highlightjs/languages/livecodeserver.js +0 -3
  55. package/dist/highlightjs/languages/livescript.js +8 -9
  56. package/dist/highlightjs/languages/llvm.js +4 -2
  57. package/dist/highlightjs/languages/lua.js +6 -6
  58. package/dist/highlightjs/languages/makefile.js +0 -5
  59. package/dist/highlightjs/languages/markdown.js +18 -9
  60. package/dist/highlightjs/languages/mercury.js +4 -2
  61. package/dist/highlightjs/languages/mipsasm.js +37 -18
  62. package/dist/highlightjs/languages/mojolicious.js +4 -2
  63. package/dist/highlightjs/languages/moonscript.js +5 -8
  64. package/dist/highlightjs/languages/nginx.js +12 -6
  65. package/dist/highlightjs/languages/ocaml.js +3 -8
  66. package/dist/highlightjs/languages/openscad.js +39 -39
  67. package/dist/highlightjs/languages/perl.js +3 -3
  68. package/dist/highlightjs/languages/pgsql.js +128 -72
  69. package/dist/highlightjs/languages/php.js +0 -1
  70. package/dist/highlightjs/languages/pony.js +1 -0
  71. package/dist/highlightjs/languages/powershell.js +5 -8
  72. package/dist/highlightjs/languages/processing.js +2 -1
  73. package/dist/highlightjs/languages/prolog.js +1 -3
  74. package/dist/highlightjs/languages/properties.js +8 -5
  75. package/dist/highlightjs/languages/protobuf.js +0 -1
  76. package/dist/highlightjs/languages/puppet.js +4 -8
  77. package/dist/highlightjs/languages/purebasic.js +9 -5
  78. package/dist/highlightjs/languages/python.js +0 -1
  79. package/dist/highlightjs/languages/qml.js +15 -11
  80. package/dist/highlightjs/languages/reasonml.js +0 -6
  81. package/dist/highlightjs/languages/roboconf.js +8 -4
  82. package/dist/highlightjs/languages/routeros.js +36 -18
  83. package/dist/highlightjs/languages/ruby.js +0 -4
  84. package/dist/highlightjs/languages/ruleslanguage.js +2 -1
  85. package/dist/highlightjs/languages/rust.js +8 -4
  86. package/dist/highlightjs/languages/sas.js +4 -2
  87. package/dist/highlightjs/languages/scala.js +2 -1
  88. package/dist/highlightjs/languages/scheme.js +0 -3
  89. package/dist/highlightjs/languages/scilab.js +2 -4
  90. package/dist/highlightjs/languages/sml.js +2 -6
  91. package/dist/highlightjs/languages/sqf.js +8 -5
  92. package/dist/highlightjs/languages/stan.js +2 -1
  93. package/dist/highlightjs/languages/stylus.js +45 -24
  94. package/dist/highlightjs/languages/swift.js +4 -3
  95. package/dist/highlightjs/languages/tap.js +8 -4
  96. package/dist/highlightjs/languages/thrift.js +0 -1
  97. package/dist/highlightjs/languages/tp.js +1 -3
  98. package/dist/highlightjs/languages/twig.js +0 -3
  99. package/dist/highlightjs/languages/typescript.js +0 -3
  100. package/dist/highlightjs/languages/vala.js +12 -6
  101. package/dist/highlightjs/languages/vbnet.js +12 -27
  102. package/dist/highlightjs/languages/verilog.js +1 -2
  103. package/dist/highlightjs/languages/vhdl.js +8 -5
  104. package/dist/highlightjs/languages/vim.js +6 -3
  105. package/dist/highlightjs/languages/x86asm.js +52 -26
  106. package/dist/highlightjs/languages/xml.js +2 -2
  107. package/dist/highlightjs/languages/xquery.js +12 -7
  108. package/dist/highlightjs/languages/yaml.js +3 -1
  109. package/dist/highlightjs/languages/zephir.js +0 -1
  110. package/dist/index.js +9 -36
  111. package/package.json +19 -18
@@ -3,11 +3,15 @@
3
3
  module.exports = function (hljs) {
4
4
  var JAVA_IDENT_RE = '[\u00C0-\u02B8a-zA-Z_$][\u00C0-\u02B8a-zA-Z_$0-9]*';
5
5
  var GENERIC_IDENT_RE = JAVA_IDENT_RE + '(<' + JAVA_IDENT_RE + '(\\s*,\\s*' + JAVA_IDENT_RE + ')*>)?';
6
- var KEYWORDS = 'false synchronized int abstract float private char boolean var static null if const ' + '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 ' + 'module requires exports do'; // https://docs.oracle.com/javase/7/docs/technotes/guides/language/underscores-literals.html
6
+ var KEYWORDS = 'false synchronized int abstract float private char boolean var static null if const ' + '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 ' + 'module requires exports do';
7
7
 
8
- var JAVA_NUMBER_RE = '\\b' + '(' + '0[bB]([01]+[01_]+[01]+|[01]+)' + // 0b...
9
- '|' + '0[xX]([a-fA-F0-9]+[a-fA-F0-9_]+[a-fA-F0-9]+|[a-fA-F0-9]+)' + // 0x...
10
- '|' + '(' + '([\\d]+[\\d_]+[\\d]+|[\\d]+)(\\.([\\d]+[\\d_]+[\\d]+|[\\d]+))?' + '|' + '\\.([\\d]+[\\d_]+[\\d]+|[\\d]+)' + ')' + '([eE][-+]?\\d+)?' + // octal, decimal, float
8
+ // https://docs.oracle.com/javase/7/docs/technotes/guides/language/underscores-literals.html
9
+ var JAVA_NUMBER_RE = '\\b' + '(' + '0[bB]([01]+[01_]+[01]+|[01]+)' +
10
+ // 0b...
11
+ '|' + '0[xX]([a-fA-F0-9]+[a-fA-F0-9_]+[a-fA-F0-9]+|[a-fA-F0-9]+)' +
12
+ // 0x...
13
+ '|' + '(' + '([\\d]+[\\d_]+[\\d]+|[\\d]+)(\\.([\\d]+[\\d_]+[\\d]+|[\\d]+))?' + '|' + '\\.([\\d]+[\\d_]+[\\d]+|[\\d]+)' + ')' + '([eE][-+]?\\d+)?' +
14
+ // octal, decimal, float
11
15
  ')' + '[lLfF]?';
12
16
  var JAVA_NUMBER_MODE = {
13
17
  className: 'number',
@@ -1,15 +1,13 @@
1
1
  "use strict";
2
2
 
3
3
  var _interopRequireDefault = require("@babel/runtime-corejs3/helpers/interopRequireDefault");
4
-
5
4
  var _concat = _interopRequireDefault(require("@babel/runtime-corejs3/core-js-stable/instance/concat"));
6
-
7
5
  module.exports = function (hljs) {
8
6
  var _context;
9
-
10
7
  var IDENT_RE = '[A-Za-z$_][0-9A-Za-z$_]*';
11
8
  var KEYWORDS = {
12
- keyword: 'in of if for while finally var new function do return void else break catch ' + 'instanceof with throw case default try this switch continue typeof delete ' + 'let yield const export super debugger as async await static ' + // ECMAScript 6 modules import
9
+ keyword: 'in of if for while finally var new function do return void else break catch ' + 'instanceof with throw case default try this switch continue typeof delete ' + 'let yield const export super debugger as async await static ' +
10
+ // ECMAScript 6 modules import
13
11
  'import from as',
14
12
  literal: 'true false null undefined NaN Infinity',
15
13
  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 Symbol Set Map WeakSet WeakMap Proxy Reflect ' + 'Promise'
@@ -31,8 +29,8 @@ module.exports = function (hljs) {
31
29
  end: '\\}',
32
30
  keywords: KEYWORDS,
33
31
  contains: [] // defined later
34
-
35
32
  };
33
+
36
34
  var TEMPLATE_STRING = {
37
35
  className: 'string',
38
36
  begin: '`',
@@ -132,7 +130,6 @@ module.exports = function (hljs) {
132
130
  illegal: /\[|%/
133
131
  }, {
134
132
  begin: /\$[(.]/ // relevance booster for a pattern common to JS libs: `$(something)` and `$.something`
135
-
136
133
  }, hljs.METHOD_GUARD, {
137
134
  // ES6 class
138
135
  className: 'class',
@@ -1,9 +1,7 @@
1
1
  "use strict";
2
2
 
3
3
  var _interopRequireDefault = require("@babel/runtime-corejs3/helpers/interopRequireDefault");
4
-
5
4
  var _splice = _interopRequireDefault(require("@babel/runtime-corejs3/core-js-stable/instance/splice"));
6
-
7
5
  module.exports = function (hljs) {
8
6
  var LITERALS = {
9
7
  literal: 'true false null'
@@ -5,6 +5,7 @@ module.exports = function (hljs) {
5
5
  // to maintain them by hand. Hence these names (i.e. keywords, literals and
6
6
  // built-ins) are automatically generated from Julia v0.6 itself through
7
7
  // the following scripts for each.
8
+
8
9
  var KEYWORDS = {
9
10
  // # keyword generator, multi-word keywords handled manually below
10
11
  // foreach(println, ["in", "isa", "where"])
@@ -13,7 +14,8 @@ module.exports = function (hljs) {
13
14
  // println(kw)
14
15
  // end
15
16
  // end
16
- keyword: 'in isa where ' + 'baremodule begin break catch ccall const continue do else elseif end export false finally for function ' + 'global if import importall let local macro module quote return true try using while ' + // legacy, to be deprecated in the next release
17
+ keyword: 'in isa where ' + 'baremodule begin break catch ccall const continue do else elseif end export false finally for function ' + 'global if import importall let local macro module quote return true try using while ' +
18
+ // legacy, to be deprecated in the next release
17
19
  'type immutable abstract bitstype typealias ',
18
20
  // # literal generator
19
21
  // println("true")
@@ -37,16 +39,19 @@ module.exports = function (hljs) {
37
39
  // end
38
40
  // end
39
41
  built_in: 'ANY AbstractArray AbstractChannel AbstractFloat AbstractMatrix AbstractRNG AbstractSerializer AbstractSet ' + 'AbstractSparseArray AbstractSparseMatrix AbstractSparseVector AbstractString AbstractUnitRange AbstractVecOrMat ' + 'AbstractVector Any ArgumentError Array AssertionError Associative Base64DecodePipe Base64EncodePipe Bidiagonal ' + 'BigFloat BigInt BitArray BitMatrix BitVector Bool BoundsError BufferStream CachingPool CapturedException ' + 'CartesianIndex CartesianRange Cchar Cdouble Cfloat Channel Char Cint Cintmax_t Clong Clonglong ClusterManager ' + 'Cmd CodeInfo Colon Complex Complex128 Complex32 Complex64 CompositeException Condition ConjArray ConjMatrix ' + 'ConjVector Cptrdiff_t Cshort Csize_t Cssize_t Cstring Cuchar Cuint Cuintmax_t Culong Culonglong Cushort Cwchar_t ' + 'Cwstring DataType Date DateFormat DateTime DenseArray DenseMatrix DenseVecOrMat DenseVector Diagonal Dict ' + 'DimensionMismatch Dims DirectIndexString Display DivideError DomainError EOFError EachLine Enum Enumerate ' + 'ErrorException Exception ExponentialBackOff Expr Factorization FileMonitor Float16 Float32 Float64 Function ' + 'Future GlobalRef GotoNode HTML Hermitian IO IOBuffer IOContext IOStream IPAddr IPv4 IPv6 IndexCartesian IndexLinear ' + 'IndexStyle InexactError InitError Int Int128 Int16 Int32 Int64 Int8 IntSet Integer InterruptException ' + 'InvalidStateException Irrational KeyError LabelNode LinSpace LineNumberNode LoadError LowerTriangular MIME Matrix ' + 'MersenneTwister Method MethodError MethodTable Module NTuple NewvarNode NullException Nullable Number ObjectIdDict ' + 'OrdinalRange OutOfMemoryError OverflowError Pair ParseError PartialQuickSort PermutedDimsArray Pipe ' + 'PollingFileWatcher ProcessExitedException Ptr QuoteNode RandomDevice Range RangeIndex Rational RawFD ' + 'ReadOnlyMemoryError Real ReentrantLock Ref Regex RegexMatch RemoteChannel RemoteException RevString RoundingMode ' + 'RowVector SSAValue SegmentationFault SerializationState Set SharedArray SharedMatrix SharedVector Signed ' + 'SimpleVector Slot SlotNumber SparseMatrixCSC SparseVector StackFrame StackOverflowError StackTrace StepRange ' + 'StepRangeLen StridedArray StridedMatrix StridedVecOrMat StridedVector String SubArray SubString SymTridiagonal ' + 'Symbol Symmetric SystemError TCPSocket Task Text TextDisplay Timer Tridiagonal Tuple Type TypeError TypeMapEntry ' + 'TypeMapLevel TypeName TypeVar TypedSlot UDPSocket UInt UInt128 UInt16 UInt32 UInt64 UInt8 UndefRefError UndefVarError ' + 'UnicodeError UniformScaling Union UnionAll UnitRange Unsigned UpperTriangular Val Vararg VecElement VecOrMat Vector ' + 'VersionNumber Void WeakKeyDict WeakRef WorkerConfig WorkerPool '
40
- }; // ref: http://julia.readthedocs.org/en/latest/manual/variables/#allowed-variable-names
42
+ };
41
43
 
42
- var VARIABLE_NAME_RE = '[A-Za-z_\\u00A1-\\uFFFF][A-Za-z_0-9\\u00A1-\\uFFFF]*'; // placeholder for recursive self-reference
44
+ // ref: http://julia.readthedocs.org/en/latest/manual/variables/#allowed-variable-names
45
+ var VARIABLE_NAME_RE = '[A-Za-z_\\u00A1-\\uFFFF][A-Za-z_0-9\\u00A1-\\uFFFF]*';
43
46
 
47
+ // placeholder for recursive self-reference
44
48
  var DEFAULT = {
45
49
  lexemes: VARIABLE_NAME_RE,
46
50
  keywords: KEYWORDS,
47
51
  illegal: /<\//
48
- }; // ref: http://julia.readthedocs.org/en/latest/manual/integers-and-floating-point-numbers/
52
+ };
49
53
 
54
+ // ref: http://julia.readthedocs.org/en/latest/manual/integers-and-floating-point-numbers/
50
55
  var NUMBER = {
51
56
  className: 'number',
52
57
  // supported numeric literals:
@@ -72,8 +77,9 @@ module.exports = function (hljs) {
72
77
  var INTERPOLATED_VARIABLE = {
73
78
  className: 'variable',
74
79
  begin: '\\$' + VARIABLE_NAME_RE
75
- }; // TODO: neatly escape normal code in string literal
80
+ };
76
81
 
82
+ // TODO: neatly escape normal code in string literal
77
83
  var STRING = {
78
84
  className: 'string',
79
85
  contains: [hljs.BACKSLASH_ESCAPE, INTERPOLATION, INTERPOLATED_VARIABLE],
@@ -114,6 +120,7 @@ module.exports = function (hljs) {
114
120
  begin: /<:/
115
121
  } // relevance booster
116
122
  ];
123
+
117
124
  INTERPOLATION.contains = DEFAULT.contains;
118
125
  return DEFAULT;
119
126
  };
@@ -2,7 +2,8 @@
2
2
 
3
3
  module.exports = function (hljs) {
4
4
  var KEYWORDS = {
5
- keyword: 'abstract as val var vararg get set class object open private protected public noinline ' + 'crossinline dynamic final enum if else do while for when throw try catch finally ' + 'import package is in fun override companion reified inline lateinit init ' + 'interface annotation data sealed internal infix operator out by constructor super ' + 'tailrec where const inner suspend typealias external expect actual ' + // to be deleted soon
5
+ keyword: 'abstract as val var vararg get set class object open private protected public noinline ' + 'crossinline dynamic final enum if else do while for when throw try catch finally ' + 'import package is in fun override companion reified inline lateinit init ' + 'interface annotation data sealed internal infix operator out by constructor super ' + 'tailrec where const inner suspend typealias external expect actual ' +
6
+ // to be deleted soon
6
7
  'trait volatile transient native default',
7
8
  built_in: 'Byte Short Char Int Long Boolean Float Double Void Unit Nothing',
8
9
  literal: 'true false null'
@@ -20,8 +21,9 @@ module.exports = function (hljs) {
20
21
  var LABEL = {
21
22
  className: 'symbol',
22
23
  begin: hljs.UNDERSCORE_IDENT_RE + '@'
23
- }; // for string templates
24
+ };
24
25
 
26
+ // for string templates
25
27
  var SUBST = {
26
28
  className: 'subst',
27
29
  begin: '\\${',
@@ -38,7 +40,8 @@ module.exports = function (hljs) {
38
40
  begin: '"""',
39
41
  end: '"""',
40
42
  contains: [VARIABLE, SUBST]
41
- }, // Can't use built-in modes easily, as we want to use STRING in the meta
43
+ },
44
+ // Can't use built-in modes easily, as we want to use STRING in the meta
42
45
  // context as 'meta-string' and there's no syntax to remove explicitly set
43
46
  // classNames in built-in modes.
44
47
  {
@@ -67,13 +70,17 @@ module.exports = function (hljs) {
67
70
  className: 'meta-string'
68
71
  })]
69
72
  }]
70
- }; // https://kotlinlang.org/docs/reference/whatsnew11.html#underscores-in-numeric-literals
73
+ };
74
+
75
+ // https://kotlinlang.org/docs/reference/whatsnew11.html#underscores-in-numeric-literals
71
76
  // According to the doc above, the number mode of kotlin is the same as java 8,
72
77
  // so the code below is copied from java.js
73
-
74
- var KOTLIN_NUMBER_RE = '\\b' + '(' + '0[bB]([01]+[01_]+[01]+|[01]+)' + // 0b...
75
- '|' + '0[xX]([a-fA-F0-9]+[a-fA-F0-9_]+[a-fA-F0-9]+|[a-fA-F0-9]+)' + // 0x...
76
- '|' + '(' + '([\\d]+[\\d_]+[\\d]+|[\\d]+)(\\.([\\d]+[\\d_]+[\\d]+|[\\d]+))?' + '|' + '\\.([\\d]+[\\d_]+[\\d]+|[\\d]+)' + ')' + '([eE][-+]?\\d+)?' + // octal, decimal, float
78
+ var KOTLIN_NUMBER_RE = '\\b' + '(' + '0[bB]([01]+[01_]+[01]+|[01]+)' +
79
+ // 0b...
80
+ '|' + '0[xX]([a-fA-F0-9]+[a-fA-F0-9_]+[a-fA-F0-9]+|[a-fA-F0-9]+)' +
81
+ // 0x...
82
+ '|' + '(' + '([\\d]+[\\d_]+[\\d]+|[\\d]+)(\\.([\\d]+[\\d_]+[\\d]+|[\\d]+))?' + '|' + '\\.([\\d]+[\\d_]+[\\d]+|[\\d]+)' + ')' + '([eE][-+]?\\d+)?' +
83
+ // octal, decimal, float
77
84
  ')' + '[lLfF]?';
78
85
  var KOTLIN_NUMBER_MODE = {
79
86
  className: 'number',
@@ -1,12 +1,9 @@
1
1
  "use strict";
2
2
 
3
3
  var _interopRequireDefault = require("@babel/runtime-corejs3/helpers/interopRequireDefault");
4
-
5
4
  var _concat = _interopRequireDefault(require("@babel/runtime-corejs3/core-js-stable/instance/concat"));
6
-
7
5
  module.exports = function (hljs) {
8
6
  var _context, _context2;
9
-
10
7
  var LASSO_IDENT_RE = '[a-zA-Z_][\\w.]*';
11
8
  var LASSO_ANGLE_RE = '<\\?(lasso(script)?|=)';
12
9
  var LASSO_CLOSE_RE = '\\]|\\?>';
@@ -1,19 +1,16 @@
1
1
  "use strict";
2
2
 
3
3
  var _interopRequireDefault = require("@babel/runtime-corejs3/helpers/interopRequireDefault");
4
-
5
4
  var _concat = _interopRequireDefault(require("@babel/runtime-corejs3/core-js-stable/instance/concat"));
6
-
7
5
  module.exports = function (hljs) {
8
6
  var _context;
9
-
10
7
  var IDENT_RE = '[\\w-]+'; // yes, Less identifiers may begin with a digit
11
-
12
8
  var INTERP_IDENT_RE = '(' + IDENT_RE + '|@{' + IDENT_RE + '})';
9
+
13
10
  /* Generic Modes */
14
11
 
15
12
  var RULES = [],
16
- VALUE = []; // forward def. for recursive modes
13
+ VALUE = []; // forward def. for recursive modes
17
14
 
18
15
  var STRING_MODE = function (c) {
19
16
  return {
@@ -22,7 +19,6 @@ module.exports = function (hljs) {
22
19
  begin: '~?' + c + '.*?' + c
23
20
  };
24
21
  };
25
-
26
22
  var IDENT_MODE = function (name, begin, relevance) {
27
23
  return {
28
24
  className: name,
@@ -30,16 +26,17 @@ module.exports = function (hljs) {
30
26
  relevance: relevance
31
27
  };
32
28
  };
33
-
34
29
  var PARENS_MODE = {
35
30
  // used only to properly balance nested parens inside mixin call, def. arg list
36
31
  begin: '\\(',
37
32
  end: '\\)',
38
33
  contains: VALUE,
39
34
  relevance: 0
40
- }; // generic Less highlighter (used almost everywhere except selectors):
35
+ };
41
36
 
42
- 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 :(
37
+ // generic Less highlighter (used almost everywhere except selectors):
38
+ VALUE.push(hljs.C_LINE_COMMENT_MODE, hljs.C_BLOCK_COMMENT_MODE, STRING_MODE("'"), STRING_MODE('"'), hljs.CSS_NUMBER_MODE,
39
+ // fixme: it does not include dot for numbers like .5em :(
43
40
  {
44
41
  begin: '(url|data-uri)\\(',
45
42
  starts: {
@@ -47,7 +44,8 @@ module.exports = function (hljs) {
47
44
  end: '[\\)\\n]',
48
45
  excludeEnd: true
49
46
  }
50
- }, IDENT_MODE('number', '#[0-9A-Fa-f]+\\b'), 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
47
+ }, IDENT_MODE('number', '#[0-9A-Fa-f]+\\b'), PARENS_MODE, IDENT_MODE('variable', '@@?' + IDENT_RE, 10), IDENT_MODE('variable', '@{' + IDENT_RE + '}'), IDENT_MODE('built_in', '~?`[^`]*?`'),
48
+ // inline javascript (or whatever host language) *multiline* string
51
49
  {
52
50
  // @media features (it’s here to not duplicate things in AT_RULE_MODE with extra PARENS_MODE overriding):
53
51
  className: 'attribute',
@@ -70,8 +68,8 @@ module.exports = function (hljs) {
70
68
  contains: (0, _concat.default)(_context = [{
71
69
  beginKeywords: 'and not'
72
70
  }]).call(_context, VALUE) // using this form to override VALUE’s 'function' match
73
-
74
71
  };
72
+
75
73
  /* Rule-Level Modes */
76
74
 
77
75
  var RULE_MODE = {
@@ -101,11 +99,13 @@ module.exports = function (hljs) {
101
99
  contains: VALUE,
102
100
  relevance: 0
103
101
  }
104
- }; // variable definitions and calls
102
+ };
105
103
 
104
+ // variable definitions and calls
106
105
  var VAR_RULE_MODE = {
107
106
  className: 'variable',
108
- variants: [// using more strict pattern for higher relevance to increase chances of Less detection.
107
+ variants: [
108
+ // using more strict pattern for higher relevance to increase chances of Less detection.
109
109
  // this is *the only* Less specific statement used in most of the sources, so...
110
110
  // (we’ll still often loose to the css-parser unless there's '//' comment,
111
111
  // simply because 1 variable just can't beat 99 properties :)
@@ -128,7 +128,6 @@ module.exports = function (hljs) {
128
128
  variants: [{
129
129
  begin: '[\\.#:&\\[>]',
130
130
  end: '[;{}]' // mixin calls end with ';'
131
-
132
131
  }, {
133
132
  begin: INTERP_IDENT_RE,
134
133
  end: '{'
@@ -137,8 +136,10 @@ module.exports = function (hljs) {
137
136
  returnEnd: true,
138
137
  illegal: '[<=\'$"]',
139
138
  relevance: 0,
140
- 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
141
- IDENT_MODE('selector-tag', INTERP_IDENT_RE + '%?', 0), // '%' for more consistent coloring of @keyframes "tags"
139
+ contains: [hljs.C_LINE_COMMENT_MODE, hljs.C_BLOCK_COMMENT_MODE, MIXIN_GUARD_MODE, IDENT_MODE('keyword', 'all\\b'), IDENT_MODE('variable', '@{' + IDENT_RE + '}'),
140
+ // otherwise it’s identified as tag
141
+ IDENT_MODE('selector-tag', INTERP_IDENT_RE + '%?', 0),
142
+ // '%' for more consistent coloring of @keyframes "tags"
142
143
  IDENT_MODE('selector-id', '#' + INTERP_IDENT_RE), IDENT_MODE('selector-class', '\\.' + INTERP_IDENT_RE, 0), IDENT_MODE('selector-tag', '&', 0), {
143
144
  className: 'selector-attr',
144
145
  begin: '\\[',
@@ -150,12 +151,14 @@ module.exports = function (hljs) {
150
151
  begin: '\\(',
151
152
  end: '\\)',
152
153
  contains: VALUE_WITH_RULESETS
153
- }, // argument list of parametric mixins
154
+ },
155
+ // argument list of parametric mixins
154
156
  {
155
157
  begin: '!important'
156
158
  } // eat !important after mixin call or it will be colored as tag
157
159
  ]
158
160
  };
161
+
159
162
  RULES.push(hljs.C_LINE_COMMENT_MODE, hljs.C_BLOCK_COMMENT_MODE, AT_RULE_MODE, VAR_RULE_MODE, RULE_MODE, SELECTOR_MODE);
160
163
  return {
161
164
  case_insensitive: true,
@@ -1,12 +1,9 @@
1
1
  "use strict";
2
2
 
3
3
  var _interopRequireDefault = require("@babel/runtime-corejs3/helpers/interopRequireDefault");
4
-
5
4
  var _concat = _interopRequireDefault(require("@babel/runtime-corejs3/core-js-stable/instance/concat"));
6
-
7
5
  module.exports = function (hljs) {
8
6
  var _context;
9
-
10
7
  var VARIABLE = {
11
8
  className: 'variable',
12
9
  variants: [{
@@ -1,18 +1,19 @@
1
1
  "use strict";
2
2
 
3
3
  var _interopRequireDefault = require("@babel/runtime-corejs3/helpers/interopRequireDefault");
4
-
5
4
  var _concat = _interopRequireDefault(require("@babel/runtime-corejs3/core-js-stable/instance/concat"));
6
-
7
5
  module.exports = function (hljs) {
8
6
  var _context;
9
-
10
7
  var KEYWORDS = {
11
- keyword: // JS keywords
12
- '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
8
+ keyword:
9
+ // JS keywords
10
+ '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 ' +
11
+ // LiveScript keywords
13
12
  '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',
14
- literal: // JS literals
15
- 'true false null undefined ' + // LiveScript literals
13
+ literal:
14
+ // JS literals
15
+ 'true false null undefined ' +
16
+ // LiveScript literals
16
17
  'yes no on off it that void',
17
18
  built_in: 'npm require console print module global window document'
18
19
  };
@@ -40,7 +41,6 @@ module.exports = function (hljs) {
40
41
  end: '(\\s*/)?',
41
42
  relevance: 0
42
43
  } // a number tries to eat the following slash to prevent treating it as a regexp
43
-
44
44
  }, {
45
45
  className: 'string',
46
46
  variants: [{
@@ -89,7 +89,6 @@ module.exports = function (hljs) {
89
89
  className: 'params',
90
90
  begin: '\\(',
91
91
  returnBegin: true,
92
-
93
92
  /* We need another contained nameless mode to not have every nested
94
93
  pair of parens to be called "params" */
95
94
  contains: [{
@@ -10,10 +10,12 @@ module.exports = function (hljs) {
10
10
  begin: 'i\\d+'
11
11
  }, hljs.COMMENT(';', '\\n', {
12
12
  relevance: 0
13
- }), // Double quote string
13
+ }),
14
+ // Double quote string
14
15
  hljs.QUOTE_STRING_MODE, {
15
16
  className: 'string',
16
- variants: [// Double-quoted string
17
+ variants: [
18
+ // Double-quoted string
17
19
  {
18
20
  begin: '"',
19
21
  end: '[^\\\\]"'
@@ -1,12 +1,9 @@
1
1
  "use strict";
2
2
 
3
3
  var _interopRequireDefault = require("@babel/runtime-corejs3/helpers/interopRequireDefault");
4
-
5
4
  var _concat = _interopRequireDefault(require("@babel/runtime-corejs3/core-js-stable/instance/concat"));
6
-
7
5
  module.exports = function (hljs) {
8
6
  var _context;
9
-
10
7
  var OPENING_LONG_BRACKET = '\\[=*\\[';
11
8
  var CLOSING_LONG_BRACKET = '\\]=*\\]';
12
9
  var LONG_BRACKETS = {
@@ -23,9 +20,12 @@ module.exports = function (hljs) {
23
20
  keywords: {
24
21
  literal: "true false nil",
25
22
  keyword: "and break do else elseif end for goto if in local not or repeat return then until while",
26
- built_in: //Metatags and globals:
27
- '_G _ENV _VERSION __index __newindex __mode __call __metatable __tostring __len ' + '__gc __add __sub __mul __div __mod __pow __concat __unm __eq __lt __le assert ' + //Standard methods and properties:
28
- 'collectgarbage dofile error getfenv getmetatable ipairs load loadfile loadstring' + 'module next pairs pcall print rawequal rawget rawset require select setfenv' + 'setmetatable tonumber tostring type unpack xpcall arg self' + //Library methods and properties (one line per library):
23
+ built_in:
24
+ //Metatags and globals:
25
+ '_G _ENV _VERSION __index __newindex __mode __call __metatable __tostring __len ' + '__gc __add __sub __mul __div __mod __pow __concat __unm __eq __lt __le assert ' +
26
+ //Standard methods and properties:
27
+ 'collectgarbage dofile error getfenv getmetatable ipairs load loadfile loadstring' + 'module next pairs pcall print rawequal rawget rawset require select setfenv' + 'setmetatable tonumber tostring type unpack xpcall arg self' +
28
+ //Library methods and properties (one line per library):
29
29
  'coroutine resume yield status wrap create running debug getupvalue ' + 'debug sethook getmetatable gethook setmetatable setlocal traceback setfenv getinfo setupvalue getlocal getregistry getfenv ' + 'io lines write close flush open output type read stderr stdin input stdout popen tmpfile ' + 'math log max acos huge ldexp pi cos tanh pow deg tan cosh sinh random randomseed frexp ceil floor rad abs sqrt modf asin min mod fmod log10 atan2 exp sin atan ' + 'os exit setlocale date getenv difftime remove time clock tmpname rename execute package preload loadlib loaded loaders cpath config path seeall ' + 'string sub upper len gfind rep find match char dump gmatch reverse byte format gsub lower ' + 'table setn insert getn foreachi maxn foreach concat sort remove'
30
30
  },
31
31
  contains: (0, _concat.default)(COMMENTS).call(COMMENTS, [{
@@ -12,7 +12,6 @@ module.exports = function (hljs) {
12
12
  }]
13
13
  };
14
14
  /* Quoted string with variables inside */
15
-
16
15
  var QUOTE_STRING = {
17
16
  className: 'string',
18
17
  begin: /"/,
@@ -20,7 +19,6 @@ module.exports = function (hljs) {
20
19
  contains: [hljs.BACKSLASH_ESCAPE, VARIABLE]
21
20
  };
22
21
  /* Function: $(func arg,...) */
23
-
24
22
  var FUNC = {
25
23
  className: 'variable',
26
24
  begin: /\$\([\w-]+\s/,
@@ -31,7 +29,6 @@ module.exports = function (hljs) {
31
29
  contains: [VARIABLE]
32
30
  };
33
31
  /* Variable assignment */
34
-
35
32
  var VAR_ASSIG = {
36
33
  begin: '^' + hljs.UNDERSCORE_IDENT_RE + '\\s*[:+?]?=',
37
34
  illegal: '\\n',
@@ -43,7 +40,6 @@ module.exports = function (hljs) {
43
40
  }]
44
41
  };
45
42
  /* Meta targets (.PHONY) */
46
-
47
43
  var META = {
48
44
  className: 'meta',
49
45
  begin: /^\.PHONY:/,
@@ -54,7 +50,6 @@ module.exports = function (hljs) {
54
50
  lexemes: /[\.\w]+/
55
51
  };
56
52
  /* Targets */
57
-
58
53
  var TARGET = {
59
54
  className: 'section',
60
55
  begin: /^[^\s]+:/,
@@ -3,7 +3,8 @@
3
3
  module.exports = function (hljs) {
4
4
  return {
5
5
  aliases: ['md', 'mkdown', 'mkd'],
6
- contains: [// highlight headers
6
+ contains: [
7
+ // highlight headers
7
8
  {
8
9
  className: 'section',
9
10
  variants: [{
@@ -12,21 +13,25 @@ module.exports = function (hljs) {
12
13
  }, {
13
14
  begin: '^.+?\\n[=-]{2,}$'
14
15
  }]
15
- }, // inline html
16
+ },
17
+ // inline html
16
18
  {
17
19
  begin: '<',
18
20
  end: '>',
19
21
  subLanguage: 'xml',
20
22
  relevance: 0
21
- }, // lists (indicators only)
23
+ },
24
+ // lists (indicators only)
22
25
  {
23
26
  className: 'bullet',
24
27
  begin: '^\\s*([*+-]|(\\d+\\.))\\s+'
25
- }, // strong segments
28
+ },
29
+ // strong segments
26
30
  {
27
31
  className: 'strong',
28
32
  begin: '[*_]{2}.+?[*_]{2}'
29
- }, // emphasis segments
33
+ },
34
+ // emphasis segments
30
35
  {
31
36
  className: 'emphasis',
32
37
  variants: [{
@@ -35,12 +40,14 @@ module.exports = function (hljs) {
35
40
  begin: '_.+?_',
36
41
  relevance: 0
37
42
  }]
38
- }, // blockquotes
43
+ },
44
+ // blockquotes
39
45
  {
40
46
  className: 'quote',
41
47
  begin: '^>\\s+',
42
48
  end: '$'
43
- }, // code snippets
49
+ },
50
+ // code snippets
44
51
  {
45
52
  className: 'code',
46
53
  variants: [{
@@ -53,11 +60,13 @@ module.exports = function (hljs) {
53
60
  end: '$',
54
61
  relevance: 0
55
62
  }]
56
- }, // horizontal rules
63
+ },
64
+ // horizontal rules
57
65
  {
58
66
  begin: '^[-\\*]{3,}',
59
67
  end: '$'
60
- }, // using links - title and link
68
+ },
69
+ // using links - title and link
61
70
  {
62
71
  begin: '\\[.+?\\][\\(\\[].*?[\\)\\]]',
63
72
  returnBegin: true,
@@ -3,8 +3,10 @@
3
3
  module.exports = function (hljs) {
4
4
  var KEYWORDS = {
5
5
  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',
6
- meta: // pragma
7
- '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
6
+ meta:
7
+ // pragma
8
+ 'inline no_inline type_spec source_file fact_table obsolete memo ' + 'loop_check minimal_model terminates does_not_terminate ' + 'check_termination promise_equivalent_clauses ' +
9
+ // preprocessor
8
10
  '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',
9
11
  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'
10
12
  };