@canopycanopycanopy/b-ber-markdown-renderer 3.0.0 → 3.0.3

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 +17 -17
@@ -7,27 +7,41 @@ module.exports = function (hljs) {
7
7
  aliases: ['mips'],
8
8
  lexemes: '\\.?' + hljs.IDENT_RE,
9
9
  keywords: {
10
- meta: //GNU preprocs
10
+ meta:
11
+ //GNU preprocs
11
12
  '.2byte .4byte .align .ascii .asciz .balign .byte .code .data .else .end .endif .endm .endr .equ .err .exitm .extern .global .hword .if .ifdef .ifndef .include .irp .long .macro .rept .req .section .set .skip .space .text .word .ltorg ',
12
- built_in: '$0 $1 $2 $3 $4 $5 $6 $7 $8 $9 $10 $11 $12 $13 $14 $15 ' + // integer registers
13
- '$16 $17 $18 $19 $20 $21 $22 $23 $24 $25 $26 $27 $28 $29 $30 $31 ' + // integer registers
14
- 'zero at v0 v1 a0 a1 a2 a3 a4 a5 a6 a7 ' + // integer register aliases
15
- 't0 t1 t2 t3 t4 t5 t6 t7 t8 t9 s0 s1 s2 s3 s4 s5 s6 s7 s8 ' + // integer register aliases
16
- 'k0 k1 gp sp fp ra ' + // integer register aliases
17
- '$f0 $f1 $f2 $f2 $f4 $f5 $f6 $f7 $f8 $f9 $f10 $f11 $f12 $f13 $f14 $f15 ' + // floating-point registers
18
- '$f16 $f17 $f18 $f19 $f20 $f21 $f22 $f23 $f24 $f25 $f26 $f27 $f28 $f29 $f30 $f31 ' + // floating-point registers
19
- 'Context Random EntryLo0 EntryLo1 Context PageMask Wired EntryHi ' + // Coprocessor 0 registers
20
- 'HWREna BadVAddr Count Compare SR IntCtl SRSCtl SRSMap Cause EPC PRId ' + // Coprocessor 0 registers
21
- 'EBase Config Config1 Config2 Config3 LLAddr Debug DEPC DESAVE CacheErr ' + // Coprocessor 0 registers
13
+ built_in: '$0 $1 $2 $3 $4 $5 $6 $7 $8 $9 $10 $11 $12 $13 $14 $15 ' +
14
+ // integer registers
15
+ '$16 $17 $18 $19 $20 $21 $22 $23 $24 $25 $26 $27 $28 $29 $30 $31 ' +
16
+ // integer registers
17
+ 'zero at v0 v1 a0 a1 a2 a3 a4 a5 a6 a7 ' +
18
+ // integer register aliases
19
+ 't0 t1 t2 t3 t4 t5 t6 t7 t8 t9 s0 s1 s2 s3 s4 s5 s6 s7 s8 ' +
20
+ // integer register aliases
21
+ 'k0 k1 gp sp fp ra ' +
22
+ // integer register aliases
23
+ '$f0 $f1 $f2 $f2 $f4 $f5 $f6 $f7 $f8 $f9 $f10 $f11 $f12 $f13 $f14 $f15 ' +
24
+ // floating-point registers
25
+ '$f16 $f17 $f18 $f19 $f20 $f21 $f22 $f23 $f24 $f25 $f26 $f27 $f28 $f29 $f30 $f31 ' +
26
+ // floating-point registers
27
+ 'Context Random EntryLo0 EntryLo1 Context PageMask Wired EntryHi ' +
28
+ // Coprocessor 0 registers
29
+ 'HWREna BadVAddr Count Compare SR IntCtl SRSCtl SRSMap Cause EPC PRId ' +
30
+ // Coprocessor 0 registers
31
+ 'EBase Config Config1 Config2 Config3 LLAddr Debug DEPC DESAVE CacheErr ' +
32
+ // Coprocessor 0 registers
22
33
  'ECC ErrorEPC TagLo DataLo TagHi DataHi WatchLo WatchHi PerfCtl PerfCnt ' // Coprocessor 0 registers
23
-
24
34
  },
35
+
25
36
  contains: [{
26
37
  className: 'keyword',
27
- begin: '\\b(' + //mnemonics
38
+ begin: '\\b(' +
39
+ //mnemonics
28
40
  // 32-bit integer instructions
29
- 'addi?u?|andi?|b(al)?|beql?|bgez(al)?l?|bgtzl?|blezl?|bltz(al)?l?|' + 'bnel?|cl[oz]|divu?|ext|ins|j(al)?|jalr(\.hb)?|jr(\.hb)?|lbu?|lhu?|' + 'll|lui|lw[lr]?|maddu?|mfhi|mflo|movn|movz|move|msubu?|mthi|mtlo|mul|' + 'multu?|nop|nor|ori?|rotrv?|sb|sc|se[bh]|sh|sllv?|slti?u?|srav?|' + 'srlv?|subu?|sw[lr]?|xori?|wsbh|' + // floating-point instructions
30
- 'abs\.[sd]|add\.[sd]|alnv.ps|bc1[ft]l?|' + 'c\.(s?f|un|u?eq|[ou]lt|[ou]le|ngle?|seq|l[et]|ng[et])\.[sd]|' + '(ceil|floor|round|trunc)\.[lw]\.[sd]|cfc1|cvt\.d\.[lsw]|' + 'cvt\.l\.[dsw]|cvt\.ps\.s|cvt\.s\.[dlw]|cvt\.s\.p[lu]|cvt\.w\.[dls]|' + 'div\.[ds]|ldx?c1|luxc1|lwx?c1|madd\.[sd]|mfc1|mov[fntz]?\.[ds]|' + 'msub\.[sd]|mth?c1|mul\.[ds]|neg\.[ds]|nmadd\.[ds]|nmsub\.[ds]|' + 'p[lu][lu]\.ps|recip\.fmt|r?sqrt\.[ds]|sdx?c1|sub\.[ds]|suxc1|' + 'swx?c1|' + // system control instructions
41
+ 'addi?u?|andi?|b(al)?|beql?|bgez(al)?l?|bgtzl?|blezl?|bltz(al)?l?|' + 'bnel?|cl[oz]|divu?|ext|ins|j(al)?|jalr(\.hb)?|jr(\.hb)?|lbu?|lhu?|' + 'll|lui|lw[lr]?|maddu?|mfhi|mflo|movn|movz|move|msubu?|mthi|mtlo|mul|' + 'multu?|nop|nor|ori?|rotrv?|sb|sc|se[bh]|sh|sllv?|slti?u?|srav?|' + 'srlv?|subu?|sw[lr]?|xori?|wsbh|' +
42
+ // floating-point instructions
43
+ 'abs\.[sd]|add\.[sd]|alnv.ps|bc1[ft]l?|' + 'c\.(s?f|un|u?eq|[ou]lt|[ou]le|ngle?|seq|l[et]|ng[et])\.[sd]|' + '(ceil|floor|round|trunc)\.[lw]\.[sd]|cfc1|cvt\.d\.[lsw]|' + 'cvt\.l\.[dsw]|cvt\.ps\.s|cvt\.s\.[dlw]|cvt\.s\.p[lu]|cvt\.w\.[dls]|' + 'div\.[ds]|ldx?c1|luxc1|lwx?c1|madd\.[sd]|mfc1|mov[fntz]?\.[ds]|' + 'msub\.[sd]|mth?c1|mul\.[ds]|neg\.[ds]|nmadd\.[ds]|nmsub\.[ds]|' + 'p[lu][lu]\.ps|recip\.fmt|r?sqrt\.[ds]|sdx?c1|sub\.[ds]|suxc1|' + 'swx?c1|' +
44
+ // system control instructions
31
45
  'break|cache|d?eret|[de]i|ehb|mfc0|mtc0|pause|prefx?|rdhwr|' + 'rdpgpr|sdbbp|ssnop|synci?|syscall|teqi?|tgei?u?|tlb(p|r|w[ir])|' + 'tlti?u?|tnei?|wait|wrpgpr' + ')',
32
46
  end: '\\s'
33
47
  }, hljs.COMMENT('[;#]', '$'), hljs.C_BLOCK_COMMENT_MODE, hljs.QUOTE_STRING_MODE, {
@@ -45,24 +59,29 @@ module.exports = function (hljs) {
45
59
  className: 'number',
46
60
  variants: [{
47
61
  begin: '0x[0-9a-f]+'
48
- }, //hex
62
+ },
63
+ //hex
49
64
  {
50
65
  begin: '\\b-?\\d+'
51
66
  } //bare number
52
67
  ],
68
+
53
69
  relevance: 0
54
70
  }, {
55
71
  className: 'symbol',
56
72
  variants: [{
57
73
  begin: '^\\s*[a-z_\\.\\$][a-z0-9_\\.\\$]+:'
58
- }, //GNU MIPS syntax
74
+ },
75
+ //GNU MIPS syntax
59
76
  {
60
77
  begin: '^\\s*[0-9]+:'
61
- }, // numbered local labels
78
+ },
79
+ // numbered local labels
62
80
  {
63
81
  begin: '[0-9]+[bf]'
64
82
  } // number local label reference (backwards, forwards)
65
83
  ],
84
+
66
85
  relevance: 0
67
86
  }],
68
87
  illegal: '\/'
@@ -6,12 +6,14 @@ module.exports = function (hljs) {
6
6
  contains: [{
7
7
  className: 'meta',
8
8
  begin: '^__(END|DATA)__$'
9
- }, // mojolicious line
9
+ },
10
+ // mojolicious line
10
11
  {
11
12
  begin: "^\\s*%{1,2}={0,2}",
12
13
  end: '$',
13
14
  subLanguage: 'perl'
14
- }, // mojolicious block
15
+ },
16
+ // mojolicious block
15
17
  {
16
18
  begin: "<%{1,2}={0,2}",
17
19
  end: "={0,1}%>",
@@ -1,14 +1,12 @@
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: // Moonscript keywords
8
+ keyword:
9
+ // Moonscript keywords
12
10
  'if then not for in while do return else elseif break continue switch and or ' + 'unless when class extends super local import export from using',
13
11
  literal: 'true false nil',
14
12
  built_in: '_G _VERSION assert 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 coroutine debug ' + 'io math os package string table'
@@ -25,7 +23,8 @@ module.exports = function (hljs) {
25
23
  end: '(\\s*/)?',
26
24
  relevance: 0
27
25
  }
28
- }), // a number tries to eat the following slash to prevent treating it as a regexp
26
+ }),
27
+ // a number tries to eat the following slash to prevent treating it as a regexp
29
28
  {
30
29
  className: 'string',
31
30
  variants: [{
@@ -42,11 +41,10 @@ module.exports = function (hljs) {
42
41
  begin: '@__' + hljs.IDENT_RE
43
42
  }, {
44
43
  begin: '@' + hljs.IDENT_RE // relevance booster on par with CoffeeScript
45
-
46
44
  }, {
47
45
  begin: hljs.IDENT_RE + '\\\\' + hljs.IDENT_RE // inst\method
48
-
49
46
  }];
47
+
50
48
  SUBST.contains = EXPRESSIONS;
51
49
  var TITLE = hljs.inherit(hljs.TITLE_MODE, {
52
50
  begin: JS_IDENT_RE
@@ -56,7 +54,6 @@ module.exports = function (hljs) {
56
54
  className: 'params',
57
55
  begin: '\\([^\\(]',
58
56
  returnBegin: true,
59
-
60
57
  /* We need another contained nameless mode to not have every nested
61
58
  pair of parens to be called "params" */
62
59
  contains: [{
@@ -30,7 +30,8 @@ module.exports = function (hljs) {
30
30
  begin: /'/,
31
31
  end: /'/
32
32
  }]
33
- }, // this swallows entire URLs to avoid detecting numbers within
33
+ },
34
+ // this swallows entire URLs to avoid detecting numbers within
34
35
  {
35
36
  begin: '([a-z]+):/',
36
37
  end: '\\s',
@@ -44,23 +45,28 @@ module.exports = function (hljs) {
44
45
  begin: "\\s\\^",
45
46
  end: "\\s|{|;",
46
47
  returnEnd: true
47
- }, // regexp locations (~, ~*)
48
+ },
49
+ // regexp locations (~, ~*)
48
50
  {
49
51
  begin: "~\\*?\\s+",
50
52
  end: "\\s|{|;",
51
53
  returnEnd: true
52
- }, // *.example.com
54
+ },
55
+ // *.example.com
53
56
  {
54
57
  begin: "\\*(\\.[a-z\\-]+)+"
55
- }, // sub.example.*
58
+ },
59
+ // sub.example.*
56
60
  {
57
61
  begin: "([a-z\\-]+\\.)+\\*"
58
62
  }]
59
- }, // IP
63
+ },
64
+ // IP
60
65
  {
61
66
  className: 'number',
62
67
  begin: '\\b\\d{1,3}\\.\\d{1,3}\\.\\d{1,3}\\.\\d{1,3}(:\\d{1,5})?\\b'
63
- }, // units
68
+ },
69
+ // units
64
70
  {
65
71
  className: 'number',
66
72
  begin: '\\b\\d+[kKmMgGdshdwy]*\\b',
@@ -5,13 +5,10 @@ module.exports = function (hljs) {
5
5
  return {
6
6
  aliases: ['ml'],
7
7
  keywords: {
8
- keyword: 'and as assert asr begin class constraint do done downto else end ' + '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 ' +
9
- /* camlp4 */
8
+ keyword: 'and as assert asr begin class constraint do done downto else end ' + '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 */
10
9
  'parser value',
11
- built_in:
12
- /* built-in types */
13
- 'array bool bytes char exn|5 float int int32 int64 list lazy_t|5 nativeint|5 string unit ' +
14
- /* (some) types in Pervasives */
10
+ built_in: /* built-in types */
11
+ 'array bool bytes char exn|5 float int int32 int64 list lazy_t|5 nativeint|5 string unit ' + /* (some) types in Pervasives */
15
12
  'in_channel out_channel ref',
16
13
  literal: 'true false'
17
14
  },
@@ -28,7 +25,6 @@ module.exports = function (hljs) {
28
25
  className: 'symbol',
29
26
  begin: '\'[A-Za-z_](?!\')[\\w\']*'
30
27
  /* the grammar is ambiguous on how 'a'b should be interpreted but not the compiler */
31
-
32
28
  }, {
33
29
  /* polymorphic variant */
34
30
  className: 'type',
@@ -53,7 +49,6 @@ module.exports = function (hljs) {
53
49
  relevance: 0
54
50
  }, {
55
51
  begin: /[-=]>/ // relevance booster
56
-
57
52
  }]
58
53
  };
59
54
  };
@@ -2,46 +2,46 @@
2
2
 
3
3
  module.exports = function (hljs) {
4
4
  var SPECIAL_VARS = {
5
- className: 'keyword',
6
- begin: '\\$(f[asn]|t|vp[rtd]|children)'
7
- },
8
- LITERALS = {
9
- className: 'literal',
10
- begin: 'false|true|PI|undef'
11
- },
12
- NUMBERS = {
13
- className: 'number',
14
- begin: '\\b\\d+(\\.\\d+)?(e-?\\d+)?',
15
- //adds 1e5, 1e-10
16
- relevance: 0
17
- },
18
- STRING = hljs.inherit(hljs.QUOTE_STRING_MODE, {
19
- illegal: null
20
- }),
21
- PREPRO = {
22
- className: 'meta',
23
- keywords: {
24
- 'meta-keyword': 'include use'
5
+ className: 'keyword',
6
+ begin: '\\$(f[asn]|t|vp[rtd]|children)'
25
7
  },
26
- begin: 'include|use <',
27
- end: '>'
28
- },
29
- PARAMS = {
30
- className: 'params',
31
- begin: '\\(',
32
- end: '\\)',
33
- contains: ['self', NUMBERS, STRING, SPECIAL_VARS, LITERALS]
34
- },
35
- MODIFIERS = {
36
- begin: '[*!#%]',
37
- relevance: 0
38
- },
39
- FUNCTIONS = {
40
- className: 'function',
41
- beginKeywords: 'module function',
42
- end: '\\=|\\{',
43
- contains: [PARAMS, hljs.UNDERSCORE_TITLE_MODE]
44
- };
8
+ LITERALS = {
9
+ className: 'literal',
10
+ begin: 'false|true|PI|undef'
11
+ },
12
+ NUMBERS = {
13
+ className: 'number',
14
+ begin: '\\b\\d+(\\.\\d+)?(e-?\\d+)?',
15
+ //adds 1e5, 1e-10
16
+ relevance: 0
17
+ },
18
+ STRING = hljs.inherit(hljs.QUOTE_STRING_MODE, {
19
+ illegal: null
20
+ }),
21
+ PREPRO = {
22
+ className: 'meta',
23
+ keywords: {
24
+ 'meta-keyword': 'include use'
25
+ },
26
+ begin: 'include|use <',
27
+ end: '>'
28
+ },
29
+ PARAMS = {
30
+ className: 'params',
31
+ begin: '\\(',
32
+ end: '\\)',
33
+ contains: ['self', NUMBERS, STRING, SPECIAL_VARS, LITERALS]
34
+ },
35
+ MODIFIERS = {
36
+ begin: '[*!#%]',
37
+ relevance: 0
38
+ },
39
+ FUNCTIONS = {
40
+ className: 'function',
41
+ beginKeywords: 'module function',
42
+ end: '\\=|\\{',
43
+ contains: [PARAMS, hljs.UNDERSCORE_TITLE_MODE]
44
+ };
45
45
  return {
46
46
  aliases: ['scad'],
47
47
  keywords: {
@@ -10,9 +10,10 @@ module.exports = function (hljs) {
10
10
  };
11
11
  var METHOD = {
12
12
  begin: '->{',
13
- end: '}' // contains defined later
14
-
13
+ end: '}'
14
+ // contains defined later
15
15
  };
16
+
16
17
  var VAR = {
17
18
  variants: [{
18
19
  begin: /\$\d/
@@ -92,7 +93,6 @@ module.exports = function (hljs) {
92
93
  end: '/[a-z]*',
93
94
  contains: [hljs.BACKSLASH_ESCAPE],
94
95
  relevance: 0 // allows empty "//" which is a common comment delimiter in other languages
95
-
96
96
  }]
97
97
  }, {
98
98
  className: 'function',