@uiw/react-md-editor 3.12.1 → 3.13.0
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.
- package/dist/mdeditor.css +26 -16
- package/dist/mdeditor.js +2188 -1638
- package/dist/mdeditor.min.css +1 -1
- package/dist/mdeditor.min.js +1 -1
- package/dist/mdeditor.min.js.LICENSE.txt +1 -15
- package/esm/Context.js.map +5 -5
- package/esm/Editor.d.ts +2 -0
- package/esm/Editor.js +10 -3
- package/esm/Editor.js.map +7 -6
- package/esm/commands/bold.js.map +5 -5
- package/esm/commands/code.js +4 -2
- package/esm/commands/code.js.map +7 -6
- package/esm/commands/comment.js.map +5 -5
- package/esm/commands/divider.js.map +5 -5
- package/esm/commands/fullscreen.js.map +5 -5
- package/esm/commands/group.js.map +5 -5
- package/esm/commands/hr.js.map +5 -5
- package/esm/commands/image.js.map +5 -5
- package/esm/commands/index.js.map +5 -5
- package/esm/commands/italic.js.map +5 -5
- package/esm/commands/link.js.map +5 -5
- package/esm/commands/list.js.map +5 -5
- package/esm/commands/preview.js.map +5 -5
- package/esm/commands/quote.js.map +5 -5
- package/esm/commands/strikeThrough.js.map +5 -5
- package/esm/commands/title.js.map +5 -5
- package/esm/commands/title1.js.map +5 -5
- package/esm/commands/title2.js.map +5 -5
- package/esm/commands/title3.js.map +5 -5
- package/esm/commands/title4.js.map +5 -5
- package/esm/commands/title5.js.map +5 -5
- package/esm/commands/title6.js.map +5 -5
- package/esm/components/DragBar/index.js.map +5 -5
- package/esm/components/TextArea/Markdown.js.map +5 -5
- package/esm/components/TextArea/Textarea.js.map +5 -5
- package/esm/components/TextArea/handleKeyDown.js.map +5 -5
- package/esm/components/TextArea/index.css +8 -1
- package/esm/components/TextArea/index.js.map +5 -5
- package/esm/components/TextArea/index.less +8 -1
- package/esm/components/TextArea/shortcuts.js.map +5 -5
- package/esm/components/Toolbar/Child.js.map +5 -5
- package/esm/components/Toolbar/index.css +5 -0
- package/esm/components/Toolbar/index.d.ts +1 -0
- package/esm/components/Toolbar/index.js +3 -1
- package/esm/components/Toolbar/index.js.map +9 -7
- package/esm/components/Toolbar/index.less +5 -0
- package/esm/index.css +3 -0
- package/esm/index.js.map +5 -5
- package/esm/index.less +3 -0
- package/esm/utils/InsertTextAtPosition.js.map +5 -5
- package/esm/utils/markdownUtils.js.map +5 -5
- package/lib/Context.js.map +5 -5
- package/lib/Editor.d.ts +2 -0
- package/lib/Editor.js +11 -3
- package/lib/Editor.js.map +14 -6
- package/lib/commands/bold.js.map +6 -5
- package/lib/commands/code.js +4 -2
- package/lib/commands/code.js.map +10 -6
- package/lib/commands/comment.js.map +6 -5
- package/lib/commands/divider.js.map +5 -5
- package/lib/commands/fullscreen.js.map +5 -5
- package/lib/commands/group.js.map +5 -5
- package/lib/commands/hr.js.map +5 -5
- package/lib/commands/image.js.map +6 -5
- package/lib/commands/index.js.map +6 -5
- package/lib/commands/italic.js.map +6 -5
- package/lib/commands/link.js.map +6 -5
- package/lib/commands/list.js.map +8 -5
- package/lib/commands/preview.js.map +5 -5
- package/lib/commands/quote.js.map +8 -5
- package/lib/commands/strikeThrough.js.map +6 -5
- package/lib/commands/title.js.map +5 -5
- package/lib/commands/title1.js.map +6 -5
- package/lib/commands/title2.js.map +6 -5
- package/lib/commands/title3.js.map +6 -5
- package/lib/commands/title4.js.map +6 -5
- package/lib/commands/title5.js.map +6 -5
- package/lib/commands/title6.js.map +6 -5
- package/lib/components/DragBar/index.js.map +9 -6
- package/lib/components/TextArea/Markdown.js.map +9 -5
- package/lib/components/TextArea/Textarea.js.map +9 -5
- package/lib/components/TextArea/handleKeyDown.js.map +7 -5
- package/lib/components/TextArea/index.js.map +7 -6
- package/lib/components/TextArea/index.less +8 -1
- package/lib/components/TextArea/shortcuts.js.map +5 -5
- package/lib/components/Toolbar/Child.js.map +7 -5
- package/lib/components/Toolbar/index.d.ts +1 -0
- package/lib/components/Toolbar/index.js +3 -1
- package/lib/components/Toolbar/index.js.map +12 -7
- package/lib/components/Toolbar/index.less +5 -0
- package/lib/index.js.map +5 -5
- package/lib/index.less +3 -0
- package/lib/utils/InsertTextAtPosition.js.map +5 -5
- package/lib/utils/markdownUtils.js.map +5 -5
- package/markdown-editor.css +16 -1
- package/package.json +11 -11
- package/src/Editor.tsx +9 -1
- package/src/__test__/editor.test.tsx +1 -1
- package/src/commands/code.tsx +2 -2
- package/src/components/TextArea/index.less +8 -1
- package/src/components/Toolbar/index.less +5 -0
- package/src/components/Toolbar/index.tsx +4 -2
- package/src/index.less +3 -0
package/dist/mdeditor.js
CHANGED
|
@@ -1557,104 +1557,6 @@ function parse(formula) {
|
|
|
1557
1557
|
exports.parse = parse;
|
|
1558
1558
|
|
|
1559
1559
|
|
|
1560
|
-
/***/ }),
|
|
1561
|
-
|
|
1562
|
-
/***/ 323:
|
|
1563
|
-
/***/ ((module) => {
|
|
1564
|
-
|
|
1565
|
-
"use strict";
|
|
1566
|
-
/*
|
|
1567
|
-
object-assign
|
|
1568
|
-
(c) Sindre Sorhus
|
|
1569
|
-
@license MIT
|
|
1570
|
-
*/
|
|
1571
|
-
|
|
1572
|
-
|
|
1573
|
-
/* eslint-disable no-unused-vars */
|
|
1574
|
-
var getOwnPropertySymbols = Object.getOwnPropertySymbols;
|
|
1575
|
-
var hasOwnProperty = Object.prototype.hasOwnProperty;
|
|
1576
|
-
var propIsEnumerable = Object.prototype.propertyIsEnumerable;
|
|
1577
|
-
|
|
1578
|
-
function toObject(val) {
|
|
1579
|
-
if (val === null || val === undefined) {
|
|
1580
|
-
throw new TypeError('Object.assign cannot be called with null or undefined');
|
|
1581
|
-
}
|
|
1582
|
-
|
|
1583
|
-
return Object(val);
|
|
1584
|
-
}
|
|
1585
|
-
|
|
1586
|
-
function shouldUseNative() {
|
|
1587
|
-
try {
|
|
1588
|
-
if (!Object.assign) {
|
|
1589
|
-
return false;
|
|
1590
|
-
}
|
|
1591
|
-
|
|
1592
|
-
// Detect buggy property enumeration order in older V8 versions.
|
|
1593
|
-
|
|
1594
|
-
// https://bugs.chromium.org/p/v8/issues/detail?id=4118
|
|
1595
|
-
var test1 = new String('abc'); // eslint-disable-line no-new-wrappers
|
|
1596
|
-
test1[5] = 'de';
|
|
1597
|
-
if (Object.getOwnPropertyNames(test1)[0] === '5') {
|
|
1598
|
-
return false;
|
|
1599
|
-
}
|
|
1600
|
-
|
|
1601
|
-
// https://bugs.chromium.org/p/v8/issues/detail?id=3056
|
|
1602
|
-
var test2 = {};
|
|
1603
|
-
for (var i = 0; i < 10; i++) {
|
|
1604
|
-
test2['_' + String.fromCharCode(i)] = i;
|
|
1605
|
-
}
|
|
1606
|
-
var order2 = Object.getOwnPropertyNames(test2).map(function (n) {
|
|
1607
|
-
return test2[n];
|
|
1608
|
-
});
|
|
1609
|
-
if (order2.join('') !== '0123456789') {
|
|
1610
|
-
return false;
|
|
1611
|
-
}
|
|
1612
|
-
|
|
1613
|
-
// https://bugs.chromium.org/p/v8/issues/detail?id=3056
|
|
1614
|
-
var test3 = {};
|
|
1615
|
-
'abcdefghijklmnopqrst'.split('').forEach(function (letter) {
|
|
1616
|
-
test3[letter] = letter;
|
|
1617
|
-
});
|
|
1618
|
-
if (Object.keys(Object.assign({}, test3)).join('') !==
|
|
1619
|
-
'abcdefghijklmnopqrst') {
|
|
1620
|
-
return false;
|
|
1621
|
-
}
|
|
1622
|
-
|
|
1623
|
-
return true;
|
|
1624
|
-
} catch (err) {
|
|
1625
|
-
// We don't expect any of the above to throw, but better to be safe.
|
|
1626
|
-
return false;
|
|
1627
|
-
}
|
|
1628
|
-
}
|
|
1629
|
-
|
|
1630
|
-
module.exports = shouldUseNative() ? Object.assign : function (target, source) {
|
|
1631
|
-
var from;
|
|
1632
|
-
var to = toObject(target);
|
|
1633
|
-
var symbols;
|
|
1634
|
-
|
|
1635
|
-
for (var s = 1; s < arguments.length; s++) {
|
|
1636
|
-
from = Object(arguments[s]);
|
|
1637
|
-
|
|
1638
|
-
for (var key in from) {
|
|
1639
|
-
if (hasOwnProperty.call(from, key)) {
|
|
1640
|
-
to[key] = from[key];
|
|
1641
|
-
}
|
|
1642
|
-
}
|
|
1643
|
-
|
|
1644
|
-
if (getOwnPropertySymbols) {
|
|
1645
|
-
symbols = getOwnPropertySymbols(from);
|
|
1646
|
-
for (var i = 0; i < symbols.length; i++) {
|
|
1647
|
-
if (propIsEnumerable.call(from, symbols[i])) {
|
|
1648
|
-
to[symbols[i]] = from[symbols[i]];
|
|
1649
|
-
}
|
|
1650
|
-
}
|
|
1651
|
-
}
|
|
1652
|
-
}
|
|
1653
|
-
|
|
1654
|
-
return to;
|
|
1655
|
-
};
|
|
1656
|
-
|
|
1657
|
-
|
|
1658
1560
|
/***/ }),
|
|
1659
1561
|
|
|
1660
1562
|
/***/ 977:
|
|
@@ -9602,1276 +9504,6 @@ Mixin.install = function(host, Ctor, opts) {
|
|
|
9602
9504
|
module.exports = Mixin;
|
|
9603
9505
|
|
|
9604
9506
|
|
|
9605
|
-
/***/ }),
|
|
9606
|
-
|
|
9607
|
-
/***/ 975:
|
|
9608
|
-
/***/ ((module, __unused_webpack_exports, __webpack_require__) => {
|
|
9609
|
-
|
|
9610
|
-
/// <reference lib="WebWorker"/>
|
|
9611
|
-
|
|
9612
|
-
var _self = (typeof window !== 'undefined')
|
|
9613
|
-
? window // if in browser
|
|
9614
|
-
: (
|
|
9615
|
-
(typeof WorkerGlobalScope !== 'undefined' && self instanceof WorkerGlobalScope)
|
|
9616
|
-
? self // if in worker
|
|
9617
|
-
: {} // if in node js
|
|
9618
|
-
);
|
|
9619
|
-
|
|
9620
|
-
/**
|
|
9621
|
-
* Prism: Lightweight, robust, elegant syntax highlighting
|
|
9622
|
-
*
|
|
9623
|
-
* @license MIT <https://opensource.org/licenses/MIT>
|
|
9624
|
-
* @author Lea Verou <https://lea.verou.me>
|
|
9625
|
-
* @namespace
|
|
9626
|
-
* @public
|
|
9627
|
-
*/
|
|
9628
|
-
var Prism = (function (_self) {
|
|
9629
|
-
|
|
9630
|
-
// Private helper vars
|
|
9631
|
-
var lang = /(?:^|\s)lang(?:uage)?-([\w-]+)(?=\s|$)/i;
|
|
9632
|
-
var uniqueId = 0;
|
|
9633
|
-
|
|
9634
|
-
// The grammar object for plaintext
|
|
9635
|
-
var plainTextGrammar = {};
|
|
9636
|
-
|
|
9637
|
-
|
|
9638
|
-
var _ = {
|
|
9639
|
-
/**
|
|
9640
|
-
* By default, Prism will attempt to highlight all code elements (by calling {@link Prism.highlightAll}) on the
|
|
9641
|
-
* current page after the page finished loading. This might be a problem if e.g. you wanted to asynchronously load
|
|
9642
|
-
* additional languages or plugins yourself.
|
|
9643
|
-
*
|
|
9644
|
-
* By setting this value to `true`, Prism will not automatically highlight all code elements on the page.
|
|
9645
|
-
*
|
|
9646
|
-
* You obviously have to change this value before the automatic highlighting started. To do this, you can add an
|
|
9647
|
-
* empty Prism object into the global scope before loading the Prism script like this:
|
|
9648
|
-
*
|
|
9649
|
-
* ```js
|
|
9650
|
-
* window.Prism = window.Prism || {};
|
|
9651
|
-
* Prism.manual = true;
|
|
9652
|
-
* // add a new <script> to load Prism's script
|
|
9653
|
-
* ```
|
|
9654
|
-
*
|
|
9655
|
-
* @default false
|
|
9656
|
-
* @type {boolean}
|
|
9657
|
-
* @memberof Prism
|
|
9658
|
-
* @public
|
|
9659
|
-
*/
|
|
9660
|
-
manual: _self.Prism && _self.Prism.manual,
|
|
9661
|
-
/**
|
|
9662
|
-
* By default, if Prism is in a web worker, it assumes that it is in a worker it created itself, so it uses
|
|
9663
|
-
* `addEventListener` to communicate with its parent instance. However, if you're using Prism manually in your
|
|
9664
|
-
* own worker, you don't want it to do this.
|
|
9665
|
-
*
|
|
9666
|
-
* By setting this value to `true`, Prism will not add its own listeners to the worker.
|
|
9667
|
-
*
|
|
9668
|
-
* You obviously have to change this value before Prism executes. To do this, you can add an
|
|
9669
|
-
* empty Prism object into the global scope before loading the Prism script like this:
|
|
9670
|
-
*
|
|
9671
|
-
* ```js
|
|
9672
|
-
* window.Prism = window.Prism || {};
|
|
9673
|
-
* Prism.disableWorkerMessageHandler = true;
|
|
9674
|
-
* // Load Prism's script
|
|
9675
|
-
* ```
|
|
9676
|
-
*
|
|
9677
|
-
* @default false
|
|
9678
|
-
* @type {boolean}
|
|
9679
|
-
* @memberof Prism
|
|
9680
|
-
* @public
|
|
9681
|
-
*/
|
|
9682
|
-
disableWorkerMessageHandler: _self.Prism && _self.Prism.disableWorkerMessageHandler,
|
|
9683
|
-
|
|
9684
|
-
/**
|
|
9685
|
-
* A namespace for utility methods.
|
|
9686
|
-
*
|
|
9687
|
-
* All function in this namespace that are not explicitly marked as _public_ are for __internal use only__ and may
|
|
9688
|
-
* change or disappear at any time.
|
|
9689
|
-
*
|
|
9690
|
-
* @namespace
|
|
9691
|
-
* @memberof Prism
|
|
9692
|
-
*/
|
|
9693
|
-
util: {
|
|
9694
|
-
encode: function encode(tokens) {
|
|
9695
|
-
if (tokens instanceof Token) {
|
|
9696
|
-
return new Token(tokens.type, encode(tokens.content), tokens.alias);
|
|
9697
|
-
} else if (Array.isArray(tokens)) {
|
|
9698
|
-
return tokens.map(encode);
|
|
9699
|
-
} else {
|
|
9700
|
-
return tokens.replace(/&/g, '&').replace(/</g, '<').replace(/\u00a0/g, ' ');
|
|
9701
|
-
}
|
|
9702
|
-
},
|
|
9703
|
-
|
|
9704
|
-
/**
|
|
9705
|
-
* Returns the name of the type of the given value.
|
|
9706
|
-
*
|
|
9707
|
-
* @param {any} o
|
|
9708
|
-
* @returns {string}
|
|
9709
|
-
* @example
|
|
9710
|
-
* type(null) === 'Null'
|
|
9711
|
-
* type(undefined) === 'Undefined'
|
|
9712
|
-
* type(123) === 'Number'
|
|
9713
|
-
* type('foo') === 'String'
|
|
9714
|
-
* type(true) === 'Boolean'
|
|
9715
|
-
* type([1, 2]) === 'Array'
|
|
9716
|
-
* type({}) === 'Object'
|
|
9717
|
-
* type(String) === 'Function'
|
|
9718
|
-
* type(/abc+/) === 'RegExp'
|
|
9719
|
-
*/
|
|
9720
|
-
type: function (o) {
|
|
9721
|
-
return Object.prototype.toString.call(o).slice(8, -1);
|
|
9722
|
-
},
|
|
9723
|
-
|
|
9724
|
-
/**
|
|
9725
|
-
* Returns a unique number for the given object. Later calls will still return the same number.
|
|
9726
|
-
*
|
|
9727
|
-
* @param {Object} obj
|
|
9728
|
-
* @returns {number}
|
|
9729
|
-
*/
|
|
9730
|
-
objId: function (obj) {
|
|
9731
|
-
if (!obj['__id']) {
|
|
9732
|
-
Object.defineProperty(obj, '__id', { value: ++uniqueId });
|
|
9733
|
-
}
|
|
9734
|
-
return obj['__id'];
|
|
9735
|
-
},
|
|
9736
|
-
|
|
9737
|
-
/**
|
|
9738
|
-
* Creates a deep clone of the given object.
|
|
9739
|
-
*
|
|
9740
|
-
* The main intended use of this function is to clone language definitions.
|
|
9741
|
-
*
|
|
9742
|
-
* @param {T} o
|
|
9743
|
-
* @param {Record<number, any>} [visited]
|
|
9744
|
-
* @returns {T}
|
|
9745
|
-
* @template T
|
|
9746
|
-
*/
|
|
9747
|
-
clone: function deepClone(o, visited) {
|
|
9748
|
-
visited = visited || {};
|
|
9749
|
-
|
|
9750
|
-
var clone; var id;
|
|
9751
|
-
switch (_.util.type(o)) {
|
|
9752
|
-
case 'Object':
|
|
9753
|
-
id = _.util.objId(o);
|
|
9754
|
-
if (visited[id]) {
|
|
9755
|
-
return visited[id];
|
|
9756
|
-
}
|
|
9757
|
-
clone = /** @type {Record<string, any>} */ ({});
|
|
9758
|
-
visited[id] = clone;
|
|
9759
|
-
|
|
9760
|
-
for (var key in o) {
|
|
9761
|
-
if (o.hasOwnProperty(key)) {
|
|
9762
|
-
clone[key] = deepClone(o[key], visited);
|
|
9763
|
-
}
|
|
9764
|
-
}
|
|
9765
|
-
|
|
9766
|
-
return /** @type {any} */ (clone);
|
|
9767
|
-
|
|
9768
|
-
case 'Array':
|
|
9769
|
-
id = _.util.objId(o);
|
|
9770
|
-
if (visited[id]) {
|
|
9771
|
-
return visited[id];
|
|
9772
|
-
}
|
|
9773
|
-
clone = [];
|
|
9774
|
-
visited[id] = clone;
|
|
9775
|
-
|
|
9776
|
-
(/** @type {Array} */(/** @type {any} */(o))).forEach(function (v, i) {
|
|
9777
|
-
clone[i] = deepClone(v, visited);
|
|
9778
|
-
});
|
|
9779
|
-
|
|
9780
|
-
return /** @type {any} */ (clone);
|
|
9781
|
-
|
|
9782
|
-
default:
|
|
9783
|
-
return o;
|
|
9784
|
-
}
|
|
9785
|
-
},
|
|
9786
|
-
|
|
9787
|
-
/**
|
|
9788
|
-
* Returns the Prism language of the given element set by a `language-xxxx` or `lang-xxxx` class.
|
|
9789
|
-
*
|
|
9790
|
-
* If no language is set for the element or the element is `null` or `undefined`, `none` will be returned.
|
|
9791
|
-
*
|
|
9792
|
-
* @param {Element} element
|
|
9793
|
-
* @returns {string}
|
|
9794
|
-
*/
|
|
9795
|
-
getLanguage: function (element) {
|
|
9796
|
-
while (element) {
|
|
9797
|
-
var m = lang.exec(element.className);
|
|
9798
|
-
if (m) {
|
|
9799
|
-
return m[1].toLowerCase();
|
|
9800
|
-
}
|
|
9801
|
-
element = element.parentElement;
|
|
9802
|
-
}
|
|
9803
|
-
return 'none';
|
|
9804
|
-
},
|
|
9805
|
-
|
|
9806
|
-
/**
|
|
9807
|
-
* Sets the Prism `language-xxxx` class of the given element.
|
|
9808
|
-
*
|
|
9809
|
-
* @param {Element} element
|
|
9810
|
-
* @param {string} language
|
|
9811
|
-
* @returns {void}
|
|
9812
|
-
*/
|
|
9813
|
-
setLanguage: function (element, language) {
|
|
9814
|
-
// remove all `language-xxxx` classes
|
|
9815
|
-
// (this might leave behind a leading space)
|
|
9816
|
-
element.className = element.className.replace(RegExp(lang, 'gi'), '');
|
|
9817
|
-
|
|
9818
|
-
// add the new `language-xxxx` class
|
|
9819
|
-
// (using `classList` will automatically clean up spaces for us)
|
|
9820
|
-
element.classList.add('language-' + language);
|
|
9821
|
-
},
|
|
9822
|
-
|
|
9823
|
-
/**
|
|
9824
|
-
* Returns the script element that is currently executing.
|
|
9825
|
-
*
|
|
9826
|
-
* This does __not__ work for line script element.
|
|
9827
|
-
*
|
|
9828
|
-
* @returns {HTMLScriptElement | null}
|
|
9829
|
-
*/
|
|
9830
|
-
currentScript: function () {
|
|
9831
|
-
if (typeof document === 'undefined') {
|
|
9832
|
-
return null;
|
|
9833
|
-
}
|
|
9834
|
-
if ('currentScript' in document && 1 < 2 /* hack to trip TS' flow analysis */) {
|
|
9835
|
-
return /** @type {any} */ (document.currentScript);
|
|
9836
|
-
}
|
|
9837
|
-
|
|
9838
|
-
// IE11 workaround
|
|
9839
|
-
// we'll get the src of the current script by parsing IE11's error stack trace
|
|
9840
|
-
// this will not work for inline scripts
|
|
9841
|
-
|
|
9842
|
-
try {
|
|
9843
|
-
throw new Error();
|
|
9844
|
-
} catch (err) {
|
|
9845
|
-
// Get file src url from stack. Specifically works with the format of stack traces in IE.
|
|
9846
|
-
// A stack will look like this:
|
|
9847
|
-
//
|
|
9848
|
-
// Error
|
|
9849
|
-
// at _.util.currentScript (http://localhost/components/prism-core.js:119:5)
|
|
9850
|
-
// at Global code (http://localhost/components/prism-core.js:606:1)
|
|
9851
|
-
|
|
9852
|
-
var src = (/at [^(\r\n]*\((.*):[^:]+:[^:]+\)$/i.exec(err.stack) || [])[1];
|
|
9853
|
-
if (src) {
|
|
9854
|
-
var scripts = document.getElementsByTagName('script');
|
|
9855
|
-
for (var i in scripts) {
|
|
9856
|
-
if (scripts[i].src == src) {
|
|
9857
|
-
return scripts[i];
|
|
9858
|
-
}
|
|
9859
|
-
}
|
|
9860
|
-
}
|
|
9861
|
-
return null;
|
|
9862
|
-
}
|
|
9863
|
-
},
|
|
9864
|
-
|
|
9865
|
-
/**
|
|
9866
|
-
* Returns whether a given class is active for `element`.
|
|
9867
|
-
*
|
|
9868
|
-
* The class can be activated if `element` or one of its ancestors has the given class and it can be deactivated
|
|
9869
|
-
* if `element` or one of its ancestors has the negated version of the given class. The _negated version_ of the
|
|
9870
|
-
* given class is just the given class with a `no-` prefix.
|
|
9871
|
-
*
|
|
9872
|
-
* Whether the class is active is determined by the closest ancestor of `element` (where `element` itself is
|
|
9873
|
-
* closest ancestor) that has the given class or the negated version of it. If neither `element` nor any of its
|
|
9874
|
-
* ancestors have the given class or the negated version of it, then the default activation will be returned.
|
|
9875
|
-
*
|
|
9876
|
-
* In the paradoxical situation where the closest ancestor contains __both__ the given class and the negated
|
|
9877
|
-
* version of it, the class is considered active.
|
|
9878
|
-
*
|
|
9879
|
-
* @param {Element} element
|
|
9880
|
-
* @param {string} className
|
|
9881
|
-
* @param {boolean} [defaultActivation=false]
|
|
9882
|
-
* @returns {boolean}
|
|
9883
|
-
*/
|
|
9884
|
-
isActive: function (element, className, defaultActivation) {
|
|
9885
|
-
var no = 'no-' + className;
|
|
9886
|
-
|
|
9887
|
-
while (element) {
|
|
9888
|
-
var classList = element.classList;
|
|
9889
|
-
if (classList.contains(className)) {
|
|
9890
|
-
return true;
|
|
9891
|
-
}
|
|
9892
|
-
if (classList.contains(no)) {
|
|
9893
|
-
return false;
|
|
9894
|
-
}
|
|
9895
|
-
element = element.parentElement;
|
|
9896
|
-
}
|
|
9897
|
-
return !!defaultActivation;
|
|
9898
|
-
}
|
|
9899
|
-
},
|
|
9900
|
-
|
|
9901
|
-
/**
|
|
9902
|
-
* This namespace contains all currently loaded languages and the some helper functions to create and modify languages.
|
|
9903
|
-
*
|
|
9904
|
-
* @namespace
|
|
9905
|
-
* @memberof Prism
|
|
9906
|
-
* @public
|
|
9907
|
-
*/
|
|
9908
|
-
languages: {
|
|
9909
|
-
/**
|
|
9910
|
-
* The grammar for plain, unformatted text.
|
|
9911
|
-
*/
|
|
9912
|
-
plain: plainTextGrammar,
|
|
9913
|
-
plaintext: plainTextGrammar,
|
|
9914
|
-
text: plainTextGrammar,
|
|
9915
|
-
txt: plainTextGrammar,
|
|
9916
|
-
|
|
9917
|
-
/**
|
|
9918
|
-
* Creates a deep copy of the language with the given id and appends the given tokens.
|
|
9919
|
-
*
|
|
9920
|
-
* If a token in `redef` also appears in the copied language, then the existing token in the copied language
|
|
9921
|
-
* will be overwritten at its original position.
|
|
9922
|
-
*
|
|
9923
|
-
* ## Best practices
|
|
9924
|
-
*
|
|
9925
|
-
* Since the position of overwriting tokens (token in `redef` that overwrite tokens in the copied language)
|
|
9926
|
-
* doesn't matter, they can technically be in any order. However, this can be confusing to others that trying to
|
|
9927
|
-
* understand the language definition because, normally, the order of tokens matters in Prism grammars.
|
|
9928
|
-
*
|
|
9929
|
-
* Therefore, it is encouraged to order overwriting tokens according to the positions of the overwritten tokens.
|
|
9930
|
-
* Furthermore, all non-overwriting tokens should be placed after the overwriting ones.
|
|
9931
|
-
*
|
|
9932
|
-
* @param {string} id The id of the language to extend. This has to be a key in `Prism.languages`.
|
|
9933
|
-
* @param {Grammar} redef The new tokens to append.
|
|
9934
|
-
* @returns {Grammar} The new language created.
|
|
9935
|
-
* @public
|
|
9936
|
-
* @example
|
|
9937
|
-
* Prism.languages['css-with-colors'] = Prism.languages.extend('css', {
|
|
9938
|
-
* // Prism.languages.css already has a 'comment' token, so this token will overwrite CSS' 'comment' token
|
|
9939
|
-
* // at its original position
|
|
9940
|
-
* 'comment': { ... },
|
|
9941
|
-
* // CSS doesn't have a 'color' token, so this token will be appended
|
|
9942
|
-
* 'color': /\b(?:red|green|blue)\b/
|
|
9943
|
-
* });
|
|
9944
|
-
*/
|
|
9945
|
-
extend: function (id, redef) {
|
|
9946
|
-
var lang = _.util.clone(_.languages[id]);
|
|
9947
|
-
|
|
9948
|
-
for (var key in redef) {
|
|
9949
|
-
lang[key] = redef[key];
|
|
9950
|
-
}
|
|
9951
|
-
|
|
9952
|
-
return lang;
|
|
9953
|
-
},
|
|
9954
|
-
|
|
9955
|
-
/**
|
|
9956
|
-
* Inserts tokens _before_ another token in a language definition or any other grammar.
|
|
9957
|
-
*
|
|
9958
|
-
* ## Usage
|
|
9959
|
-
*
|
|
9960
|
-
* This helper method makes it easy to modify existing languages. For example, the CSS language definition
|
|
9961
|
-
* not only defines CSS highlighting for CSS documents, but also needs to define highlighting for CSS embedded
|
|
9962
|
-
* in HTML through `<style>` elements. To do this, it needs to modify `Prism.languages.markup` and add the
|
|
9963
|
-
* appropriate tokens. However, `Prism.languages.markup` is a regular JavaScript object literal, so if you do
|
|
9964
|
-
* this:
|
|
9965
|
-
*
|
|
9966
|
-
* ```js
|
|
9967
|
-
* Prism.languages.markup.style = {
|
|
9968
|
-
* // token
|
|
9969
|
-
* };
|
|
9970
|
-
* ```
|
|
9971
|
-
*
|
|
9972
|
-
* then the `style` token will be added (and processed) at the end. `insertBefore` allows you to insert tokens
|
|
9973
|
-
* before existing tokens. For the CSS example above, you would use it like this:
|
|
9974
|
-
*
|
|
9975
|
-
* ```js
|
|
9976
|
-
* Prism.languages.insertBefore('markup', 'cdata', {
|
|
9977
|
-
* 'style': {
|
|
9978
|
-
* // token
|
|
9979
|
-
* }
|
|
9980
|
-
* });
|
|
9981
|
-
* ```
|
|
9982
|
-
*
|
|
9983
|
-
* ## Special cases
|
|
9984
|
-
*
|
|
9985
|
-
* If the grammars of `inside` and `insert` have tokens with the same name, the tokens in `inside`'s grammar
|
|
9986
|
-
* will be ignored.
|
|
9987
|
-
*
|
|
9988
|
-
* This behavior can be used to insert tokens after `before`:
|
|
9989
|
-
*
|
|
9990
|
-
* ```js
|
|
9991
|
-
* Prism.languages.insertBefore('markup', 'comment', {
|
|
9992
|
-
* 'comment': Prism.languages.markup.comment,
|
|
9993
|
-
* // tokens after 'comment'
|
|
9994
|
-
* });
|
|
9995
|
-
* ```
|
|
9996
|
-
*
|
|
9997
|
-
* ## Limitations
|
|
9998
|
-
*
|
|
9999
|
-
* The main problem `insertBefore` has to solve is iteration order. Since ES2015, the iteration order for object
|
|
10000
|
-
* properties is guaranteed to be the insertion order (except for integer keys) but some browsers behave
|
|
10001
|
-
* differently when keys are deleted and re-inserted. So `insertBefore` can't be implemented by temporarily
|
|
10002
|
-
* deleting properties which is necessary to insert at arbitrary positions.
|
|
10003
|
-
*
|
|
10004
|
-
* To solve this problem, `insertBefore` doesn't actually insert the given tokens into the target object.
|
|
10005
|
-
* Instead, it will create a new object and replace all references to the target object with the new one. This
|
|
10006
|
-
* can be done without temporarily deleting properties, so the iteration order is well-defined.
|
|
10007
|
-
*
|
|
10008
|
-
* However, only references that can be reached from `Prism.languages` or `insert` will be replaced. I.e. if
|
|
10009
|
-
* you hold the target object in a variable, then the value of the variable will not change.
|
|
10010
|
-
*
|
|
10011
|
-
* ```js
|
|
10012
|
-
* var oldMarkup = Prism.languages.markup;
|
|
10013
|
-
* var newMarkup = Prism.languages.insertBefore('markup', 'comment', { ... });
|
|
10014
|
-
*
|
|
10015
|
-
* assert(oldMarkup !== Prism.languages.markup);
|
|
10016
|
-
* assert(newMarkup === Prism.languages.markup);
|
|
10017
|
-
* ```
|
|
10018
|
-
*
|
|
10019
|
-
* @param {string} inside The property of `root` (e.g. a language id in `Prism.languages`) that contains the
|
|
10020
|
-
* object to be modified.
|
|
10021
|
-
* @param {string} before The key to insert before.
|
|
10022
|
-
* @param {Grammar} insert An object containing the key-value pairs to be inserted.
|
|
10023
|
-
* @param {Object<string, any>} [root] The object containing `inside`, i.e. the object that contains the
|
|
10024
|
-
* object to be modified.
|
|
10025
|
-
*
|
|
10026
|
-
* Defaults to `Prism.languages`.
|
|
10027
|
-
* @returns {Grammar} The new grammar object.
|
|
10028
|
-
* @public
|
|
10029
|
-
*/
|
|
10030
|
-
insertBefore: function (inside, before, insert, root) {
|
|
10031
|
-
root = root || /** @type {any} */ (_.languages);
|
|
10032
|
-
var grammar = root[inside];
|
|
10033
|
-
/** @type {Grammar} */
|
|
10034
|
-
var ret = {};
|
|
10035
|
-
|
|
10036
|
-
for (var token in grammar) {
|
|
10037
|
-
if (grammar.hasOwnProperty(token)) {
|
|
10038
|
-
|
|
10039
|
-
if (token == before) {
|
|
10040
|
-
for (var newToken in insert) {
|
|
10041
|
-
if (insert.hasOwnProperty(newToken)) {
|
|
10042
|
-
ret[newToken] = insert[newToken];
|
|
10043
|
-
}
|
|
10044
|
-
}
|
|
10045
|
-
}
|
|
10046
|
-
|
|
10047
|
-
// Do not insert token which also occur in insert. See #1525
|
|
10048
|
-
if (!insert.hasOwnProperty(token)) {
|
|
10049
|
-
ret[token] = grammar[token];
|
|
10050
|
-
}
|
|
10051
|
-
}
|
|
10052
|
-
}
|
|
10053
|
-
|
|
10054
|
-
var old = root[inside];
|
|
10055
|
-
root[inside] = ret;
|
|
10056
|
-
|
|
10057
|
-
// Update references in other language definitions
|
|
10058
|
-
_.languages.DFS(_.languages, function (key, value) {
|
|
10059
|
-
if (value === old && key != inside) {
|
|
10060
|
-
this[key] = ret;
|
|
10061
|
-
}
|
|
10062
|
-
});
|
|
10063
|
-
|
|
10064
|
-
return ret;
|
|
10065
|
-
},
|
|
10066
|
-
|
|
10067
|
-
// Traverse a language definition with Depth First Search
|
|
10068
|
-
DFS: function DFS(o, callback, type, visited) {
|
|
10069
|
-
visited = visited || {};
|
|
10070
|
-
|
|
10071
|
-
var objId = _.util.objId;
|
|
10072
|
-
|
|
10073
|
-
for (var i in o) {
|
|
10074
|
-
if (o.hasOwnProperty(i)) {
|
|
10075
|
-
callback.call(o, i, o[i], type || i);
|
|
10076
|
-
|
|
10077
|
-
var property = o[i];
|
|
10078
|
-
var propertyType = _.util.type(property);
|
|
10079
|
-
|
|
10080
|
-
if (propertyType === 'Object' && !visited[objId(property)]) {
|
|
10081
|
-
visited[objId(property)] = true;
|
|
10082
|
-
DFS(property, callback, null, visited);
|
|
10083
|
-
} else if (propertyType === 'Array' && !visited[objId(property)]) {
|
|
10084
|
-
visited[objId(property)] = true;
|
|
10085
|
-
DFS(property, callback, i, visited);
|
|
10086
|
-
}
|
|
10087
|
-
}
|
|
10088
|
-
}
|
|
10089
|
-
}
|
|
10090
|
-
},
|
|
10091
|
-
|
|
10092
|
-
plugins: {},
|
|
10093
|
-
|
|
10094
|
-
/**
|
|
10095
|
-
* This is the most high-level function in Prism’s API.
|
|
10096
|
-
* It fetches all the elements that have a `.language-xxxx` class and then calls {@link Prism.highlightElement} on
|
|
10097
|
-
* each one of them.
|
|
10098
|
-
*
|
|
10099
|
-
* This is equivalent to `Prism.highlightAllUnder(document, async, callback)`.
|
|
10100
|
-
*
|
|
10101
|
-
* @param {boolean} [async=false] Same as in {@link Prism.highlightAllUnder}.
|
|
10102
|
-
* @param {HighlightCallback} [callback] Same as in {@link Prism.highlightAllUnder}.
|
|
10103
|
-
* @memberof Prism
|
|
10104
|
-
* @public
|
|
10105
|
-
*/
|
|
10106
|
-
highlightAll: function (async, callback) {
|
|
10107
|
-
_.highlightAllUnder(document, async, callback);
|
|
10108
|
-
},
|
|
10109
|
-
|
|
10110
|
-
/**
|
|
10111
|
-
* Fetches all the descendants of `container` that have a `.language-xxxx` class and then calls
|
|
10112
|
-
* {@link Prism.highlightElement} on each one of them.
|
|
10113
|
-
*
|
|
10114
|
-
* The following hooks will be run:
|
|
10115
|
-
* 1. `before-highlightall`
|
|
10116
|
-
* 2. `before-all-elements-highlight`
|
|
10117
|
-
* 3. All hooks of {@link Prism.highlightElement} for each element.
|
|
10118
|
-
*
|
|
10119
|
-
* @param {ParentNode} container The root element, whose descendants that have a `.language-xxxx` class will be highlighted.
|
|
10120
|
-
* @param {boolean} [async=false] Whether each element is to be highlighted asynchronously using Web Workers.
|
|
10121
|
-
* @param {HighlightCallback} [callback] An optional callback to be invoked on each element after its highlighting is done.
|
|
10122
|
-
* @memberof Prism
|
|
10123
|
-
* @public
|
|
10124
|
-
*/
|
|
10125
|
-
highlightAllUnder: function (container, async, callback) {
|
|
10126
|
-
var env = {
|
|
10127
|
-
callback: callback,
|
|
10128
|
-
container: container,
|
|
10129
|
-
selector: 'code[class*="language-"], [class*="language-"] code, code[class*="lang-"], [class*="lang-"] code'
|
|
10130
|
-
};
|
|
10131
|
-
|
|
10132
|
-
_.hooks.run('before-highlightall', env);
|
|
10133
|
-
|
|
10134
|
-
env.elements = Array.prototype.slice.apply(env.container.querySelectorAll(env.selector));
|
|
10135
|
-
|
|
10136
|
-
_.hooks.run('before-all-elements-highlight', env);
|
|
10137
|
-
|
|
10138
|
-
for (var i = 0, element; (element = env.elements[i++]);) {
|
|
10139
|
-
_.highlightElement(element, async === true, env.callback);
|
|
10140
|
-
}
|
|
10141
|
-
},
|
|
10142
|
-
|
|
10143
|
-
/**
|
|
10144
|
-
* Highlights the code inside a single element.
|
|
10145
|
-
*
|
|
10146
|
-
* The following hooks will be run:
|
|
10147
|
-
* 1. `before-sanity-check`
|
|
10148
|
-
* 2. `before-highlight`
|
|
10149
|
-
* 3. All hooks of {@link Prism.highlight}. These hooks will be run by an asynchronous worker if `async` is `true`.
|
|
10150
|
-
* 4. `before-insert`
|
|
10151
|
-
* 5. `after-highlight`
|
|
10152
|
-
* 6. `complete`
|
|
10153
|
-
*
|
|
10154
|
-
* Some the above hooks will be skipped if the element doesn't contain any text or there is no grammar loaded for
|
|
10155
|
-
* the element's language.
|
|
10156
|
-
*
|
|
10157
|
-
* @param {Element} element The element containing the code.
|
|
10158
|
-
* It must have a class of `language-xxxx` to be processed, where `xxxx` is a valid language identifier.
|
|
10159
|
-
* @param {boolean} [async=false] Whether the element is to be highlighted asynchronously using Web Workers
|
|
10160
|
-
* to improve performance and avoid blocking the UI when highlighting very large chunks of code. This option is
|
|
10161
|
-
* [disabled by default](https://prismjs.com/faq.html#why-is-asynchronous-highlighting-disabled-by-default).
|
|
10162
|
-
*
|
|
10163
|
-
* Note: All language definitions required to highlight the code must be included in the main `prism.js` file for
|
|
10164
|
-
* asynchronous highlighting to work. You can build your own bundle on the
|
|
10165
|
-
* [Download page](https://prismjs.com/download.html).
|
|
10166
|
-
* @param {HighlightCallback} [callback] An optional callback to be invoked after the highlighting is done.
|
|
10167
|
-
* Mostly useful when `async` is `true`, since in that case, the highlighting is done asynchronously.
|
|
10168
|
-
* @memberof Prism
|
|
10169
|
-
* @public
|
|
10170
|
-
*/
|
|
10171
|
-
highlightElement: function (element, async, callback) {
|
|
10172
|
-
// Find language
|
|
10173
|
-
var language = _.util.getLanguage(element);
|
|
10174
|
-
var grammar = _.languages[language];
|
|
10175
|
-
|
|
10176
|
-
// Set language on the element, if not present
|
|
10177
|
-
_.util.setLanguage(element, language);
|
|
10178
|
-
|
|
10179
|
-
// Set language on the parent, for styling
|
|
10180
|
-
var parent = element.parentElement;
|
|
10181
|
-
if (parent && parent.nodeName.toLowerCase() === 'pre') {
|
|
10182
|
-
_.util.setLanguage(parent, language);
|
|
10183
|
-
}
|
|
10184
|
-
|
|
10185
|
-
var code = element.textContent;
|
|
10186
|
-
|
|
10187
|
-
var env = {
|
|
10188
|
-
element: element,
|
|
10189
|
-
language: language,
|
|
10190
|
-
grammar: grammar,
|
|
10191
|
-
code: code
|
|
10192
|
-
};
|
|
10193
|
-
|
|
10194
|
-
function insertHighlightedCode(highlightedCode) {
|
|
10195
|
-
env.highlightedCode = highlightedCode;
|
|
10196
|
-
|
|
10197
|
-
_.hooks.run('before-insert', env);
|
|
10198
|
-
|
|
10199
|
-
env.element.innerHTML = env.highlightedCode;
|
|
10200
|
-
|
|
10201
|
-
_.hooks.run('after-highlight', env);
|
|
10202
|
-
_.hooks.run('complete', env);
|
|
10203
|
-
callback && callback.call(env.element);
|
|
10204
|
-
}
|
|
10205
|
-
|
|
10206
|
-
_.hooks.run('before-sanity-check', env);
|
|
10207
|
-
|
|
10208
|
-
// plugins may change/add the parent/element
|
|
10209
|
-
parent = env.element.parentElement;
|
|
10210
|
-
if (parent && parent.nodeName.toLowerCase() === 'pre' && !parent.hasAttribute('tabindex')) {
|
|
10211
|
-
parent.setAttribute('tabindex', '0');
|
|
10212
|
-
}
|
|
10213
|
-
|
|
10214
|
-
if (!env.code) {
|
|
10215
|
-
_.hooks.run('complete', env);
|
|
10216
|
-
callback && callback.call(env.element);
|
|
10217
|
-
return;
|
|
10218
|
-
}
|
|
10219
|
-
|
|
10220
|
-
_.hooks.run('before-highlight', env);
|
|
10221
|
-
|
|
10222
|
-
if (!env.grammar) {
|
|
10223
|
-
insertHighlightedCode(_.util.encode(env.code));
|
|
10224
|
-
return;
|
|
10225
|
-
}
|
|
10226
|
-
|
|
10227
|
-
if (async && _self.Worker) {
|
|
10228
|
-
var worker = new Worker(_.filename);
|
|
10229
|
-
|
|
10230
|
-
worker.onmessage = function (evt) {
|
|
10231
|
-
insertHighlightedCode(evt.data);
|
|
10232
|
-
};
|
|
10233
|
-
|
|
10234
|
-
worker.postMessage(JSON.stringify({
|
|
10235
|
-
language: env.language,
|
|
10236
|
-
code: env.code,
|
|
10237
|
-
immediateClose: true
|
|
10238
|
-
}));
|
|
10239
|
-
} else {
|
|
10240
|
-
insertHighlightedCode(_.highlight(env.code, env.grammar, env.language));
|
|
10241
|
-
}
|
|
10242
|
-
},
|
|
10243
|
-
|
|
10244
|
-
/**
|
|
10245
|
-
* Low-level function, only use if you know what you’re doing. It accepts a string of text as input
|
|
10246
|
-
* and the language definitions to use, and returns a string with the HTML produced.
|
|
10247
|
-
*
|
|
10248
|
-
* The following hooks will be run:
|
|
10249
|
-
* 1. `before-tokenize`
|
|
10250
|
-
* 2. `after-tokenize`
|
|
10251
|
-
* 3. `wrap`: On each {@link Token}.
|
|
10252
|
-
*
|
|
10253
|
-
* @param {string} text A string with the code to be highlighted.
|
|
10254
|
-
* @param {Grammar} grammar An object containing the tokens to use.
|
|
10255
|
-
*
|
|
10256
|
-
* Usually a language definition like `Prism.languages.markup`.
|
|
10257
|
-
* @param {string} language The name of the language definition passed to `grammar`.
|
|
10258
|
-
* @returns {string} The highlighted HTML.
|
|
10259
|
-
* @memberof Prism
|
|
10260
|
-
* @public
|
|
10261
|
-
* @example
|
|
10262
|
-
* Prism.highlight('var foo = true;', Prism.languages.javascript, 'javascript');
|
|
10263
|
-
*/
|
|
10264
|
-
highlight: function (text, grammar, language) {
|
|
10265
|
-
var env = {
|
|
10266
|
-
code: text,
|
|
10267
|
-
grammar: grammar,
|
|
10268
|
-
language: language
|
|
10269
|
-
};
|
|
10270
|
-
_.hooks.run('before-tokenize', env);
|
|
10271
|
-
if (!env.grammar) {
|
|
10272
|
-
throw new Error('The language "' + env.language + '" has no grammar.');
|
|
10273
|
-
}
|
|
10274
|
-
env.tokens = _.tokenize(env.code, env.grammar);
|
|
10275
|
-
_.hooks.run('after-tokenize', env);
|
|
10276
|
-
return Token.stringify(_.util.encode(env.tokens), env.language);
|
|
10277
|
-
},
|
|
10278
|
-
|
|
10279
|
-
/**
|
|
10280
|
-
* This is the heart of Prism, and the most low-level function you can use. It accepts a string of text as input
|
|
10281
|
-
* and the language definitions to use, and returns an array with the tokenized code.
|
|
10282
|
-
*
|
|
10283
|
-
* When the language definition includes nested tokens, the function is called recursively on each of these tokens.
|
|
10284
|
-
*
|
|
10285
|
-
* This method could be useful in other contexts as well, as a very crude parser.
|
|
10286
|
-
*
|
|
10287
|
-
* @param {string} text A string with the code to be highlighted.
|
|
10288
|
-
* @param {Grammar} grammar An object containing the tokens to use.
|
|
10289
|
-
*
|
|
10290
|
-
* Usually a language definition like `Prism.languages.markup`.
|
|
10291
|
-
* @returns {TokenStream} An array of strings and tokens, a token stream.
|
|
10292
|
-
* @memberof Prism
|
|
10293
|
-
* @public
|
|
10294
|
-
* @example
|
|
10295
|
-
* let code = `var foo = 0;`;
|
|
10296
|
-
* let tokens = Prism.tokenize(code, Prism.languages.javascript);
|
|
10297
|
-
* tokens.forEach(token => {
|
|
10298
|
-
* if (token instanceof Prism.Token && token.type === 'number') {
|
|
10299
|
-
* console.log(`Found numeric literal: ${token.content}`);
|
|
10300
|
-
* }
|
|
10301
|
-
* });
|
|
10302
|
-
*/
|
|
10303
|
-
tokenize: function (text, grammar) {
|
|
10304
|
-
var rest = grammar.rest;
|
|
10305
|
-
if (rest) {
|
|
10306
|
-
for (var token in rest) {
|
|
10307
|
-
grammar[token] = rest[token];
|
|
10308
|
-
}
|
|
10309
|
-
|
|
10310
|
-
delete grammar.rest;
|
|
10311
|
-
}
|
|
10312
|
-
|
|
10313
|
-
var tokenList = new LinkedList();
|
|
10314
|
-
addAfter(tokenList, tokenList.head, text);
|
|
10315
|
-
|
|
10316
|
-
matchGrammar(text, tokenList, grammar, tokenList.head, 0);
|
|
10317
|
-
|
|
10318
|
-
return toArray(tokenList);
|
|
10319
|
-
},
|
|
10320
|
-
|
|
10321
|
-
/**
|
|
10322
|
-
* @namespace
|
|
10323
|
-
* @memberof Prism
|
|
10324
|
-
* @public
|
|
10325
|
-
*/
|
|
10326
|
-
hooks: {
|
|
10327
|
-
all: {},
|
|
10328
|
-
|
|
10329
|
-
/**
|
|
10330
|
-
* Adds the given callback to the list of callbacks for the given hook.
|
|
10331
|
-
*
|
|
10332
|
-
* The callback will be invoked when the hook it is registered for is run.
|
|
10333
|
-
* Hooks are usually directly run by a highlight function but you can also run hooks yourself.
|
|
10334
|
-
*
|
|
10335
|
-
* One callback function can be registered to multiple hooks and the same hook multiple times.
|
|
10336
|
-
*
|
|
10337
|
-
* @param {string} name The name of the hook.
|
|
10338
|
-
* @param {HookCallback} callback The callback function which is given environment variables.
|
|
10339
|
-
* @public
|
|
10340
|
-
*/
|
|
10341
|
-
add: function (name, callback) {
|
|
10342
|
-
var hooks = _.hooks.all;
|
|
10343
|
-
|
|
10344
|
-
hooks[name] = hooks[name] || [];
|
|
10345
|
-
|
|
10346
|
-
hooks[name].push(callback);
|
|
10347
|
-
},
|
|
10348
|
-
|
|
10349
|
-
/**
|
|
10350
|
-
* Runs a hook invoking all registered callbacks with the given environment variables.
|
|
10351
|
-
*
|
|
10352
|
-
* Callbacks will be invoked synchronously and in the order in which they were registered.
|
|
10353
|
-
*
|
|
10354
|
-
* @param {string} name The name of the hook.
|
|
10355
|
-
* @param {Object<string, any>} env The environment variables of the hook passed to all callbacks registered.
|
|
10356
|
-
* @public
|
|
10357
|
-
*/
|
|
10358
|
-
run: function (name, env) {
|
|
10359
|
-
var callbacks = _.hooks.all[name];
|
|
10360
|
-
|
|
10361
|
-
if (!callbacks || !callbacks.length) {
|
|
10362
|
-
return;
|
|
10363
|
-
}
|
|
10364
|
-
|
|
10365
|
-
for (var i = 0, callback; (callback = callbacks[i++]);) {
|
|
10366
|
-
callback(env);
|
|
10367
|
-
}
|
|
10368
|
-
}
|
|
10369
|
-
},
|
|
10370
|
-
|
|
10371
|
-
Token: Token
|
|
10372
|
-
};
|
|
10373
|
-
_self.Prism = _;
|
|
10374
|
-
|
|
10375
|
-
|
|
10376
|
-
// Typescript note:
|
|
10377
|
-
// The following can be used to import the Token type in JSDoc:
|
|
10378
|
-
//
|
|
10379
|
-
// @typedef {InstanceType<import("./prism-core")["Token"]>} Token
|
|
10380
|
-
|
|
10381
|
-
/**
|
|
10382
|
-
* Creates a new token.
|
|
10383
|
-
*
|
|
10384
|
-
* @param {string} type See {@link Token#type type}
|
|
10385
|
-
* @param {string | TokenStream} content See {@link Token#content content}
|
|
10386
|
-
* @param {string|string[]} [alias] The alias(es) of the token.
|
|
10387
|
-
* @param {string} [matchedStr=""] A copy of the full string this token was created from.
|
|
10388
|
-
* @class
|
|
10389
|
-
* @global
|
|
10390
|
-
* @public
|
|
10391
|
-
*/
|
|
10392
|
-
function Token(type, content, alias, matchedStr) {
|
|
10393
|
-
/**
|
|
10394
|
-
* The type of the token.
|
|
10395
|
-
*
|
|
10396
|
-
* This is usually the key of a pattern in a {@link Grammar}.
|
|
10397
|
-
*
|
|
10398
|
-
* @type {string}
|
|
10399
|
-
* @see GrammarToken
|
|
10400
|
-
* @public
|
|
10401
|
-
*/
|
|
10402
|
-
this.type = type;
|
|
10403
|
-
/**
|
|
10404
|
-
* The strings or tokens contained by this token.
|
|
10405
|
-
*
|
|
10406
|
-
* This will be a token stream if the pattern matched also defined an `inside` grammar.
|
|
10407
|
-
*
|
|
10408
|
-
* @type {string | TokenStream}
|
|
10409
|
-
* @public
|
|
10410
|
-
*/
|
|
10411
|
-
this.content = content;
|
|
10412
|
-
/**
|
|
10413
|
-
* The alias(es) of the token.
|
|
10414
|
-
*
|
|
10415
|
-
* @type {string|string[]}
|
|
10416
|
-
* @see GrammarToken
|
|
10417
|
-
* @public
|
|
10418
|
-
*/
|
|
10419
|
-
this.alias = alias;
|
|
10420
|
-
// Copy of the full string this token was created from
|
|
10421
|
-
this.length = (matchedStr || '').length | 0;
|
|
10422
|
-
}
|
|
10423
|
-
|
|
10424
|
-
/**
|
|
10425
|
-
* A token stream is an array of strings and {@link Token Token} objects.
|
|
10426
|
-
*
|
|
10427
|
-
* Token streams have to fulfill a few properties that are assumed by most functions (mostly internal ones) that process
|
|
10428
|
-
* them.
|
|
10429
|
-
*
|
|
10430
|
-
* 1. No adjacent strings.
|
|
10431
|
-
* 2. No empty strings.
|
|
10432
|
-
*
|
|
10433
|
-
* The only exception here is the token stream that only contains the empty string and nothing else.
|
|
10434
|
-
*
|
|
10435
|
-
* @typedef {Array<string | Token>} TokenStream
|
|
10436
|
-
* @global
|
|
10437
|
-
* @public
|
|
10438
|
-
*/
|
|
10439
|
-
|
|
10440
|
-
/**
|
|
10441
|
-
* Converts the given token or token stream to an HTML representation.
|
|
10442
|
-
*
|
|
10443
|
-
* The following hooks will be run:
|
|
10444
|
-
* 1. `wrap`: On each {@link Token}.
|
|
10445
|
-
*
|
|
10446
|
-
* @param {string | Token | TokenStream} o The token or token stream to be converted.
|
|
10447
|
-
* @param {string} language The name of current language.
|
|
10448
|
-
* @returns {string} The HTML representation of the token or token stream.
|
|
10449
|
-
* @memberof Token
|
|
10450
|
-
* @static
|
|
10451
|
-
*/
|
|
10452
|
-
Token.stringify = function stringify(o, language) {
|
|
10453
|
-
if (typeof o == 'string') {
|
|
10454
|
-
return o;
|
|
10455
|
-
}
|
|
10456
|
-
if (Array.isArray(o)) {
|
|
10457
|
-
var s = '';
|
|
10458
|
-
o.forEach(function (e) {
|
|
10459
|
-
s += stringify(e, language);
|
|
10460
|
-
});
|
|
10461
|
-
return s;
|
|
10462
|
-
}
|
|
10463
|
-
|
|
10464
|
-
var env = {
|
|
10465
|
-
type: o.type,
|
|
10466
|
-
content: stringify(o.content, language),
|
|
10467
|
-
tag: 'span',
|
|
10468
|
-
classes: ['token', o.type],
|
|
10469
|
-
attributes: {},
|
|
10470
|
-
language: language
|
|
10471
|
-
};
|
|
10472
|
-
|
|
10473
|
-
var aliases = o.alias;
|
|
10474
|
-
if (aliases) {
|
|
10475
|
-
if (Array.isArray(aliases)) {
|
|
10476
|
-
Array.prototype.push.apply(env.classes, aliases);
|
|
10477
|
-
} else {
|
|
10478
|
-
env.classes.push(aliases);
|
|
10479
|
-
}
|
|
10480
|
-
}
|
|
10481
|
-
|
|
10482
|
-
_.hooks.run('wrap', env);
|
|
10483
|
-
|
|
10484
|
-
var attributes = '';
|
|
10485
|
-
for (var name in env.attributes) {
|
|
10486
|
-
attributes += ' ' + name + '="' + (env.attributes[name] || '').replace(/"/g, '"') + '"';
|
|
10487
|
-
}
|
|
10488
|
-
|
|
10489
|
-
return '<' + env.tag + ' class="' + env.classes.join(' ') + '"' + attributes + '>' + env.content + '</' + env.tag + '>';
|
|
10490
|
-
};
|
|
10491
|
-
|
|
10492
|
-
/**
|
|
10493
|
-
* @param {RegExp} pattern
|
|
10494
|
-
* @param {number} pos
|
|
10495
|
-
* @param {string} text
|
|
10496
|
-
* @param {boolean} lookbehind
|
|
10497
|
-
* @returns {RegExpExecArray | null}
|
|
10498
|
-
*/
|
|
10499
|
-
function matchPattern(pattern, pos, text, lookbehind) {
|
|
10500
|
-
pattern.lastIndex = pos;
|
|
10501
|
-
var match = pattern.exec(text);
|
|
10502
|
-
if (match && lookbehind && match[1]) {
|
|
10503
|
-
// change the match to remove the text matched by the Prism lookbehind group
|
|
10504
|
-
var lookbehindLength = match[1].length;
|
|
10505
|
-
match.index += lookbehindLength;
|
|
10506
|
-
match[0] = match[0].slice(lookbehindLength);
|
|
10507
|
-
}
|
|
10508
|
-
return match;
|
|
10509
|
-
}
|
|
10510
|
-
|
|
10511
|
-
/**
|
|
10512
|
-
* @param {string} text
|
|
10513
|
-
* @param {LinkedList<string | Token>} tokenList
|
|
10514
|
-
* @param {any} grammar
|
|
10515
|
-
* @param {LinkedListNode<string | Token>} startNode
|
|
10516
|
-
* @param {number} startPos
|
|
10517
|
-
* @param {RematchOptions} [rematch]
|
|
10518
|
-
* @returns {void}
|
|
10519
|
-
* @private
|
|
10520
|
-
*
|
|
10521
|
-
* @typedef RematchOptions
|
|
10522
|
-
* @property {string} cause
|
|
10523
|
-
* @property {number} reach
|
|
10524
|
-
*/
|
|
10525
|
-
function matchGrammar(text, tokenList, grammar, startNode, startPos, rematch) {
|
|
10526
|
-
for (var token in grammar) {
|
|
10527
|
-
if (!grammar.hasOwnProperty(token) || !grammar[token]) {
|
|
10528
|
-
continue;
|
|
10529
|
-
}
|
|
10530
|
-
|
|
10531
|
-
var patterns = grammar[token];
|
|
10532
|
-
patterns = Array.isArray(patterns) ? patterns : [patterns];
|
|
10533
|
-
|
|
10534
|
-
for (var j = 0; j < patterns.length; ++j) {
|
|
10535
|
-
if (rematch && rematch.cause == token + ',' + j) {
|
|
10536
|
-
return;
|
|
10537
|
-
}
|
|
10538
|
-
|
|
10539
|
-
var patternObj = patterns[j];
|
|
10540
|
-
var inside = patternObj.inside;
|
|
10541
|
-
var lookbehind = !!patternObj.lookbehind;
|
|
10542
|
-
var greedy = !!patternObj.greedy;
|
|
10543
|
-
var alias = patternObj.alias;
|
|
10544
|
-
|
|
10545
|
-
if (greedy && !patternObj.pattern.global) {
|
|
10546
|
-
// Without the global flag, lastIndex won't work
|
|
10547
|
-
var flags = patternObj.pattern.toString().match(/[imsuy]*$/)[0];
|
|
10548
|
-
patternObj.pattern = RegExp(patternObj.pattern.source, flags + 'g');
|
|
10549
|
-
}
|
|
10550
|
-
|
|
10551
|
-
/** @type {RegExp} */
|
|
10552
|
-
var pattern = patternObj.pattern || patternObj;
|
|
10553
|
-
|
|
10554
|
-
for ( // iterate the token list and keep track of the current token/string position
|
|
10555
|
-
var currentNode = startNode.next, pos = startPos;
|
|
10556
|
-
currentNode !== tokenList.tail;
|
|
10557
|
-
pos += currentNode.value.length, currentNode = currentNode.next
|
|
10558
|
-
) {
|
|
10559
|
-
|
|
10560
|
-
if (rematch && pos >= rematch.reach) {
|
|
10561
|
-
break;
|
|
10562
|
-
}
|
|
10563
|
-
|
|
10564
|
-
var str = currentNode.value;
|
|
10565
|
-
|
|
10566
|
-
if (tokenList.length > text.length) {
|
|
10567
|
-
// Something went terribly wrong, ABORT, ABORT!
|
|
10568
|
-
return;
|
|
10569
|
-
}
|
|
10570
|
-
|
|
10571
|
-
if (str instanceof Token) {
|
|
10572
|
-
continue;
|
|
10573
|
-
}
|
|
10574
|
-
|
|
10575
|
-
var removeCount = 1; // this is the to parameter of removeBetween
|
|
10576
|
-
var match;
|
|
10577
|
-
|
|
10578
|
-
if (greedy) {
|
|
10579
|
-
match = matchPattern(pattern, pos, text, lookbehind);
|
|
10580
|
-
if (!match || match.index >= text.length) {
|
|
10581
|
-
break;
|
|
10582
|
-
}
|
|
10583
|
-
|
|
10584
|
-
var from = match.index;
|
|
10585
|
-
var to = match.index + match[0].length;
|
|
10586
|
-
var p = pos;
|
|
10587
|
-
|
|
10588
|
-
// find the node that contains the match
|
|
10589
|
-
p += currentNode.value.length;
|
|
10590
|
-
while (from >= p) {
|
|
10591
|
-
currentNode = currentNode.next;
|
|
10592
|
-
p += currentNode.value.length;
|
|
10593
|
-
}
|
|
10594
|
-
// adjust pos (and p)
|
|
10595
|
-
p -= currentNode.value.length;
|
|
10596
|
-
pos = p;
|
|
10597
|
-
|
|
10598
|
-
// the current node is a Token, then the match starts inside another Token, which is invalid
|
|
10599
|
-
if (currentNode.value instanceof Token) {
|
|
10600
|
-
continue;
|
|
10601
|
-
}
|
|
10602
|
-
|
|
10603
|
-
// find the last node which is affected by this match
|
|
10604
|
-
for (
|
|
10605
|
-
var k = currentNode;
|
|
10606
|
-
k !== tokenList.tail && (p < to || typeof k.value === 'string');
|
|
10607
|
-
k = k.next
|
|
10608
|
-
) {
|
|
10609
|
-
removeCount++;
|
|
10610
|
-
p += k.value.length;
|
|
10611
|
-
}
|
|
10612
|
-
removeCount--;
|
|
10613
|
-
|
|
10614
|
-
// replace with the new match
|
|
10615
|
-
str = text.slice(pos, p);
|
|
10616
|
-
match.index -= pos;
|
|
10617
|
-
} else {
|
|
10618
|
-
match = matchPattern(pattern, 0, str, lookbehind);
|
|
10619
|
-
if (!match) {
|
|
10620
|
-
continue;
|
|
10621
|
-
}
|
|
10622
|
-
}
|
|
10623
|
-
|
|
10624
|
-
// eslint-disable-next-line no-redeclare
|
|
10625
|
-
var from = match.index;
|
|
10626
|
-
var matchStr = match[0];
|
|
10627
|
-
var before = str.slice(0, from);
|
|
10628
|
-
var after = str.slice(from + matchStr.length);
|
|
10629
|
-
|
|
10630
|
-
var reach = pos + str.length;
|
|
10631
|
-
if (rematch && reach > rematch.reach) {
|
|
10632
|
-
rematch.reach = reach;
|
|
10633
|
-
}
|
|
10634
|
-
|
|
10635
|
-
var removeFrom = currentNode.prev;
|
|
10636
|
-
|
|
10637
|
-
if (before) {
|
|
10638
|
-
removeFrom = addAfter(tokenList, removeFrom, before);
|
|
10639
|
-
pos += before.length;
|
|
10640
|
-
}
|
|
10641
|
-
|
|
10642
|
-
removeRange(tokenList, removeFrom, removeCount);
|
|
10643
|
-
|
|
10644
|
-
var wrapped = new Token(token, inside ? _.tokenize(matchStr, inside) : matchStr, alias, matchStr);
|
|
10645
|
-
currentNode = addAfter(tokenList, removeFrom, wrapped);
|
|
10646
|
-
|
|
10647
|
-
if (after) {
|
|
10648
|
-
addAfter(tokenList, currentNode, after);
|
|
10649
|
-
}
|
|
10650
|
-
|
|
10651
|
-
if (removeCount > 1) {
|
|
10652
|
-
// at least one Token object was removed, so we have to do some rematching
|
|
10653
|
-
// this can only happen if the current pattern is greedy
|
|
10654
|
-
|
|
10655
|
-
/** @type {RematchOptions} */
|
|
10656
|
-
var nestedRematch = {
|
|
10657
|
-
cause: token + ',' + j,
|
|
10658
|
-
reach: reach
|
|
10659
|
-
};
|
|
10660
|
-
matchGrammar(text, tokenList, grammar, currentNode.prev, pos, nestedRematch);
|
|
10661
|
-
|
|
10662
|
-
// the reach might have been extended because of the rematching
|
|
10663
|
-
if (rematch && nestedRematch.reach > rematch.reach) {
|
|
10664
|
-
rematch.reach = nestedRematch.reach;
|
|
10665
|
-
}
|
|
10666
|
-
}
|
|
10667
|
-
}
|
|
10668
|
-
}
|
|
10669
|
-
}
|
|
10670
|
-
}
|
|
10671
|
-
|
|
10672
|
-
/**
|
|
10673
|
-
* @typedef LinkedListNode
|
|
10674
|
-
* @property {T} value
|
|
10675
|
-
* @property {LinkedListNode<T> | null} prev The previous node.
|
|
10676
|
-
* @property {LinkedListNode<T> | null} next The next node.
|
|
10677
|
-
* @template T
|
|
10678
|
-
* @private
|
|
10679
|
-
*/
|
|
10680
|
-
|
|
10681
|
-
/**
|
|
10682
|
-
* @template T
|
|
10683
|
-
* @private
|
|
10684
|
-
*/
|
|
10685
|
-
function LinkedList() {
|
|
10686
|
-
/** @type {LinkedListNode<T>} */
|
|
10687
|
-
var head = { value: null, prev: null, next: null };
|
|
10688
|
-
/** @type {LinkedListNode<T>} */
|
|
10689
|
-
var tail = { value: null, prev: head, next: null };
|
|
10690
|
-
head.next = tail;
|
|
10691
|
-
|
|
10692
|
-
/** @type {LinkedListNode<T>} */
|
|
10693
|
-
this.head = head;
|
|
10694
|
-
/** @type {LinkedListNode<T>} */
|
|
10695
|
-
this.tail = tail;
|
|
10696
|
-
this.length = 0;
|
|
10697
|
-
}
|
|
10698
|
-
|
|
10699
|
-
/**
|
|
10700
|
-
* Adds a new node with the given value to the list.
|
|
10701
|
-
*
|
|
10702
|
-
* @param {LinkedList<T>} list
|
|
10703
|
-
* @param {LinkedListNode<T>} node
|
|
10704
|
-
* @param {T} value
|
|
10705
|
-
* @returns {LinkedListNode<T>} The added node.
|
|
10706
|
-
* @template T
|
|
10707
|
-
*/
|
|
10708
|
-
function addAfter(list, node, value) {
|
|
10709
|
-
// assumes that node != list.tail && values.length >= 0
|
|
10710
|
-
var next = node.next;
|
|
10711
|
-
|
|
10712
|
-
var newNode = { value: value, prev: node, next: next };
|
|
10713
|
-
node.next = newNode;
|
|
10714
|
-
next.prev = newNode;
|
|
10715
|
-
list.length++;
|
|
10716
|
-
|
|
10717
|
-
return newNode;
|
|
10718
|
-
}
|
|
10719
|
-
/**
|
|
10720
|
-
* Removes `count` nodes after the given node. The given node will not be removed.
|
|
10721
|
-
*
|
|
10722
|
-
* @param {LinkedList<T>} list
|
|
10723
|
-
* @param {LinkedListNode<T>} node
|
|
10724
|
-
* @param {number} count
|
|
10725
|
-
* @template T
|
|
10726
|
-
*/
|
|
10727
|
-
function removeRange(list, node, count) {
|
|
10728
|
-
var next = node.next;
|
|
10729
|
-
for (var i = 0; i < count && next !== list.tail; i++) {
|
|
10730
|
-
next = next.next;
|
|
10731
|
-
}
|
|
10732
|
-
node.next = next;
|
|
10733
|
-
next.prev = node;
|
|
10734
|
-
list.length -= i;
|
|
10735
|
-
}
|
|
10736
|
-
/**
|
|
10737
|
-
* @param {LinkedList<T>} list
|
|
10738
|
-
* @returns {T[]}
|
|
10739
|
-
* @template T
|
|
10740
|
-
*/
|
|
10741
|
-
function toArray(list) {
|
|
10742
|
-
var array = [];
|
|
10743
|
-
var node = list.head.next;
|
|
10744
|
-
while (node !== list.tail) {
|
|
10745
|
-
array.push(node.value);
|
|
10746
|
-
node = node.next;
|
|
10747
|
-
}
|
|
10748
|
-
return array;
|
|
10749
|
-
}
|
|
10750
|
-
|
|
10751
|
-
|
|
10752
|
-
if (!_self.document) {
|
|
10753
|
-
if (!_self.addEventListener) {
|
|
10754
|
-
// in Node.js
|
|
10755
|
-
return _;
|
|
10756
|
-
}
|
|
10757
|
-
|
|
10758
|
-
if (!_.disableWorkerMessageHandler) {
|
|
10759
|
-
// In worker
|
|
10760
|
-
_self.addEventListener('message', function (evt) {
|
|
10761
|
-
var message = JSON.parse(evt.data);
|
|
10762
|
-
var lang = message.language;
|
|
10763
|
-
var code = message.code;
|
|
10764
|
-
var immediateClose = message.immediateClose;
|
|
10765
|
-
|
|
10766
|
-
_self.postMessage(_.highlight(code, _.languages[lang], lang));
|
|
10767
|
-
if (immediateClose) {
|
|
10768
|
-
_self.close();
|
|
10769
|
-
}
|
|
10770
|
-
}, false);
|
|
10771
|
-
}
|
|
10772
|
-
|
|
10773
|
-
return _;
|
|
10774
|
-
}
|
|
10775
|
-
|
|
10776
|
-
// Get current script and highlight
|
|
10777
|
-
var script = _.util.currentScript();
|
|
10778
|
-
|
|
10779
|
-
if (script) {
|
|
10780
|
-
_.filename = script.src;
|
|
10781
|
-
|
|
10782
|
-
if (script.hasAttribute('data-manual')) {
|
|
10783
|
-
_.manual = true;
|
|
10784
|
-
}
|
|
10785
|
-
}
|
|
10786
|
-
|
|
10787
|
-
function highlightAutomaticallyCallback() {
|
|
10788
|
-
if (!_.manual) {
|
|
10789
|
-
_.highlightAll();
|
|
10790
|
-
}
|
|
10791
|
-
}
|
|
10792
|
-
|
|
10793
|
-
if (!_.manual) {
|
|
10794
|
-
// If the document state is "loading", then we'll use DOMContentLoaded.
|
|
10795
|
-
// If the document state is "interactive" and the prism.js script is deferred, then we'll also use the
|
|
10796
|
-
// DOMContentLoaded event because there might be some plugins or languages which have also been deferred and they
|
|
10797
|
-
// might take longer one animation frame to execute which can create a race condition where only some plugins have
|
|
10798
|
-
// been loaded when Prism.highlightAll() is executed, depending on how fast resources are loaded.
|
|
10799
|
-
// See https://github.com/PrismJS/prism/issues/2102
|
|
10800
|
-
var readyState = document.readyState;
|
|
10801
|
-
if (readyState === 'loading' || readyState === 'interactive' && script && script.defer) {
|
|
10802
|
-
document.addEventListener('DOMContentLoaded', highlightAutomaticallyCallback);
|
|
10803
|
-
} else {
|
|
10804
|
-
if (window.requestAnimationFrame) {
|
|
10805
|
-
window.requestAnimationFrame(highlightAutomaticallyCallback);
|
|
10806
|
-
} else {
|
|
10807
|
-
window.setTimeout(highlightAutomaticallyCallback, 16);
|
|
10808
|
-
}
|
|
10809
|
-
}
|
|
10810
|
-
}
|
|
10811
|
-
|
|
10812
|
-
return _;
|
|
10813
|
-
|
|
10814
|
-
}(_self));
|
|
10815
|
-
|
|
10816
|
-
if ( true && module.exports) {
|
|
10817
|
-
module.exports = Prism;
|
|
10818
|
-
}
|
|
10819
|
-
|
|
10820
|
-
// hack for components to work correctly in node.js
|
|
10821
|
-
if (typeof __webpack_require__.g !== 'undefined') {
|
|
10822
|
-
__webpack_require__.g.Prism = Prism;
|
|
10823
|
-
}
|
|
10824
|
-
|
|
10825
|
-
// some additional documentation/types
|
|
10826
|
-
|
|
10827
|
-
/**
|
|
10828
|
-
* The expansion of a simple `RegExp` literal to support additional properties.
|
|
10829
|
-
*
|
|
10830
|
-
* @typedef GrammarToken
|
|
10831
|
-
* @property {RegExp} pattern The regular expression of the token.
|
|
10832
|
-
* @property {boolean} [lookbehind=false] If `true`, then the first capturing group of `pattern` will (effectively)
|
|
10833
|
-
* behave as a lookbehind group meaning that the captured text will not be part of the matched text of the new token.
|
|
10834
|
-
* @property {boolean} [greedy=false] Whether the token is greedy.
|
|
10835
|
-
* @property {string|string[]} [alias] An optional alias or list of aliases.
|
|
10836
|
-
* @property {Grammar} [inside] The nested grammar of this token.
|
|
10837
|
-
*
|
|
10838
|
-
* The `inside` grammar will be used to tokenize the text value of each token of this kind.
|
|
10839
|
-
*
|
|
10840
|
-
* This can be used to make nested and even recursive language definitions.
|
|
10841
|
-
*
|
|
10842
|
-
* Note: This can cause infinite recursion. Be careful when you embed different languages or even the same language into
|
|
10843
|
-
* each another.
|
|
10844
|
-
* @global
|
|
10845
|
-
* @public
|
|
10846
|
-
*/
|
|
10847
|
-
|
|
10848
|
-
/**
|
|
10849
|
-
* @typedef Grammar
|
|
10850
|
-
* @type {Object<string, RegExp | GrammarToken | Array<RegExp | GrammarToken>>}
|
|
10851
|
-
* @property {Grammar} [rest] An optional grammar object that will be appended to this grammar.
|
|
10852
|
-
* @global
|
|
10853
|
-
* @public
|
|
10854
|
-
*/
|
|
10855
|
-
|
|
10856
|
-
/**
|
|
10857
|
-
* A function which will invoked after an element was successfully highlighted.
|
|
10858
|
-
*
|
|
10859
|
-
* @callback HighlightCallback
|
|
10860
|
-
* @param {Element} element The element successfully highlighted.
|
|
10861
|
-
* @returns {void}
|
|
10862
|
-
* @global
|
|
10863
|
-
* @public
|
|
10864
|
-
*/
|
|
10865
|
-
|
|
10866
|
-
/**
|
|
10867
|
-
* @callback HookCallback
|
|
10868
|
-
* @param {Object<string, any>} env The environment variables of the hook.
|
|
10869
|
-
* @returns {void}
|
|
10870
|
-
* @global
|
|
10871
|
-
* @public
|
|
10872
|
-
*/
|
|
10873
|
-
|
|
10874
|
-
|
|
10875
9507
|
/***/ }),
|
|
10876
9508
|
|
|
10877
9509
|
/***/ 59:
|
|
@@ -10999,7 +9631,7 @@ module.exports = ReactPropTypesSecret;
|
|
|
10999
9631
|
* This source code is licensed under the MIT license found in the
|
|
11000
9632
|
* LICENSE file in the root directory of this source tree.
|
|
11001
9633
|
*/
|
|
11002
|
-
var b=Symbol.for("react.element"),c=Symbol.for("react.portal"),d=Symbol.for("react.fragment"),e=Symbol.for("react.strict_mode"),f=Symbol.for("react.profiler"),g=Symbol.for("react.provider"),h=Symbol.for("react.context"),k=Symbol.for("react.server_context"),l=Symbol.for("react.forward_ref"),m=Symbol.for("react.suspense"),n=Symbol.for("react.suspense_list"),p=Symbol.for("react.memo"),q=Symbol.for("react.lazy"),t=Symbol.for("react.offscreen"),u=Symbol.for("react.module.reference");
|
|
9634
|
+
var b=Symbol.for("react.element"),c=Symbol.for("react.portal"),d=Symbol.for("react.fragment"),e=Symbol.for("react.strict_mode"),f=Symbol.for("react.profiler"),g=Symbol.for("react.provider"),h=Symbol.for("react.context"),k=Symbol.for("react.server_context"),l=Symbol.for("react.forward_ref"),m=Symbol.for("react.suspense"),n=Symbol.for("react.suspense_list"),p=Symbol.for("react.memo"),q=Symbol.for("react.lazy"),t=Symbol.for("react.offscreen"),u;u=Symbol.for("react.module.reference");
|
|
11003
9635
|
function v(a){if("object"===typeof a&&null!==a){var r=a.$$typeof;switch(r){case b:switch(a=a.type,a){case d:case f:case e:case m:case n:return a;default:switch(a=a&&a.$$typeof,a){case k:case h:case l:case q:case p:case g:return a;default:return r}}case c:return r}}}exports.ContextConsumer=h;exports.ContextProvider=g;exports.Element=b;exports.ForwardRef=l;exports.Fragment=d;exports.Lazy=q;exports.Memo=p;exports.Portal=c;exports.Profiler=f;exports.StrictMode=e;exports.Suspense=m;
|
|
11004
9636
|
exports.SuspenseList=n;exports.isAsyncMode=function(){return!1};exports.isConcurrentMode=function(){return!1};exports.isContextConsumer=function(a){return v(a)===h};exports.isContextProvider=function(a){return v(a)===g};exports.isElement=function(a){return"object"===typeof a&&null!==a&&a.$$typeof===b};exports.isForwardRef=function(a){return v(a)===l};exports.isFragment=function(a){return v(a)===d};exports.isLazy=function(a){return v(a)===q};exports.isMemo=function(a){return v(a)===p};
|
|
11005
9637
|
exports.isPortal=function(a){return v(a)===c};exports.isProfiler=function(a){return v(a)===f};exports.isStrictMode=function(a){return v(a)===e};exports.isSuspense=function(a){return v(a)===m};exports.isSuspenseList=function(a){return v(a)===n};
|
|
@@ -11026,7 +9658,8 @@ if (true) {
|
|
|
11026
9658
|
|
|
11027
9659
|
"use strict";
|
|
11028
9660
|
var __webpack_unused_export__;
|
|
11029
|
-
/**
|
|
9661
|
+
/**
|
|
9662
|
+
* @license React
|
|
11030
9663
|
* react-jsx-runtime.production.min.js
|
|
11031
9664
|
*
|
|
11032
9665
|
* Copyright (c) Facebook, Inc. and its affiliates.
|
|
@@ -11034,8 +9667,8 @@ var __webpack_unused_export__;
|
|
|
11034
9667
|
* This source code is licensed under the MIT license found in the
|
|
11035
9668
|
* LICENSE file in the root directory of this source tree.
|
|
11036
9669
|
*/
|
|
11037
|
-
|
|
11038
|
-
function q(c,a,
|
|
9670
|
+
var f=__webpack_require__(787),k=Symbol.for("react.element"),l=Symbol.for("react.fragment"),m=Object.prototype.hasOwnProperty,n=f.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED.ReactCurrentOwner,p={key:!0,ref:!0,__self:!0,__source:!0};
|
|
9671
|
+
function q(c,a,g){var b,d={},e=null,h=null;void 0!==g&&(e=""+g);void 0!==a.key&&(e=""+a.key);void 0!==a.ref&&(h=a.ref);for(b in a)m.call(a,b)&&!p.hasOwnProperty(b)&&(d[b]=a[b]);if(c&&c.defaultProps)for(b in a=c.defaultProps,a)void 0===d[b]&&(d[b]=a[b]);return{$$typeof:k,type:c,key:e,ref:h,props:d,_owner:n.current}}__webpack_unused_export__=l;exports.jsx=q;exports.jsxs=q;
|
|
11039
9672
|
|
|
11040
9673
|
|
|
11041
9674
|
/***/ }),
|
|
@@ -11161,18 +9794,6 @@ module.exports = __WEBPACK_EXTERNAL_MODULE__787__;
|
|
|
11161
9794
|
/******/ };
|
|
11162
9795
|
/******/ })();
|
|
11163
9796
|
/******/
|
|
11164
|
-
/******/ /* webpack/runtime/global */
|
|
11165
|
-
/******/ (() => {
|
|
11166
|
-
/******/ __webpack_require__.g = (function() {
|
|
11167
|
-
/******/ if (typeof globalThis === 'object') return globalThis;
|
|
11168
|
-
/******/ try {
|
|
11169
|
-
/******/ return this || new Function('return this')();
|
|
11170
|
-
/******/ } catch (e) {
|
|
11171
|
-
/******/ if (typeof window === 'object') return window;
|
|
11172
|
-
/******/ }
|
|
11173
|
-
/******/ })();
|
|
11174
|
-
/******/ })();
|
|
11175
|
-
/******/
|
|
11176
9797
|
/******/ /* webpack/runtime/hasOwnProperty shorthand */
|
|
11177
9798
|
/******/ (() => {
|
|
11178
9799
|
/******/ __webpack_require__.o = (obj, prop) => (Object.prototype.hasOwnProperty.call(obj, prop))
|
|
@@ -25882,14 +24503,38 @@ ReactMarkdown.propTypes = {
|
|
|
25882
24503
|
prop_types.oneOfType([
|
|
25883
24504
|
prop_types.object,
|
|
25884
24505
|
prop_types.func,
|
|
25885
|
-
prop_types.arrayOf(
|
|
24506
|
+
prop_types.arrayOf(
|
|
24507
|
+
prop_types.oneOfType([
|
|
24508
|
+
prop_types.bool,
|
|
24509
|
+
prop_types.string,
|
|
24510
|
+
prop_types.object,
|
|
24511
|
+
prop_types.func,
|
|
24512
|
+
prop_types.arrayOf(
|
|
24513
|
+
// prettier-ignore
|
|
24514
|
+
// type-coverage:ignore-next-line
|
|
24515
|
+
prop_types.any
|
|
24516
|
+
)
|
|
24517
|
+
])
|
|
24518
|
+
)
|
|
25886
24519
|
])
|
|
25887
24520
|
),
|
|
25888
24521
|
rehypePlugins: prop_types.arrayOf(
|
|
25889
24522
|
prop_types.oneOfType([
|
|
25890
24523
|
prop_types.object,
|
|
25891
24524
|
prop_types.func,
|
|
25892
|
-
prop_types.arrayOf(
|
|
24525
|
+
prop_types.arrayOf(
|
|
24526
|
+
prop_types.oneOfType([
|
|
24527
|
+
prop_types.bool,
|
|
24528
|
+
prop_types.string,
|
|
24529
|
+
prop_types.object,
|
|
24530
|
+
prop_types.func,
|
|
24531
|
+
prop_types.arrayOf(
|
|
24532
|
+
// prettier-ignore
|
|
24533
|
+
// type-coverage:ignore-next-line
|
|
24534
|
+
prop_types.any
|
|
24535
|
+
)
|
|
24536
|
+
])
|
|
24537
|
+
)
|
|
25893
24538
|
])
|
|
25894
24539
|
),
|
|
25895
24540
|
// Transform options:
|
|
@@ -34591,11 +33236,14 @@ function java(Prism) {
|
|
|
34591
33236
|
Prism.register(clike)
|
|
34592
33237
|
;(function (Prism) {
|
|
34593
33238
|
var keywords =
|
|
34594
|
-
/\b(?:abstract|assert|boolean|break|byte|case|catch|char|class|const|continue|default|do|double|else|enum|exports|extends|final|finally|float|for|goto|if|implements|import|instanceof|int|interface|long|module|native|new|non-sealed|null|open|opens|package|permits|private|protected|provides|public|record|requires|return|sealed|short|static|strictfp|super|switch|synchronized|this|throw|throws|to|transient|transitive|try|uses|var|void|volatile|while|with|yield)\b/ // full package (optional) + parent classes (optional)
|
|
34595
|
-
var classNamePrefix = /(
|
|
34596
|
-
.source // based on the java naming conventions
|
|
33239
|
+
/\b(?:abstract|assert|boolean|break|byte|case|catch|char|class|const|continue|default|do|double|else|enum|exports|extends|final|finally|float|for|goto|if|implements|import|instanceof|int|interface|long|module|native|new|non-sealed|null|open|opens|package|permits|private|protected|provides|public|record(?!\s*[(){}[\]<>=%~.:,;?+\-*/&|^])|requires|return|sealed|short|static|strictfp|super|switch|synchronized|this|throw|throws|to|transient|transitive|try|uses|var|void|volatile|while|with|yield)\b/ // full package (optional) + parent classes (optional)
|
|
33240
|
+
var classNamePrefix = /(?:[a-z]\w*\s*\.\s*)*(?:[A-Z]\w*\s*\.\s*)*/.source // based on the java naming conventions
|
|
34597
33241
|
var className = {
|
|
34598
|
-
pattern: RegExp(
|
|
33242
|
+
pattern: RegExp(
|
|
33243
|
+
/(^|[^\w.])/.source +
|
|
33244
|
+
classNamePrefix +
|
|
33245
|
+
/[A-Z](?:[\d_A-Z]*[a-z]\w*)?\b/.source
|
|
33246
|
+
),
|
|
34599
33247
|
lookbehind: true,
|
|
34600
33248
|
inside: {
|
|
34601
33249
|
namespace: {
|
|
@@ -34616,10 +33264,25 @@ function java(Prism) {
|
|
|
34616
33264
|
'class-name': [
|
|
34617
33265
|
className,
|
|
34618
33266
|
{
|
|
34619
|
-
// variables and
|
|
33267
|
+
// variables, parameters, and constructor references
|
|
34620
33268
|
// this to support class names (or generic parameters) which do not contain a lower case letter (also works for methods)
|
|
34621
33269
|
pattern: RegExp(
|
|
34622
|
-
|
|
33270
|
+
/(^|[^\w.])/.source +
|
|
33271
|
+
classNamePrefix +
|
|
33272
|
+
/[A-Z]\w*(?=\s+\w+\s*[;,=()]|\s*(?:\[[\s,]*\]\s*)?::\s*new\b)/
|
|
33273
|
+
.source
|
|
33274
|
+
),
|
|
33275
|
+
lookbehind: true,
|
|
33276
|
+
inside: className.inside
|
|
33277
|
+
},
|
|
33278
|
+
{
|
|
33279
|
+
// class names based on keyword
|
|
33280
|
+
// this to support class names (or generic parameters) which do not contain a lower case letter (also works for methods)
|
|
33281
|
+
pattern: RegExp(
|
|
33282
|
+
/(\b(?:class|enum|extends|implements|instanceof|interface|new|record|throws)\s+)/
|
|
33283
|
+
.source +
|
|
33284
|
+
classNamePrefix +
|
|
33285
|
+
/[A-Z]\w*\b/.source
|
|
34623
33286
|
),
|
|
34624
33287
|
lookbehind: true,
|
|
34625
33288
|
inside: className.inside
|
|
@@ -34669,6 +33332,38 @@ function java(Prism) {
|
|
|
34669
33332
|
operator: /[?&|]/
|
|
34670
33333
|
}
|
|
34671
33334
|
},
|
|
33335
|
+
import: [
|
|
33336
|
+
{
|
|
33337
|
+
pattern: RegExp(
|
|
33338
|
+
/(\bimport\s+)/.source +
|
|
33339
|
+
classNamePrefix +
|
|
33340
|
+
/(?:[A-Z]\w*|\*)(?=\s*;)/.source
|
|
33341
|
+
),
|
|
33342
|
+
lookbehind: true,
|
|
33343
|
+
inside: {
|
|
33344
|
+
namespace: className.inside.namespace,
|
|
33345
|
+
punctuation: /\./,
|
|
33346
|
+
operator: /\*/,
|
|
33347
|
+
'class-name': /\w+/
|
|
33348
|
+
}
|
|
33349
|
+
},
|
|
33350
|
+
{
|
|
33351
|
+
pattern: RegExp(
|
|
33352
|
+
/(\bimport\s+static\s+)/.source +
|
|
33353
|
+
classNamePrefix +
|
|
33354
|
+
/(?:\w+|\*)(?=\s*;)/.source
|
|
33355
|
+
),
|
|
33356
|
+
lookbehind: true,
|
|
33357
|
+
alias: 'static',
|
|
33358
|
+
inside: {
|
|
33359
|
+
namespace: className.inside.namespace,
|
|
33360
|
+
static: /\b\w+$/,
|
|
33361
|
+
punctuation: /\./,
|
|
33362
|
+
operator: /\*/,
|
|
33363
|
+
'class-name': /\w+/
|
|
33364
|
+
}
|
|
33365
|
+
}
|
|
33366
|
+
],
|
|
34672
33367
|
namespace: {
|
|
34673
33368
|
pattern: RegExp(
|
|
34674
33369
|
/(\b(?:exports|import(?:\s+static)?|module|open|opens|package|provides|requires|to|transitive|uses|with)\s+)(?!<keyword>)[a-z]\w*(?:\.[a-z]\w*)*\.?/.source.replace(
|
|
@@ -34855,9 +33550,24 @@ function javascript(Prism) {
|
|
|
34855
33550
|
/(\b(?:class|extends|implements|instanceof|interface|new)\s+)[\w.\\]+/
|
|
34856
33551
|
Prism.languages.insertBefore('javascript', 'keyword', {
|
|
34857
33552
|
regex: {
|
|
34858
|
-
|
|
34859
|
-
|
|
34860
|
-
/
|
|
33553
|
+
pattern: RegExp(
|
|
33554
|
+
// lookbehind
|
|
33555
|
+
// eslint-disable-next-line regexp/no-dupe-characters-character-class
|
|
33556
|
+
/((?:^|[^$\w\xA0-\uFFFF."'\])\s]|\b(?:return|yield))\s*)/.source + // Regex pattern:
|
|
33557
|
+
// There are 2 regex patterns here. The RegExp set notation proposal added support for nested character
|
|
33558
|
+
// classes if the `v` flag is present. Unfortunately, nested CCs are both context-free and incompatible
|
|
33559
|
+
// with the only syntax, so we have to define 2 different regex patterns.
|
|
33560
|
+
/\//.source +
|
|
33561
|
+
'(?:' +
|
|
33562
|
+
/(?:\[(?:[^\]\\\r\n]|\\.)*\]|\\.|[^/\\\[\r\n])+\/[dgimyus]{0,7}/
|
|
33563
|
+
.source +
|
|
33564
|
+
'|' + // `v` flag syntax. This supports 3 levels of nested character classes.
|
|
33565
|
+
/(?:\[(?:[^[\]\\\r\n]|\\.|\[(?:[^[\]\\\r\n]|\\.|\[(?:[^[\]\\\r\n]|\\.)*\])*\])*\]|\\.|[^/\\\[\r\n])+\/[dgimyus]{0,7}v[dgimyus]{0,7}/
|
|
33566
|
+
.source +
|
|
33567
|
+
')' + // lookahead
|
|
33568
|
+
/(?=(?:\s|\/\*(?:[^*]|\*(?!\/))*\*\/)*(?:$|[\r\n,.;:})\]]|\/\/))/
|
|
33569
|
+
.source
|
|
33570
|
+
),
|
|
34861
33571
|
lookbehind: true,
|
|
34862
33572
|
greedy: true,
|
|
34863
33573
|
inside: {
|
|
@@ -36161,7 +34871,7 @@ function php(Prism) {
|
|
|
36161
34871
|
},
|
|
36162
34872
|
{
|
|
36163
34873
|
pattern:
|
|
36164
|
-
/(\)\s*:\s*(?:\?\s*)?)\b(?:array(?!\s*\()|bool|callable|(?:false|null)(?=\s*\|)|float|int|iterable|mixed|object|self|static|string|void)\b/i,
|
|
34874
|
+
/(\)\s*:\s*(?:\?\s*)?)\b(?:array(?!\s*\()|bool|callable|(?:false|null)(?=\s*\|)|float|int|iterable|mixed|never|object|self|static|string|void)\b/i,
|
|
36165
34875
|
alias: 'return-type',
|
|
36166
34876
|
greedy: true,
|
|
36167
34877
|
lookbehind: true
|
|
@@ -36195,12 +34905,12 @@ function php(Prism) {
|
|
|
36195
34905
|
// keywords cannot be preceded by "->"
|
|
36196
34906
|
// the complex lookbehind means `(?<!(?:->|::)\s*)`
|
|
36197
34907
|
pattern:
|
|
36198
|
-
/((?:^|[^\s>:]|(?:^|[^-])>|(?:^|[^:]):)\s*)\b(?:abstract|and|array|as|break|callable|case|catch|clone|const|continue|declare|default|die|do|echo|else|elseif|empty|enddeclare|endfor|endforeach|endif|endswitch|endwhile|enum|eval|exit|extends|final|finally|fn|for|foreach|function|global|goto|if|implements|include|include_once|instanceof|insteadof|interface|isset|list|match|namespace|new|or|parent|print|private|protected|public|require|require_once|return|self|static|switch|throw|trait|try|unset|use|var|while|xor|yield|__halt_compiler)\b/i,
|
|
34908
|
+
/((?:^|[^\s>:]|(?:^|[^-])>|(?:^|[^:]):)\s*)\b(?:abstract|and|array|as|break|callable|case|catch|clone|const|continue|declare|default|die|do|echo|else|elseif|empty|enddeclare|endfor|endforeach|endif|endswitch|endwhile|enum|eval|exit|extends|final|finally|fn|for|foreach|function|global|goto|if|implements|include|include_once|instanceof|insteadof|interface|isset|list|match|namespace|never|new|or|parent|print|private|protected|public|readonly|require|require_once|return|self|static|switch|throw|trait|try|unset|use|var|while|xor|yield|__halt_compiler)\b/i,
|
|
36199
34909
|
lookbehind: true
|
|
36200
34910
|
}
|
|
36201
34911
|
],
|
|
36202
34912
|
'argument-name': {
|
|
36203
|
-
pattern: /([(,]\s
|
|
34913
|
+
pattern: /([(,]\s*)\b[a-z_]\w*(?=\s*:(?!:))/i,
|
|
36204
34914
|
lookbehind: true
|
|
36205
34915
|
},
|
|
36206
34916
|
'class-name': [
|
|
@@ -38000,8 +36710,823 @@ function disallowed(code) {
|
|
|
38000
36710
|
)
|
|
38001
36711
|
}
|
|
38002
36712
|
|
|
38003
|
-
|
|
38004
|
-
|
|
36713
|
+
;// CONCATENATED MODULE: ./node_modules/refractor/lib/prism-core.js
|
|
36714
|
+
// @ts-nocheck
|
|
36715
|
+
|
|
36716
|
+
// This is a slimmed down version of `prism-core.js`, to remove globals,
|
|
36717
|
+
// document, workers, `util.encode`, `Token.stringify`
|
|
36718
|
+
|
|
36719
|
+
// Private helper vars
|
|
36720
|
+
var lang = /(?:^|\s)lang(?:uage)?-([\w-]+)(?=\s|$)/i
|
|
36721
|
+
var uniqueId = 0
|
|
36722
|
+
|
|
36723
|
+
// The grammar object for plaintext
|
|
36724
|
+
var plainTextGrammar = {}
|
|
36725
|
+
|
|
36726
|
+
var _ = {
|
|
36727
|
+
/**
|
|
36728
|
+
* A namespace for utility methods.
|
|
36729
|
+
*
|
|
36730
|
+
* All function in this namespace that are not explicitly marked as _public_ are for __internal use only__ and may
|
|
36731
|
+
* change or disappear at any time.
|
|
36732
|
+
*
|
|
36733
|
+
* @namespace
|
|
36734
|
+
* @memberof Prism
|
|
36735
|
+
*/
|
|
36736
|
+
util: {
|
|
36737
|
+
/**
|
|
36738
|
+
* Returns the name of the type of the given value.
|
|
36739
|
+
*
|
|
36740
|
+
* @param {any} o
|
|
36741
|
+
* @returns {string}
|
|
36742
|
+
* @example
|
|
36743
|
+
* type(null) === 'Null'
|
|
36744
|
+
* type(undefined) === 'Undefined'
|
|
36745
|
+
* type(123) === 'Number'
|
|
36746
|
+
* type('foo') === 'String'
|
|
36747
|
+
* type(true) === 'Boolean'
|
|
36748
|
+
* type([1, 2]) === 'Array'
|
|
36749
|
+
* type({}) === 'Object'
|
|
36750
|
+
* type(String) === 'Function'
|
|
36751
|
+
* type(/abc+/) === 'RegExp'
|
|
36752
|
+
*/
|
|
36753
|
+
type: function (o) {
|
|
36754
|
+
return Object.prototype.toString.call(o).slice(8, -1)
|
|
36755
|
+
},
|
|
36756
|
+
|
|
36757
|
+
/**
|
|
36758
|
+
* Returns a unique number for the given object. Later calls will still return the same number.
|
|
36759
|
+
*
|
|
36760
|
+
* @param {Object} obj
|
|
36761
|
+
* @returns {number}
|
|
36762
|
+
*/
|
|
36763
|
+
objId: function (obj) {
|
|
36764
|
+
if (!obj['__id']) {
|
|
36765
|
+
Object.defineProperty(obj, '__id', {value: ++uniqueId})
|
|
36766
|
+
}
|
|
36767
|
+
return obj['__id']
|
|
36768
|
+
},
|
|
36769
|
+
|
|
36770
|
+
/**
|
|
36771
|
+
* Creates a deep clone of the given object.
|
|
36772
|
+
*
|
|
36773
|
+
* The main intended use of this function is to clone language definitions.
|
|
36774
|
+
*
|
|
36775
|
+
* @param {T} o
|
|
36776
|
+
* @param {Record<number, any>} [visited]
|
|
36777
|
+
* @returns {T}
|
|
36778
|
+
* @template T
|
|
36779
|
+
*/
|
|
36780
|
+
clone: function deepClone(o, visited) {
|
|
36781
|
+
visited = visited || {}
|
|
36782
|
+
|
|
36783
|
+
var clone
|
|
36784
|
+
var id
|
|
36785
|
+
switch (_.util.type(o)) {
|
|
36786
|
+
case 'Object':
|
|
36787
|
+
id = _.util.objId(o)
|
|
36788
|
+
if (visited[id]) {
|
|
36789
|
+
return visited[id]
|
|
36790
|
+
}
|
|
36791
|
+
clone = /** @type {Record<string, any>} */ ({})
|
|
36792
|
+
visited[id] = clone
|
|
36793
|
+
|
|
36794
|
+
for (var key in o) {
|
|
36795
|
+
if (o.hasOwnProperty(key)) {
|
|
36796
|
+
clone[key] = deepClone(o[key], visited)
|
|
36797
|
+
}
|
|
36798
|
+
}
|
|
36799
|
+
|
|
36800
|
+
return /** @type {any} */ (clone)
|
|
36801
|
+
|
|
36802
|
+
case 'Array':
|
|
36803
|
+
id = _.util.objId(o)
|
|
36804
|
+
if (visited[id]) {
|
|
36805
|
+
return visited[id]
|
|
36806
|
+
}
|
|
36807
|
+
clone = []
|
|
36808
|
+
visited[id] = clone
|
|
36809
|
+
|
|
36810
|
+
o.forEach(function (v, i) {
|
|
36811
|
+
clone[i] = deepClone(v, visited)
|
|
36812
|
+
})
|
|
36813
|
+
|
|
36814
|
+
return /** @type {any} */ (clone)
|
|
36815
|
+
|
|
36816
|
+
default:
|
|
36817
|
+
return o
|
|
36818
|
+
}
|
|
36819
|
+
}
|
|
36820
|
+
},
|
|
36821
|
+
|
|
36822
|
+
/**
|
|
36823
|
+
* This namespace contains all currently loaded languages and the some helper functions to create and modify languages.
|
|
36824
|
+
*
|
|
36825
|
+
* @namespace
|
|
36826
|
+
* @memberof Prism
|
|
36827
|
+
* @public
|
|
36828
|
+
*/
|
|
36829
|
+
languages: {
|
|
36830
|
+
/**
|
|
36831
|
+
* The grammar for plain, unformatted text.
|
|
36832
|
+
*/
|
|
36833
|
+
plain: plainTextGrammar,
|
|
36834
|
+
plaintext: plainTextGrammar,
|
|
36835
|
+
text: plainTextGrammar,
|
|
36836
|
+
txt: plainTextGrammar,
|
|
36837
|
+
|
|
36838
|
+
/**
|
|
36839
|
+
* Creates a deep copy of the language with the given id and appends the given tokens.
|
|
36840
|
+
*
|
|
36841
|
+
* If a token in `redef` also appears in the copied language, then the existing token in the copied language
|
|
36842
|
+
* will be overwritten at its original position.
|
|
36843
|
+
*
|
|
36844
|
+
* ## Best practices
|
|
36845
|
+
*
|
|
36846
|
+
* Since the position of overwriting tokens (token in `redef` that overwrite tokens in the copied language)
|
|
36847
|
+
* doesn't matter, they can technically be in any order. However, this can be confusing to others that trying to
|
|
36848
|
+
* understand the language definition because, normally, the order of tokens matters in Prism grammars.
|
|
36849
|
+
*
|
|
36850
|
+
* Therefore, it is encouraged to order overwriting tokens according to the positions of the overwritten tokens.
|
|
36851
|
+
* Furthermore, all non-overwriting tokens should be placed after the overwriting ones.
|
|
36852
|
+
*
|
|
36853
|
+
* @param {string} id The id of the language to extend. This has to be a key in `Prism.languages`.
|
|
36854
|
+
* @param {Grammar} redef The new tokens to append.
|
|
36855
|
+
* @returns {Grammar} The new language created.
|
|
36856
|
+
* @public
|
|
36857
|
+
* @example
|
|
36858
|
+
* Prism.languages['css-with-colors'] = Prism.languages.extend('css', {
|
|
36859
|
+
* // Prism.languages.css already has a 'comment' token, so this token will overwrite CSS' 'comment' token
|
|
36860
|
+
* // at its original position
|
|
36861
|
+
* 'comment': { ... },
|
|
36862
|
+
* // CSS doesn't have a 'color' token, so this token will be appended
|
|
36863
|
+
* 'color': /\b(?:red|green|blue)\b/
|
|
36864
|
+
* });
|
|
36865
|
+
*/
|
|
36866
|
+
extend: function (id, redef) {
|
|
36867
|
+
var lang = _.util.clone(_.languages[id])
|
|
36868
|
+
|
|
36869
|
+
for (var key in redef) {
|
|
36870
|
+
lang[key] = redef[key]
|
|
36871
|
+
}
|
|
36872
|
+
|
|
36873
|
+
return lang
|
|
36874
|
+
},
|
|
36875
|
+
|
|
36876
|
+
/**
|
|
36877
|
+
* Inserts tokens _before_ another token in a language definition or any other grammar.
|
|
36878
|
+
*
|
|
36879
|
+
* ## Usage
|
|
36880
|
+
*
|
|
36881
|
+
* This helper method makes it easy to modify existing languages. For example, the CSS language definition
|
|
36882
|
+
* not only defines CSS highlighting for CSS documents, but also needs to define highlighting for CSS embedded
|
|
36883
|
+
* in HTML through `<style>` elements. To do this, it needs to modify `Prism.languages.markup` and add the
|
|
36884
|
+
* appropriate tokens. However, `Prism.languages.markup` is a regular JavaScript object literal, so if you do
|
|
36885
|
+
* this:
|
|
36886
|
+
*
|
|
36887
|
+
* ```js
|
|
36888
|
+
* Prism.languages.markup.style = {
|
|
36889
|
+
* // token
|
|
36890
|
+
* };
|
|
36891
|
+
* ```
|
|
36892
|
+
*
|
|
36893
|
+
* then the `style` token will be added (and processed) at the end. `insertBefore` allows you to insert tokens
|
|
36894
|
+
* before existing tokens. For the CSS example above, you would use it like this:
|
|
36895
|
+
*
|
|
36896
|
+
* ```js
|
|
36897
|
+
* Prism.languages.insertBefore('markup', 'cdata', {
|
|
36898
|
+
* 'style': {
|
|
36899
|
+
* // token
|
|
36900
|
+
* }
|
|
36901
|
+
* });
|
|
36902
|
+
* ```
|
|
36903
|
+
*
|
|
36904
|
+
* ## Special cases
|
|
36905
|
+
*
|
|
36906
|
+
* If the grammars of `inside` and `insert` have tokens with the same name, the tokens in `inside`'s grammar
|
|
36907
|
+
* will be ignored.
|
|
36908
|
+
*
|
|
36909
|
+
* This behavior can be used to insert tokens after `before`:
|
|
36910
|
+
*
|
|
36911
|
+
* ```js
|
|
36912
|
+
* Prism.languages.insertBefore('markup', 'comment', {
|
|
36913
|
+
* 'comment': Prism.languages.markup.comment,
|
|
36914
|
+
* // tokens after 'comment'
|
|
36915
|
+
* });
|
|
36916
|
+
* ```
|
|
36917
|
+
*
|
|
36918
|
+
* ## Limitations
|
|
36919
|
+
*
|
|
36920
|
+
* The main problem `insertBefore` has to solve is iteration order. Since ES2015, the iteration order for object
|
|
36921
|
+
* properties is guaranteed to be the insertion order (except for integer keys) but some browsers behave
|
|
36922
|
+
* differently when keys are deleted and re-inserted. So `insertBefore` can't be implemented by temporarily
|
|
36923
|
+
* deleting properties which is necessary to insert at arbitrary positions.
|
|
36924
|
+
*
|
|
36925
|
+
* To solve this problem, `insertBefore` doesn't actually insert the given tokens into the target object.
|
|
36926
|
+
* Instead, it will create a new object and replace all references to the target object with the new one. This
|
|
36927
|
+
* can be done without temporarily deleting properties, so the iteration order is well-defined.
|
|
36928
|
+
*
|
|
36929
|
+
* However, only references that can be reached from `Prism.languages` or `insert` will be replaced. I.e. if
|
|
36930
|
+
* you hold the target object in a variable, then the value of the variable will not change.
|
|
36931
|
+
*
|
|
36932
|
+
* ```js
|
|
36933
|
+
* var oldMarkup = Prism.languages.markup;
|
|
36934
|
+
* var newMarkup = Prism.languages.insertBefore('markup', 'comment', { ... });
|
|
36935
|
+
*
|
|
36936
|
+
* assert(oldMarkup !== Prism.languages.markup);
|
|
36937
|
+
* assert(newMarkup === Prism.languages.markup);
|
|
36938
|
+
* ```
|
|
36939
|
+
*
|
|
36940
|
+
* @param {string} inside The property of `root` (e.g. a language id in `Prism.languages`) that contains the
|
|
36941
|
+
* object to be modified.
|
|
36942
|
+
* @param {string} before The key to insert before.
|
|
36943
|
+
* @param {Grammar} insert An object containing the key-value pairs to be inserted.
|
|
36944
|
+
* @param {Object<string, any>} [root] The object containing `inside`, i.e. the object that contains the
|
|
36945
|
+
* object to be modified.
|
|
36946
|
+
*
|
|
36947
|
+
* Defaults to `Prism.languages`.
|
|
36948
|
+
* @returns {Grammar} The new grammar object.
|
|
36949
|
+
* @public
|
|
36950
|
+
*/
|
|
36951
|
+
insertBefore: function (inside, before, insert, root) {
|
|
36952
|
+
root = root || /** @type {any} */ (_.languages)
|
|
36953
|
+
var grammar = root[inside]
|
|
36954
|
+
/** @type {Grammar} */
|
|
36955
|
+
var ret = {}
|
|
36956
|
+
|
|
36957
|
+
for (var token in grammar) {
|
|
36958
|
+
if (grammar.hasOwnProperty(token)) {
|
|
36959
|
+
if (token == before) {
|
|
36960
|
+
for (var newToken in insert) {
|
|
36961
|
+
if (insert.hasOwnProperty(newToken)) {
|
|
36962
|
+
ret[newToken] = insert[newToken]
|
|
36963
|
+
}
|
|
36964
|
+
}
|
|
36965
|
+
}
|
|
36966
|
+
|
|
36967
|
+
// Do not insert token which also occur in insert. See #1525
|
|
36968
|
+
if (!insert.hasOwnProperty(token)) {
|
|
36969
|
+
ret[token] = grammar[token]
|
|
36970
|
+
}
|
|
36971
|
+
}
|
|
36972
|
+
}
|
|
36973
|
+
|
|
36974
|
+
var old = root[inside]
|
|
36975
|
+
root[inside] = ret
|
|
36976
|
+
|
|
36977
|
+
// Update references in other language definitions
|
|
36978
|
+
_.languages.DFS(_.languages, function (key, value) {
|
|
36979
|
+
if (value === old && key != inside) {
|
|
36980
|
+
this[key] = ret
|
|
36981
|
+
}
|
|
36982
|
+
})
|
|
36983
|
+
|
|
36984
|
+
return ret
|
|
36985
|
+
},
|
|
36986
|
+
|
|
36987
|
+
// Traverse a language definition with Depth First Search
|
|
36988
|
+
DFS: function DFS(o, callback, type, visited) {
|
|
36989
|
+
visited = visited || {}
|
|
36990
|
+
|
|
36991
|
+
var objId = _.util.objId
|
|
36992
|
+
|
|
36993
|
+
for (var i in o) {
|
|
36994
|
+
if (o.hasOwnProperty(i)) {
|
|
36995
|
+
callback.call(o, i, o[i], type || i)
|
|
36996
|
+
|
|
36997
|
+
var property = o[i]
|
|
36998
|
+
var propertyType = _.util.type(property)
|
|
36999
|
+
|
|
37000
|
+
if (propertyType === 'Object' && !visited[objId(property)]) {
|
|
37001
|
+
visited[objId(property)] = true
|
|
37002
|
+
DFS(property, callback, null, visited)
|
|
37003
|
+
} else if (propertyType === 'Array' && !visited[objId(property)]) {
|
|
37004
|
+
visited[objId(property)] = true
|
|
37005
|
+
DFS(property, callback, i, visited)
|
|
37006
|
+
}
|
|
37007
|
+
}
|
|
37008
|
+
}
|
|
37009
|
+
}
|
|
37010
|
+
},
|
|
37011
|
+
|
|
37012
|
+
plugins: {},
|
|
37013
|
+
|
|
37014
|
+
/**
|
|
37015
|
+
* Low-level function, only use if you know what you’re doing. It accepts a string of text as input
|
|
37016
|
+
* and the language definitions to use, and returns a string with the HTML produced.
|
|
37017
|
+
*
|
|
37018
|
+
* The following hooks will be run:
|
|
37019
|
+
* 1. `before-tokenize`
|
|
37020
|
+
* 2. `after-tokenize`
|
|
37021
|
+
* 3. `wrap`: On each {@link Token}.
|
|
37022
|
+
*
|
|
37023
|
+
* @param {string} text A string with the code to be highlighted.
|
|
37024
|
+
* @param {Grammar} grammar An object containing the tokens to use.
|
|
37025
|
+
*
|
|
37026
|
+
* Usually a language definition like `Prism.languages.markup`.
|
|
37027
|
+
* @param {string} language The name of the language definition passed to `grammar`.
|
|
37028
|
+
* @returns {string} The highlighted HTML.
|
|
37029
|
+
* @memberof Prism
|
|
37030
|
+
* @public
|
|
37031
|
+
* @example
|
|
37032
|
+
* Prism.highlight('var foo = true;', Prism.languages.javascript, 'javascript');
|
|
37033
|
+
*/
|
|
37034
|
+
highlight: function (text, grammar, language) {
|
|
37035
|
+
var env = {
|
|
37036
|
+
code: text,
|
|
37037
|
+
grammar: grammar,
|
|
37038
|
+
language: language
|
|
37039
|
+
}
|
|
37040
|
+
_.hooks.run('before-tokenize', env)
|
|
37041
|
+
if (!env.grammar) {
|
|
37042
|
+
throw new Error('The language "' + env.language + '" has no grammar.')
|
|
37043
|
+
}
|
|
37044
|
+
env.tokens = _.tokenize(env.code, env.grammar)
|
|
37045
|
+
_.hooks.run('after-tokenize', env)
|
|
37046
|
+
return Token.stringify(_.util.encode(env.tokens), env.language)
|
|
37047
|
+
},
|
|
37048
|
+
|
|
37049
|
+
/**
|
|
37050
|
+
* This is the heart of Prism, and the most low-level function you can use. It accepts a string of text as input
|
|
37051
|
+
* and the language definitions to use, and returns an array with the tokenized code.
|
|
37052
|
+
*
|
|
37053
|
+
* When the language definition includes nested tokens, the function is called recursively on each of these tokens.
|
|
37054
|
+
*
|
|
37055
|
+
* This method could be useful in other contexts as well, as a very crude parser.
|
|
37056
|
+
*
|
|
37057
|
+
* @param {string} text A string with the code to be highlighted.
|
|
37058
|
+
* @param {Grammar} grammar An object containing the tokens to use.
|
|
37059
|
+
*
|
|
37060
|
+
* Usually a language definition like `Prism.languages.markup`.
|
|
37061
|
+
* @returns {TokenStream} An array of strings and tokens, a token stream.
|
|
37062
|
+
* @memberof Prism
|
|
37063
|
+
* @public
|
|
37064
|
+
* @example
|
|
37065
|
+
* let code = `var foo = 0;`;
|
|
37066
|
+
* let tokens = Prism.tokenize(code, Prism.languages.javascript);
|
|
37067
|
+
* tokens.forEach(token => {
|
|
37068
|
+
* if (token instanceof Prism.Token && token.type === 'number') {
|
|
37069
|
+
* console.log(`Found numeric literal: ${token.content}`);
|
|
37070
|
+
* }
|
|
37071
|
+
* });
|
|
37072
|
+
*/
|
|
37073
|
+
tokenize: function (text, grammar) {
|
|
37074
|
+
var rest = grammar.rest
|
|
37075
|
+
if (rest) {
|
|
37076
|
+
for (var token in rest) {
|
|
37077
|
+
grammar[token] = rest[token]
|
|
37078
|
+
}
|
|
37079
|
+
|
|
37080
|
+
delete grammar.rest
|
|
37081
|
+
}
|
|
37082
|
+
|
|
37083
|
+
var tokenList = new LinkedList()
|
|
37084
|
+
addAfter(tokenList, tokenList.head, text)
|
|
37085
|
+
|
|
37086
|
+
matchGrammar(text, tokenList, grammar, tokenList.head, 0)
|
|
37087
|
+
|
|
37088
|
+
return toArray(tokenList)
|
|
37089
|
+
},
|
|
37090
|
+
|
|
37091
|
+
/**
|
|
37092
|
+
* @namespace
|
|
37093
|
+
* @memberof Prism
|
|
37094
|
+
* @public
|
|
37095
|
+
*/
|
|
37096
|
+
hooks: {
|
|
37097
|
+
all: {},
|
|
37098
|
+
|
|
37099
|
+
/**
|
|
37100
|
+
* Adds the given callback to the list of callbacks for the given hook.
|
|
37101
|
+
*
|
|
37102
|
+
* The callback will be invoked when the hook it is registered for is run.
|
|
37103
|
+
* Hooks are usually directly run by a highlight function but you can also run hooks yourself.
|
|
37104
|
+
*
|
|
37105
|
+
* One callback function can be registered to multiple hooks and the same hook multiple times.
|
|
37106
|
+
*
|
|
37107
|
+
* @param {string} name The name of the hook.
|
|
37108
|
+
* @param {HookCallback} callback The callback function which is given environment variables.
|
|
37109
|
+
* @public
|
|
37110
|
+
*/
|
|
37111
|
+
add: function (name, callback) {
|
|
37112
|
+
var hooks = _.hooks.all
|
|
37113
|
+
|
|
37114
|
+
hooks[name] = hooks[name] || []
|
|
37115
|
+
|
|
37116
|
+
hooks[name].push(callback)
|
|
37117
|
+
},
|
|
37118
|
+
|
|
37119
|
+
/**
|
|
37120
|
+
* Runs a hook invoking all registered callbacks with the given environment variables.
|
|
37121
|
+
*
|
|
37122
|
+
* Callbacks will be invoked synchronously and in the order in which they were registered.
|
|
37123
|
+
*
|
|
37124
|
+
* @param {string} name The name of the hook.
|
|
37125
|
+
* @param {Object<string, any>} env The environment variables of the hook passed to all callbacks registered.
|
|
37126
|
+
* @public
|
|
37127
|
+
*/
|
|
37128
|
+
run: function (name, env) {
|
|
37129
|
+
var callbacks = _.hooks.all[name]
|
|
37130
|
+
|
|
37131
|
+
if (!callbacks || !callbacks.length) {
|
|
37132
|
+
return
|
|
37133
|
+
}
|
|
37134
|
+
|
|
37135
|
+
for (var i = 0, callback; (callback = callbacks[i++]); ) {
|
|
37136
|
+
callback(env)
|
|
37137
|
+
}
|
|
37138
|
+
}
|
|
37139
|
+
},
|
|
37140
|
+
|
|
37141
|
+
Token: Token
|
|
37142
|
+
}
|
|
37143
|
+
|
|
37144
|
+
// Typescript note:
|
|
37145
|
+
// The following can be used to import the Token type in JSDoc:
|
|
37146
|
+
//
|
|
37147
|
+
// @typedef {InstanceType<import("./prism-core")["Token"]>} Token
|
|
37148
|
+
|
|
37149
|
+
/**
|
|
37150
|
+
* Creates a new token.
|
|
37151
|
+
*
|
|
37152
|
+
* @param {string} type See {@link Token#type type}
|
|
37153
|
+
* @param {string | TokenStream} content See {@link Token#content content}
|
|
37154
|
+
* @param {string|string[]} [alias] The alias(es) of the token.
|
|
37155
|
+
* @param {string} [matchedStr=""] A copy of the full string this token was created from.
|
|
37156
|
+
* @class
|
|
37157
|
+
* @global
|
|
37158
|
+
* @public
|
|
37159
|
+
*/
|
|
37160
|
+
function Token(type, content, alias, matchedStr) {
|
|
37161
|
+
/**
|
|
37162
|
+
* The type of the token.
|
|
37163
|
+
*
|
|
37164
|
+
* This is usually the key of a pattern in a {@link Grammar}.
|
|
37165
|
+
*
|
|
37166
|
+
* @type {string}
|
|
37167
|
+
* @see GrammarToken
|
|
37168
|
+
* @public
|
|
37169
|
+
*/
|
|
37170
|
+
this.type = type
|
|
37171
|
+
/**
|
|
37172
|
+
* The strings or tokens contained by this token.
|
|
37173
|
+
*
|
|
37174
|
+
* This will be a token stream if the pattern matched also defined an `inside` grammar.
|
|
37175
|
+
*
|
|
37176
|
+
* @type {string | TokenStream}
|
|
37177
|
+
* @public
|
|
37178
|
+
*/
|
|
37179
|
+
this.content = content
|
|
37180
|
+
/**
|
|
37181
|
+
* The alias(es) of the token.
|
|
37182
|
+
*
|
|
37183
|
+
* @type {string|string[]}
|
|
37184
|
+
* @see GrammarToken
|
|
37185
|
+
* @public
|
|
37186
|
+
*/
|
|
37187
|
+
this.alias = alias
|
|
37188
|
+
// Copy of the full string this token was created from
|
|
37189
|
+
this.length = (matchedStr || '').length | 0
|
|
37190
|
+
}
|
|
37191
|
+
|
|
37192
|
+
/**
|
|
37193
|
+
* A token stream is an array of strings and {@link Token Token} objects.
|
|
37194
|
+
*
|
|
37195
|
+
* Token streams have to fulfill a few properties that are assumed by most functions (mostly internal ones) that process
|
|
37196
|
+
* them.
|
|
37197
|
+
*
|
|
37198
|
+
* 1. No adjacent strings.
|
|
37199
|
+
* 2. No empty strings.
|
|
37200
|
+
*
|
|
37201
|
+
* The only exception here is the token stream that only contains the empty string and nothing else.
|
|
37202
|
+
*
|
|
37203
|
+
* @typedef {Array<string | Token>} TokenStream
|
|
37204
|
+
* @global
|
|
37205
|
+
* @public
|
|
37206
|
+
*/
|
|
37207
|
+
|
|
37208
|
+
/**
|
|
37209
|
+
* @param {RegExp} pattern
|
|
37210
|
+
* @param {number} pos
|
|
37211
|
+
* @param {string} text
|
|
37212
|
+
* @param {boolean} lookbehind
|
|
37213
|
+
* @returns {RegExpExecArray | null}
|
|
37214
|
+
*/
|
|
37215
|
+
function matchPattern(pattern, pos, text, lookbehind) {
|
|
37216
|
+
pattern.lastIndex = pos
|
|
37217
|
+
var match = pattern.exec(text)
|
|
37218
|
+
if (match && lookbehind && match[1]) {
|
|
37219
|
+
// change the match to remove the text matched by the Prism lookbehind group
|
|
37220
|
+
var lookbehindLength = match[1].length
|
|
37221
|
+
match.index += lookbehindLength
|
|
37222
|
+
match[0] = match[0].slice(lookbehindLength)
|
|
37223
|
+
}
|
|
37224
|
+
return match
|
|
37225
|
+
}
|
|
37226
|
+
|
|
37227
|
+
/**
|
|
37228
|
+
* @param {string} text
|
|
37229
|
+
* @param {LinkedList<string | Token>} tokenList
|
|
37230
|
+
* @param {any} grammar
|
|
37231
|
+
* @param {LinkedListNode<string | Token>} startNode
|
|
37232
|
+
* @param {number} startPos
|
|
37233
|
+
* @param {RematchOptions} [rematch]
|
|
37234
|
+
* @returns {void}
|
|
37235
|
+
* @private
|
|
37236
|
+
*
|
|
37237
|
+
* @typedef RematchOptions
|
|
37238
|
+
* @property {string} cause
|
|
37239
|
+
* @property {number} reach
|
|
37240
|
+
*/
|
|
37241
|
+
function matchGrammar(text, tokenList, grammar, startNode, startPos, rematch) {
|
|
37242
|
+
for (var token in grammar) {
|
|
37243
|
+
if (!grammar.hasOwnProperty(token) || !grammar[token]) {
|
|
37244
|
+
continue
|
|
37245
|
+
}
|
|
37246
|
+
|
|
37247
|
+
var patterns = grammar[token]
|
|
37248
|
+
patterns = Array.isArray(patterns) ? patterns : [patterns]
|
|
37249
|
+
|
|
37250
|
+
for (var j = 0; j < patterns.length; ++j) {
|
|
37251
|
+
if (rematch && rematch.cause == token + ',' + j) {
|
|
37252
|
+
return
|
|
37253
|
+
}
|
|
37254
|
+
|
|
37255
|
+
var patternObj = patterns[j]
|
|
37256
|
+
var inside = patternObj.inside
|
|
37257
|
+
var lookbehind = !!patternObj.lookbehind
|
|
37258
|
+
var greedy = !!patternObj.greedy
|
|
37259
|
+
var alias = patternObj.alias
|
|
37260
|
+
|
|
37261
|
+
if (greedy && !patternObj.pattern.global) {
|
|
37262
|
+
// Without the global flag, lastIndex won't work
|
|
37263
|
+
var flags = patternObj.pattern.toString().match(/[imsuy]*$/)[0]
|
|
37264
|
+
patternObj.pattern = RegExp(patternObj.pattern.source, flags + 'g')
|
|
37265
|
+
}
|
|
37266
|
+
|
|
37267
|
+
/** @type {RegExp} */
|
|
37268
|
+
var pattern = patternObj.pattern || patternObj
|
|
37269
|
+
|
|
37270
|
+
for (
|
|
37271
|
+
// iterate the token list and keep track of the current token/string position
|
|
37272
|
+
var currentNode = startNode.next, pos = startPos;
|
|
37273
|
+
currentNode !== tokenList.tail;
|
|
37274
|
+
pos += currentNode.value.length, currentNode = currentNode.next
|
|
37275
|
+
) {
|
|
37276
|
+
if (rematch && pos >= rematch.reach) {
|
|
37277
|
+
break
|
|
37278
|
+
}
|
|
37279
|
+
|
|
37280
|
+
var str = currentNode.value
|
|
37281
|
+
|
|
37282
|
+
if (tokenList.length > text.length) {
|
|
37283
|
+
// Something went terribly wrong, ABORT, ABORT!
|
|
37284
|
+
return
|
|
37285
|
+
}
|
|
37286
|
+
|
|
37287
|
+
if (str instanceof Token) {
|
|
37288
|
+
continue
|
|
37289
|
+
}
|
|
37290
|
+
|
|
37291
|
+
var removeCount = 1 // this is the to parameter of removeBetween
|
|
37292
|
+
var match
|
|
37293
|
+
|
|
37294
|
+
if (greedy) {
|
|
37295
|
+
match = matchPattern(pattern, pos, text, lookbehind)
|
|
37296
|
+
if (!match || match.index >= text.length) {
|
|
37297
|
+
break
|
|
37298
|
+
}
|
|
37299
|
+
|
|
37300
|
+
var from = match.index
|
|
37301
|
+
var to = match.index + match[0].length
|
|
37302
|
+
var p = pos
|
|
37303
|
+
|
|
37304
|
+
// find the node that contains the match
|
|
37305
|
+
p += currentNode.value.length
|
|
37306
|
+
while (from >= p) {
|
|
37307
|
+
currentNode = currentNode.next
|
|
37308
|
+
p += currentNode.value.length
|
|
37309
|
+
}
|
|
37310
|
+
// adjust pos (and p)
|
|
37311
|
+
p -= currentNode.value.length
|
|
37312
|
+
pos = p
|
|
37313
|
+
|
|
37314
|
+
// the current node is a Token, then the match starts inside another Token, which is invalid
|
|
37315
|
+
if (currentNode.value instanceof Token) {
|
|
37316
|
+
continue
|
|
37317
|
+
}
|
|
37318
|
+
|
|
37319
|
+
// find the last node which is affected by this match
|
|
37320
|
+
for (
|
|
37321
|
+
var k = currentNode;
|
|
37322
|
+
k !== tokenList.tail && (p < to || typeof k.value === 'string');
|
|
37323
|
+
k = k.next
|
|
37324
|
+
) {
|
|
37325
|
+
removeCount++
|
|
37326
|
+
p += k.value.length
|
|
37327
|
+
}
|
|
37328
|
+
removeCount--
|
|
37329
|
+
|
|
37330
|
+
// replace with the new match
|
|
37331
|
+
str = text.slice(pos, p)
|
|
37332
|
+
match.index -= pos
|
|
37333
|
+
} else {
|
|
37334
|
+
match = matchPattern(pattern, 0, str, lookbehind)
|
|
37335
|
+
if (!match) {
|
|
37336
|
+
continue
|
|
37337
|
+
}
|
|
37338
|
+
}
|
|
37339
|
+
|
|
37340
|
+
// eslint-disable-next-line no-redeclare
|
|
37341
|
+
var from = match.index
|
|
37342
|
+
var matchStr = match[0]
|
|
37343
|
+
var before = str.slice(0, from)
|
|
37344
|
+
var after = str.slice(from + matchStr.length)
|
|
37345
|
+
|
|
37346
|
+
var reach = pos + str.length
|
|
37347
|
+
if (rematch && reach > rematch.reach) {
|
|
37348
|
+
rematch.reach = reach
|
|
37349
|
+
}
|
|
37350
|
+
|
|
37351
|
+
var removeFrom = currentNode.prev
|
|
37352
|
+
|
|
37353
|
+
if (before) {
|
|
37354
|
+
removeFrom = addAfter(tokenList, removeFrom, before)
|
|
37355
|
+
pos += before.length
|
|
37356
|
+
}
|
|
37357
|
+
|
|
37358
|
+
removeRange(tokenList, removeFrom, removeCount)
|
|
37359
|
+
|
|
37360
|
+
var wrapped = new Token(
|
|
37361
|
+
token,
|
|
37362
|
+
inside ? _.tokenize(matchStr, inside) : matchStr,
|
|
37363
|
+
alias,
|
|
37364
|
+
matchStr
|
|
37365
|
+
)
|
|
37366
|
+
currentNode = addAfter(tokenList, removeFrom, wrapped)
|
|
37367
|
+
|
|
37368
|
+
if (after) {
|
|
37369
|
+
addAfter(tokenList, currentNode, after)
|
|
37370
|
+
}
|
|
37371
|
+
|
|
37372
|
+
if (removeCount > 1) {
|
|
37373
|
+
// at least one Token object was removed, so we have to do some rematching
|
|
37374
|
+
// this can only happen if the current pattern is greedy
|
|
37375
|
+
|
|
37376
|
+
/** @type {RematchOptions} */
|
|
37377
|
+
var nestedRematch = {
|
|
37378
|
+
cause: token + ',' + j,
|
|
37379
|
+
reach: reach
|
|
37380
|
+
}
|
|
37381
|
+
matchGrammar(
|
|
37382
|
+
text,
|
|
37383
|
+
tokenList,
|
|
37384
|
+
grammar,
|
|
37385
|
+
currentNode.prev,
|
|
37386
|
+
pos,
|
|
37387
|
+
nestedRematch
|
|
37388
|
+
)
|
|
37389
|
+
|
|
37390
|
+
// the reach might have been extended because of the rematching
|
|
37391
|
+
if (rematch && nestedRematch.reach > rematch.reach) {
|
|
37392
|
+
rematch.reach = nestedRematch.reach
|
|
37393
|
+
}
|
|
37394
|
+
}
|
|
37395
|
+
}
|
|
37396
|
+
}
|
|
37397
|
+
}
|
|
37398
|
+
}
|
|
37399
|
+
|
|
37400
|
+
/**
|
|
37401
|
+
* @typedef LinkedListNode
|
|
37402
|
+
* @property {T} value
|
|
37403
|
+
* @property {LinkedListNode<T> | null} prev The previous node.
|
|
37404
|
+
* @property {LinkedListNode<T> | null} next The next node.
|
|
37405
|
+
* @template T
|
|
37406
|
+
* @private
|
|
37407
|
+
*/
|
|
37408
|
+
|
|
37409
|
+
/**
|
|
37410
|
+
* @template T
|
|
37411
|
+
* @private
|
|
37412
|
+
*/
|
|
37413
|
+
function LinkedList() {
|
|
37414
|
+
/** @type {LinkedListNode<T>} */
|
|
37415
|
+
var head = {value: null, prev: null, next: null}
|
|
37416
|
+
/** @type {LinkedListNode<T>} */
|
|
37417
|
+
var tail = {value: null, prev: head, next: null}
|
|
37418
|
+
head.next = tail
|
|
37419
|
+
|
|
37420
|
+
/** @type {LinkedListNode<T>} */
|
|
37421
|
+
this.head = head
|
|
37422
|
+
/** @type {LinkedListNode<T>} */
|
|
37423
|
+
this.tail = tail
|
|
37424
|
+
this.length = 0
|
|
37425
|
+
}
|
|
37426
|
+
|
|
37427
|
+
/**
|
|
37428
|
+
* Adds a new node with the given value to the list.
|
|
37429
|
+
*
|
|
37430
|
+
* @param {LinkedList<T>} list
|
|
37431
|
+
* @param {LinkedListNode<T>} node
|
|
37432
|
+
* @param {T} value
|
|
37433
|
+
* @returns {LinkedListNode<T>} The added node.
|
|
37434
|
+
* @template T
|
|
37435
|
+
*/
|
|
37436
|
+
function addAfter(list, node, value) {
|
|
37437
|
+
// assumes that node != list.tail && values.length >= 0
|
|
37438
|
+
var next = node.next
|
|
37439
|
+
|
|
37440
|
+
var newNode = {value: value, prev: node, next: next}
|
|
37441
|
+
node.next = newNode
|
|
37442
|
+
next.prev = newNode
|
|
37443
|
+
list.length++
|
|
37444
|
+
|
|
37445
|
+
return newNode
|
|
37446
|
+
}
|
|
37447
|
+
/**
|
|
37448
|
+
* Removes `count` nodes after the given node. The given node will not be removed.
|
|
37449
|
+
*
|
|
37450
|
+
* @param {LinkedList<T>} list
|
|
37451
|
+
* @param {LinkedListNode<T>} node
|
|
37452
|
+
* @param {number} count
|
|
37453
|
+
* @template T
|
|
37454
|
+
*/
|
|
37455
|
+
function removeRange(list, node, count) {
|
|
37456
|
+
var next = node.next
|
|
37457
|
+
for (var i = 0; i < count && next !== list.tail; i++) {
|
|
37458
|
+
next = next.next
|
|
37459
|
+
}
|
|
37460
|
+
node.next = next
|
|
37461
|
+
next.prev = node
|
|
37462
|
+
list.length -= i
|
|
37463
|
+
}
|
|
37464
|
+
/**
|
|
37465
|
+
* @param {LinkedList<T>} list
|
|
37466
|
+
* @returns {T[]}
|
|
37467
|
+
* @template T
|
|
37468
|
+
*/
|
|
37469
|
+
function toArray(list) {
|
|
37470
|
+
var array = []
|
|
37471
|
+
var node = list.head.next
|
|
37472
|
+
while (node !== list.tail) {
|
|
37473
|
+
array.push(node.value)
|
|
37474
|
+
node = node.next
|
|
37475
|
+
}
|
|
37476
|
+
return array
|
|
37477
|
+
}
|
|
37478
|
+
|
|
37479
|
+
const Prism = _
|
|
37480
|
+
|
|
37481
|
+
// some additional documentation/types
|
|
37482
|
+
|
|
37483
|
+
/**
|
|
37484
|
+
* The expansion of a simple `RegExp` literal to support additional properties.
|
|
37485
|
+
*
|
|
37486
|
+
* @typedef GrammarToken
|
|
37487
|
+
* @property {RegExp} pattern The regular expression of the token.
|
|
37488
|
+
* @property {boolean} [lookbehind=false] If `true`, then the first capturing group of `pattern` will (effectively)
|
|
37489
|
+
* behave as a lookbehind group meaning that the captured text will not be part of the matched text of the new token.
|
|
37490
|
+
* @property {boolean} [greedy=false] Whether the token is greedy.
|
|
37491
|
+
* @property {string|string[]} [alias] An optional alias or list of aliases.
|
|
37492
|
+
* @property {Grammar} [inside] The nested grammar of this token.
|
|
37493
|
+
*
|
|
37494
|
+
* The `inside` grammar will be used to tokenize the text value of each token of this kind.
|
|
37495
|
+
*
|
|
37496
|
+
* This can be used to make nested and even recursive language definitions.
|
|
37497
|
+
*
|
|
37498
|
+
* Note: This can cause infinite recursion. Be careful when you embed different languages or even the same language into
|
|
37499
|
+
* each another.
|
|
37500
|
+
* @global
|
|
37501
|
+
* @public
|
|
37502
|
+
*/
|
|
37503
|
+
|
|
37504
|
+
/**
|
|
37505
|
+
* @typedef Grammar
|
|
37506
|
+
* @type {Object<string, RegExp | GrammarToken | Array<RegExp | GrammarToken>>}
|
|
37507
|
+
* @property {Grammar} [rest] An optional grammar object that will be appended to this grammar.
|
|
37508
|
+
* @global
|
|
37509
|
+
* @public
|
|
37510
|
+
*/
|
|
37511
|
+
|
|
37512
|
+
/**
|
|
37513
|
+
* A function which will invoked after an element was successfully highlighted.
|
|
37514
|
+
*
|
|
37515
|
+
* @callback HighlightCallback
|
|
37516
|
+
* @param {Element} element The element successfully highlighted.
|
|
37517
|
+
* @returns {void}
|
|
37518
|
+
* @global
|
|
37519
|
+
* @public
|
|
37520
|
+
*/
|
|
37521
|
+
|
|
37522
|
+
/**
|
|
37523
|
+
* @callback HookCallback
|
|
37524
|
+
* @param {Object<string, any>} env The environment variables of the hook.
|
|
37525
|
+
* @returns {void}
|
|
37526
|
+
* @global
|
|
37527
|
+
* @public
|
|
37528
|
+
*/
|
|
37529
|
+
|
|
38005
37530
|
;// CONCATENATED MODULE: ./node_modules/refractor/lib/core.js
|
|
38006
37531
|
/**
|
|
38007
37532
|
* @typedef _Token A hidden Prism token
|
|
@@ -38037,53 +37562,18 @@ var prism_core = __webpack_require__(975);
|
|
|
38037
37562
|
* @property {Languages} languages
|
|
38038
37563
|
*/
|
|
38039
37564
|
|
|
38040
|
-
/* eslint-disable no-undef */
|
|
38041
|
-
// Don’t allow Prism to run on page load in browser or to start messaging from
|
|
38042
|
-
// workers.
|
|
38043
|
-
/* c8 ignore next 15 */
|
|
38044
|
-
/** @type {typeof globalThis} */
|
|
38045
|
-
const ctx =
|
|
38046
|
-
typeof globalThis === 'object'
|
|
38047
|
-
? globalThis
|
|
38048
|
-
: // @ts-expect-error
|
|
38049
|
-
typeof self === 'object'
|
|
38050
|
-
? // @ts-expect-error
|
|
38051
|
-
self
|
|
38052
|
-
: // @ts-expect-error
|
|
38053
|
-
typeof window === 'object'
|
|
38054
|
-
? // @ts-expect-error
|
|
38055
|
-
window
|
|
38056
|
-
: typeof global === 'object'
|
|
38057
|
-
? global
|
|
38058
|
-
: {}
|
|
38059
|
-
/* eslint-enable no-undef */
|
|
38060
|
-
|
|
38061
|
-
const restore = capture()
|
|
38062
|
-
|
|
38063
|
-
/* c8 ignore next 5 */
|
|
38064
|
-
ctx.Prism = ctx.Prism || {}
|
|
38065
|
-
ctx.Prism.manual = true
|
|
38066
|
-
ctx.Prism.disableWorkerMessageHandler = true
|
|
38067
|
-
|
|
38068
|
-
/* eslint-disable import/first */
|
|
38069
|
-
|
|
38070
37565
|
// Load all stuff in `prism.js` itself, except for `prism-file-highlight.js`.
|
|
38071
37566
|
// The wrapped non-leaky grammars are loaded instead of Prism’s originals.
|
|
38072
|
-
;
|
|
38073
|
-
|
|
38074
|
-
// @ts-expect-error: untyped.
|
|
38075
37567
|
|
|
38076
37568
|
|
|
38077
|
-
/* eslint-enable import/first */
|
|
38078
37569
|
|
|
38079
|
-
restore()
|
|
38080
37570
|
|
|
38081
37571
|
const lib_core_own = {}.hasOwnProperty
|
|
38082
37572
|
|
|
38083
37573
|
// Inherit.
|
|
38084
37574
|
function Refractor() {}
|
|
38085
37575
|
|
|
38086
|
-
Refractor.prototype =
|
|
37576
|
+
Refractor.prototype = Prism
|
|
38087
37577
|
|
|
38088
37578
|
/** @type {Refractor} */
|
|
38089
37579
|
// @ts-expect-error: TS is wrong.
|
|
@@ -38122,6 +37612,8 @@ function highlight(value, language) {
|
|
|
38122
37612
|
let name
|
|
38123
37613
|
|
|
38124
37614
|
// `name` is a grammar object.
|
|
37615
|
+
// This was called internally by Prism.js before 1.28.0.
|
|
37616
|
+
/* c8 ignore next 2 */
|
|
38125
37617
|
if (language && typeof language === 'object') {
|
|
38126
37618
|
grammar = language
|
|
38127
37619
|
} else {
|
|
@@ -38140,7 +37632,8 @@ function highlight(value, language) {
|
|
|
38140
37632
|
|
|
38141
37633
|
return {
|
|
38142
37634
|
type: 'root',
|
|
38143
|
-
|
|
37635
|
+
// @ts-expect-error: we hacked Prism to accept and return the things we want.
|
|
37636
|
+
children: Prism.highlight.call(refractor, value, grammar, name)
|
|
38144
37637
|
}
|
|
38145
37638
|
}
|
|
38146
37639
|
|
|
@@ -38153,15 +37646,12 @@ function highlight(value, language) {
|
|
|
38153
37646
|
* @returns {void}
|
|
38154
37647
|
*/
|
|
38155
37648
|
function register(syntax) {
|
|
38156
|
-
// @ts-expect-error: runtime.
|
|
38157
37649
|
if (typeof syntax !== 'function' || !syntax.displayName) {
|
|
38158
37650
|
throw new Error('Expected `function` for `syntax`, got `' + syntax + '`')
|
|
38159
37651
|
}
|
|
38160
37652
|
|
|
38161
37653
|
// Do not duplicate registrations.
|
|
38162
|
-
// @ts-expect-error: TypeScript is wrong.
|
|
38163
37654
|
if (!lib_core_own.call(refractor.languages, syntax.displayName)) {
|
|
38164
|
-
// @ts-expect-error: TypeScript is wrong.
|
|
38165
37655
|
syntax(refractor)
|
|
38166
37656
|
}
|
|
38167
37657
|
}
|
|
@@ -38324,36 +37814,6 @@ function core_attributes(attrs) {
|
|
|
38324
37814
|
return attrs
|
|
38325
37815
|
}
|
|
38326
37816
|
|
|
38327
|
-
/**
|
|
38328
|
-
* @returns {() => void}
|
|
38329
|
-
*/
|
|
38330
|
-
function capture() {
|
|
38331
|
-
/** @type {boolean|undefined} */
|
|
38332
|
-
let defined = 'Prism' in ctx
|
|
38333
|
-
/* c8 ignore next */
|
|
38334
|
-
let current = defined ? ctx.Prism : undefined
|
|
38335
|
-
|
|
38336
|
-
return restore
|
|
38337
|
-
|
|
38338
|
-
/**
|
|
38339
|
-
* @returns {void}
|
|
38340
|
-
*/
|
|
38341
|
-
function restore() {
|
|
38342
|
-
/* istanbul ignore else - Clean leaks after Prism. */
|
|
38343
|
-
if (defined) {
|
|
38344
|
-
// @ts-expect-error: hush.
|
|
38345
|
-
ctx.Prism = current
|
|
38346
|
-
/* c8 ignore next 4 */
|
|
38347
|
-
} else {
|
|
38348
|
-
// @ts-expect-error: hush.
|
|
38349
|
-
delete ctx.Prism
|
|
38350
|
-
}
|
|
38351
|
-
|
|
38352
|
-
defined = undefined
|
|
38353
|
-
current = undefined
|
|
38354
|
-
}
|
|
38355
|
-
}
|
|
38356
|
-
|
|
38357
37817
|
;// CONCATENATED MODULE: ./node_modules/refractor/lib/common.js
|
|
38358
37818
|
/**
|
|
38359
37819
|
* @typedef {import('./core.js').RefractorRoot} RefractorRoot
|
|
@@ -38465,7 +37925,7 @@ inside an EOL comment is more acceptable than the opposite.
|
|
|
38465
37925
|
},
|
|
38466
37926
|
keyword: {
|
|
38467
37927
|
pattern:
|
|
38468
|
-
/(\s|\.|^)(
|
|
37928
|
+
/(\s|\.|^)(?:\*-INPUT|\?TO|ABAP-SOURCE|ABBREVIATED|ABS|ABSTRACT|ACCEPT|ACCEPTING|ACCESSPOLICY|ACCORDING|ACOS|ACTIVATION|ACTUAL|ADD|ADD-CORRESPONDING|ADJACENT|AFTER|ALIAS|ALIASES|ALIGN|ALL|ALLOCATE|ALPHA|ANALYSIS|ANALYZER|AND|ANY|APPEND|APPENDAGE|APPENDING|APPLICATION|ARCHIVE|AREA|ARITHMETIC|AS|ASCENDING|ASIN|ASPECT|ASSERT|ASSIGN|ASSIGNED|ASSIGNING|ASSOCIATION|ASYNCHRONOUS|AT|ATAN|ATTRIBUTES|AUTHORITY|AUTHORITY-CHECK|AVG|BACK|BACKGROUND|BACKUP|BACKWARD|BADI|BASE|BEFORE|BEGIN|BETWEEN|BIG|BINARY|BINDING|BIT|BIT-AND|BIT-NOT|BIT-OR|BIT-XOR|BLACK|BLANK|BLANKS|BLOB|BLOCK|BLOCKS|BLUE|BOUND|BOUNDARIES|BOUNDS|BOXED|BREAK-POINT|BT|BUFFER|BY|BYPASSING|BYTE|BYTE-CA|BYTE-CN|BYTE-CO|BYTE-CS|BYTE-NA|BYTE-NS|BYTE-ORDER|C|CA|CALL|CALLING|CASE|CAST|CASTING|CATCH|CEIL|CENTER|CENTERED|CHAIN|CHAIN-INPUT|CHAIN-REQUEST|CHANGE|CHANGING|CHANNELS|CHAR-TO-HEX|CHARACTER|CHARLEN|CHECK|CHECKBOX|CIRCULAR|CI_|CLASS|CLASS-CODING|CLASS-DATA|CLASS-EVENTS|CLASS-METHODS|CLASS-POOL|CLEANUP|CLEAR|CLIENT|CLOB|CLOCK|CLOSE|CN|CNT|CO|COALESCE|CODE|CODING|COLLECT|COLOR|COLUMN|COLUMNS|COL_BACKGROUND|COL_GROUP|COL_HEADING|COL_KEY|COL_NEGATIVE|COL_NORMAL|COL_POSITIVE|COL_TOTAL|COMMENT|COMMENTS|COMMIT|COMMON|COMMUNICATION|COMPARING|COMPONENT|COMPONENTS|COMPRESSION|COMPUTE|CONCAT|CONCATENATE|COND|CONDENSE|CONDITION|CONNECT|CONNECTION|CONSTANTS|CONTEXT|CONTEXTS|CONTINUE|CONTROL|CONTROLS|CONV|CONVERSION|CONVERT|COPIES|COPY|CORRESPONDING|COS|COSH|COUNT|COUNTRY|COVER|CP|CPI|CREATE|CREATING|CRITICAL|CS|CURRENCY|CURRENCY_CONVERSION|CURRENT|CURSOR|CURSOR-SELECTION|CUSTOMER|CUSTOMER-FUNCTION|DANGEROUS|DATA|DATABASE|DATAINFO|DATASET|DATE|DAYLIGHT|DBMAXLEN|DD\/MM\/YY|DD\/MM\/YYYY|DDMMYY|DEALLOCATE|DECIMALS|DECIMAL_SHIFT|DECLARATIONS|DEEP|DEFAULT|DEFERRED|DEFINE|DEFINING|DEFINITION|DELETE|DELETING|DEMAND|DEPARTMENT|DESCENDING|DESCRIBE|DESTINATION|DETAIL|DIALOG|DIRECTORY|DISCONNECT|DISPLAY|DISPLAY-MODE|DISTANCE|DISTINCT|DIV|DIVIDE|DIVIDE-CORRESPONDING|DIVISION|DO|DUMMY|DUPLICATE|DUPLICATES|DURATION|DURING|DYNAMIC|DYNPRO|E|EACH|EDIT|EDITOR-CALL|ELSE|ELSEIF|EMPTY|ENABLED|ENABLING|ENCODING|END|END-ENHANCEMENT-SECTION|END-LINES|END-OF-DEFINITION|END-OF-FILE|END-OF-PAGE|END-OF-SELECTION|ENDAT|ENDCASE|ENDCATCH|ENDCHAIN|ENDCLASS|ENDDO|ENDENHANCEMENT|ENDEXEC|ENDFOR|ENDFORM|ENDFUNCTION|ENDIAN|ENDIF|ENDING|ENDINTERFACE|ENDLOOP|ENDMETHOD|ENDMODULE|ENDON|ENDPROVIDE|ENDSELECT|ENDTRY|ENDWHILE|ENGINEERING|ENHANCEMENT|ENHANCEMENT-POINT|ENHANCEMENT-SECTION|ENHANCEMENTS|ENTRIES|ENTRY|ENVIRONMENT|EQ|EQUAL|EQUIV|ERRORMESSAGE|ERRORS|ESCAPE|ESCAPING|EVENT|EVENTS|EXACT|EXCEPT|EXCEPTION|EXCEPTION-TABLE|EXCEPTIONS|EXCLUDE|EXCLUDING|EXEC|EXECUTE|EXISTS|EXIT|EXIT-COMMAND|EXP|EXPAND|EXPANDING|EXPIRATION|EXPLICIT|EXPONENT|EXPORT|EXPORTING|EXTEND|EXTENDED|EXTENSION|EXTRACT|FAIL|FETCH|FIELD|FIELD-GROUPS|FIELD-SYMBOL|FIELD-SYMBOLS|FIELDS|FILE|FILTER|FILTER-TABLE|FILTERS|FINAL|FIND|FIRST|FIRST-LINE|FIXED-POINT|FKEQ|FKGE|FLOOR|FLUSH|FONT|FOR|FORM|FORMAT|FORWARD|FOUND|FRAC|FRAME|FRAMES|FREE|FRIENDS|FROM|FUNCTION|FUNCTION-POOL|FUNCTIONALITY|FURTHER|GAPS|GE|GENERATE|GET|GIVING|GKEQ|GKGE|GLOBAL|GRANT|GREATER|GREEN|GROUP|GROUPS|GT|HANDLE|HANDLER|HARMLESS|HASHED|HAVING|HDB|HEAD-LINES|HEADER|HEADERS|HEADING|HELP-ID|HELP-REQUEST|HIDE|HIGH|HINT|HOLD|HOTSPOT|I|ICON|ID|IDENTIFICATION|IDENTIFIER|IDS|IF|IGNORE|IGNORING|IMMEDIATELY|IMPLEMENTATION|IMPLEMENTATIONS|IMPLEMENTED|IMPLICIT|IMPORT|IMPORTING|IN|INACTIVE|INCL|INCLUDE|INCLUDES|INCLUDING|INCREMENT|INDEX|INDEX-LINE|INFOTYPES|INHERITING|INIT|INITIAL|INITIALIZATION|INNER|INOUT|INPUT|INSERT|INSTANCES|INTENSIFIED|INTERFACE|INTERFACE-POOL|INTERFACES|INTERNAL|INTERVALS|INTO|INVERSE|INVERTED-DATE|IS|ISO|ITERATOR|ITNO|JOB|JOIN|KEEP|KEEPING|KERNEL|KEY|KEYS|KEYWORDS|KIND|LANGUAGE|LAST|LATE|LAYOUT|LE|LEADING|LEAVE|LEFT|LEFT-JUSTIFIED|LEFTPLUS|LEFTSPACE|LEGACY|LENGTH|LESS|LET|LEVEL|LEVELS|LIKE|LINE|LINE-COUNT|LINE-SELECTION|LINE-SIZE|LINEFEED|LINES|LIST|LIST-PROCESSING|LISTBOX|LITTLE|LLANG|LOAD|LOAD-OF-PROGRAM|LOB|LOCAL|LOCALE|LOCATOR|LOG|LOG-POINT|LOG10|LOGFILE|LOGICAL|LONG|LOOP|LOW|LOWER|LPAD|LPI|LT|M|MAIL|MAIN|MAJOR-ID|MAPPING|MARGIN|MARK|MASK|MATCH|MATCHCODE|MAX|MAXIMUM|MEDIUM|MEMBERS|MEMORY|MESH|MESSAGE|MESSAGE-ID|MESSAGES|MESSAGING|METHOD|METHODS|MIN|MINIMUM|MINOR-ID|MM\/DD\/YY|MM\/DD\/YYYY|MMDDYY|MOD|MODE|MODIF|MODIFIER|MODIFY|MODULE|MOVE|MOVE-CORRESPONDING|MULTIPLY|MULTIPLY-CORRESPONDING|NA|NAME|NAMETAB|NATIVE|NB|NE|NESTED|NESTING|NEW|NEW-LINE|NEW-PAGE|NEW-SECTION|NEXT|NO|NO-DISPLAY|NO-EXTENSION|NO-GAP|NO-GAPS|NO-GROUPING|NO-HEADING|NO-SCROLLING|NO-SIGN|NO-TITLE|NO-TOPOFPAGE|NO-ZERO|NODE|NODES|NON-UNICODE|NON-UNIQUE|NOT|NP|NS|NULL|NUMBER|NUMOFCHAR|O|OBJECT|OBJECTS|OBLIGATORY|OCCURRENCE|OCCURRENCES|OCCURS|OF|OFF|OFFSET|OLE|ON|ONLY|OPEN|OPTION|OPTIONAL|OPTIONS|OR|ORDER|OTHER|OTHERS|OUT|OUTER|OUTPUT|OUTPUT-LENGTH|OVERFLOW|OVERLAY|PACK|PACKAGE|PAD|PADDING|PAGE|PAGES|PARAMETER|PARAMETER-TABLE|PARAMETERS|PART|PARTIALLY|PATTERN|PERCENTAGE|PERFORM|PERFORMING|PERSON|PF|PF-STATUS|PINK|PLACES|POOL|POSITION|POS_HIGH|POS_LOW|PRAGMAS|PRECOMPILED|PREFERRED|PRESERVING|PRIMARY|PRINT|PRINT-CONTROL|PRIORITY|PRIVATE|PROCEDURE|PROCESS|PROGRAM|PROPERTY|PROTECTED|PROVIDE|PUBLIC|PUSHBUTTON|PUT|QUEUE-ONLY|QUICKINFO|RADIOBUTTON|RAISE|RAISING|RANGE|RANGES|RAW|READ|READ-ONLY|READER|RECEIVE|RECEIVED|RECEIVER|RECEIVING|RED|REDEFINITION|REDUCE|REDUCED|REF|REFERENCE|REFRESH|REGEX|REJECT|REMOTE|RENAMING|REPLACE|REPLACEMENT|REPLACING|REPORT|REQUEST|REQUESTED|RESERVE|RESET|RESOLUTION|RESPECTING|RESPONSIBLE|RESULT|RESULTS|RESUMABLE|RESUME|RETRY|RETURN|RETURNCODE|RETURNING|RIGHT|RIGHT-JUSTIFIED|RIGHTPLUS|RIGHTSPACE|RISK|RMC_COMMUNICATION_FAILURE|RMC_INVALID_STATUS|RMC_SYSTEM_FAILURE|ROLE|ROLLBACK|ROUND|ROWS|RTTI|RUN|SAP|SAP-SPOOL|SAVING|SCALE_PRESERVING|SCALE_PRESERVING_SCIENTIFIC|SCAN|SCIENTIFIC|SCIENTIFIC_WITH_LEADING_ZERO|SCREEN|SCROLL|SCROLL-BOUNDARY|SCROLLING|SEARCH|SECONDARY|SECONDS|SECTION|SELECT|SELECT-OPTIONS|SELECTION|SELECTION-SCREEN|SELECTION-SET|SELECTION-SETS|SELECTION-TABLE|SELECTIONS|SELECTOR|SEND|SEPARATE|SEPARATED|SET|SHARED|SHIFT|SHORT|SHORTDUMP-ID|SIGN|SIGN_AS_POSTFIX|SIMPLE|SIN|SINGLE|SINH|SIZE|SKIP|SKIPPING|SMART|SOME|SORT|SORTABLE|SORTED|SOURCE|SPACE|SPECIFIED|SPLIT|SPOOL|SPOTS|SQL|SQLSCRIPT|SQRT|STABLE|STAMP|STANDARD|START-OF-SELECTION|STARTING|STATE|STATEMENT|STATEMENTS|STATIC|STATICS|STATUSINFO|STEP-LOOP|STOP|STRLEN|STRUCTURE|STRUCTURES|STYLE|SUBKEY|SUBMATCHES|SUBMIT|SUBROUTINE|SUBSCREEN|SUBSTRING|SUBTRACT|SUBTRACT-CORRESPONDING|SUFFIX|SUM|SUMMARY|SUMMING|SUPPLIED|SUPPLY|SUPPRESS|SWITCH|SWITCHSTATES|SYMBOL|SYNCPOINTS|SYNTAX|SYNTAX-CHECK|SYNTAX-TRACE|SYSTEM-CALL|SYSTEM-EXCEPTIONS|SYSTEM-EXIT|TAB|TABBED|TABLE|TABLES|TABLEVIEW|TABSTRIP|TAN|TANH|TARGET|TASK|TASKS|TEST|TESTING|TEXT|TEXTPOOL|THEN|THROW|TIME|TIMES|TIMESTAMP|TIMEZONE|TITLE|TITLE-LINES|TITLEBAR|TO|TOKENIZATION|TOKENS|TOP-LINES|TOP-OF-PAGE|TRACE-FILE|TRACE-TABLE|TRAILING|TRANSACTION|TRANSFER|TRANSFORMATION|TRANSLATE|TRANSPORTING|TRMAC|TRUNC|TRUNCATE|TRUNCATION|TRY|TYPE|TYPE-POOL|TYPE-POOLS|TYPES|ULINE|UNASSIGN|UNDER|UNICODE|UNION|UNIQUE|UNIT|UNIT_CONVERSION|UNIX|UNPACK|UNTIL|UNWIND|UP|UPDATE|UPPER|USER|USER-COMMAND|USING|UTF-8|VALID|VALUE|VALUE-REQUEST|VALUES|VARY|VARYING|VERIFICATION-MESSAGE|VERSION|VIA|VIEW|VISIBLE|WAIT|WARNING|WHEN|WHENEVER|WHERE|WHILE|WIDTH|WINDOW|WINDOWS|WITH|WITH-HEADING|WITH-TITLE|WITHOUT|WORD|WORK|WRITE|WRITER|X|XML|XOR|XSD|XSTRLEN|YELLOW|YES|YYMMDD|Z|ZERO|ZONE)(?![\w-])/i,
|
|
38469
37929
|
lookbehind: true
|
|
38470
37930
|
},
|
|
38471
37931
|
/* Numbers can be only integers. Decimal or Hex appear only as strings */
|
|
@@ -38613,9 +38073,12 @@ function ada(Prism) {
|
|
|
38613
38073
|
pattern: /\b\d(?:_?\d)*(?:\.\d(?:_?\d)*)?(?:E[+-]?\d(?:_?\d)*)?\b/i
|
|
38614
38074
|
}
|
|
38615
38075
|
],
|
|
38616
|
-
|
|
38076
|
+
attribute: {
|
|
38077
|
+
pattern: /\b'\w+/,
|
|
38078
|
+
alias: 'attr-name'
|
|
38079
|
+
},
|
|
38617
38080
|
keyword:
|
|
38618
|
-
/\b(?:abort|abs|abstract|accept|access|aliased|all|and|array|at|begin|body|case|constant|declare|delay|delta|digits|do|else|elsif|end|entry|exception|exit|for|function|generic|goto|if|in|interface|is|limited|loop|mod|new|not|null|of|others|out|overriding|package|pragma|private|procedure|protected|raise|range|record|rem|renames|requeue|return|reverse|select|separate|some|subtype|synchronized|tagged|task|terminate|then|type|until|use|when|while|with|xor)\b/i,
|
|
38081
|
+
/\b(?:abort|abs|abstract|accept|access|aliased|all|and|array|at|begin|body|case|constant|declare|delay|delta|digits|do|else|elsif|end|entry|exception|exit|for|function|generic|goto|if|in|interface|is|limited|loop|mod|new|not|null|of|or|others|out|overriding|package|pragma|private|procedure|protected|raise|range|record|rem|renames|requeue|return|reverse|select|separate|some|subtype|synchronized|tagged|task|terminate|then|type|until|use|when|while|with|xor)\b/i,
|
|
38619
38082
|
boolean: /\b(?:false|true)\b/i,
|
|
38620
38083
|
operator: /<[=>]?|>=?|=>?|:=|\/=?|\*\*?|[&+-]/,
|
|
38621
38084
|
punctuation: /\.\.?|[,;():]/,
|
|
@@ -39060,6 +38523,163 @@ function arff(Prism) {
|
|
|
39060
38523
|
}
|
|
39061
38524
|
}
|
|
39062
38525
|
|
|
38526
|
+
;// CONCATENATED MODULE: ./node_modules/refractor/lang/armasm.js
|
|
38527
|
+
// @ts-nocheck
|
|
38528
|
+
armasm.displayName = 'armasm'
|
|
38529
|
+
armasm.aliases = ['arm-asm']
|
|
38530
|
+
|
|
38531
|
+
/** @type {import('../core.js').Syntax} */
|
|
38532
|
+
function armasm(Prism) {
|
|
38533
|
+
Prism.languages.armasm = {
|
|
38534
|
+
comment: {
|
|
38535
|
+
pattern: /;.*/,
|
|
38536
|
+
greedy: true
|
|
38537
|
+
},
|
|
38538
|
+
string: {
|
|
38539
|
+
pattern: /"(?:[^"\r\n]|"")*"/,
|
|
38540
|
+
greedy: true,
|
|
38541
|
+
inside: {
|
|
38542
|
+
variable: {
|
|
38543
|
+
pattern: /((?:^|[^$])(?:\${2})*)\$\w+/,
|
|
38544
|
+
lookbehind: true
|
|
38545
|
+
}
|
|
38546
|
+
}
|
|
38547
|
+
},
|
|
38548
|
+
char: {
|
|
38549
|
+
pattern: /'(?:[^'\r\n]{0,4}|'')'/,
|
|
38550
|
+
greedy: true
|
|
38551
|
+
},
|
|
38552
|
+
'version-symbol': {
|
|
38553
|
+
pattern: /\|[\w@]+\|/,
|
|
38554
|
+
greedy: true,
|
|
38555
|
+
alias: 'property'
|
|
38556
|
+
},
|
|
38557
|
+
boolean: /\b(?:FALSE|TRUE)\b/,
|
|
38558
|
+
directive: {
|
|
38559
|
+
pattern:
|
|
38560
|
+
/\b(?:ALIAS|ALIGN|AREA|ARM|ASSERT|ATTR|CN|CODE|CODE16|CODE32|COMMON|CP|DATA|DCB|DCD|DCDO|DCDU|DCFD|DCFDU|DCI|DCQ|DCQU|DCW|DCWU|DN|ELIF|ELSE|END|ENDFUNC|ENDIF|ENDP|ENTRY|EQU|EXPORT|EXPORTAS|EXTERN|FIELD|FILL|FN|FUNCTION|GBLA|GBLL|GBLS|GET|GLOBAL|IF|IMPORT|INCBIN|INCLUDE|INFO|KEEP|LCLA|LCLL|LCLS|LTORG|MACRO|MAP|MEND|MEXIT|NOFP|OPT|PRESERVE8|PROC|QN|READONLY|RELOC|REQUIRE|REQUIRE8|RLIST|ROUT|SETA|SETL|SETS|SN|SPACE|SUBT|THUMB|THUMBX|TTL|WEND|WHILE)\b/,
|
|
38561
|
+
alias: 'property'
|
|
38562
|
+
},
|
|
38563
|
+
instruction: {
|
|
38564
|
+
pattern:
|
|
38565
|
+
/((?:^|(?:^|[^\\])(?:\r\n?|\n))[ \t]*(?:(?:[A-Z][A-Z0-9_]*[a-z]\w*|[a-z]\w*|\d+)[ \t]+)?)\b[A-Z.]+\b/,
|
|
38566
|
+
lookbehind: true,
|
|
38567
|
+
alias: 'keyword'
|
|
38568
|
+
},
|
|
38569
|
+
variable: /\$\w+/,
|
|
38570
|
+
number:
|
|
38571
|
+
/(?:\b[2-9]_\d+|(?:\b\d+(?:\.\d+)?|\B\.\d+)(?:e-?\d+)?|\b0(?:[fd]_|x)[0-9a-f]+|&[0-9a-f]+)\b/i,
|
|
38572
|
+
register: {
|
|
38573
|
+
pattern: /\b(?:r\d|lr)\b/,
|
|
38574
|
+
alias: 'symbol'
|
|
38575
|
+
},
|
|
38576
|
+
operator: /<>|<<|>>|&&|\|\||[=!<>/]=?|[+\-*%#?&|^]|:[A-Z]+:/,
|
|
38577
|
+
punctuation: /[()[\],]/
|
|
38578
|
+
}
|
|
38579
|
+
Prism.languages['arm-asm'] = Prism.languages.armasm
|
|
38580
|
+
}
|
|
38581
|
+
|
|
38582
|
+
;// CONCATENATED MODULE: ./node_modules/refractor/lang/arturo.js
|
|
38583
|
+
// @ts-nocheck
|
|
38584
|
+
arturo.displayName = 'arturo'
|
|
38585
|
+
arturo.aliases = ['art']
|
|
38586
|
+
|
|
38587
|
+
/** @type {import('../core.js').Syntax} */
|
|
38588
|
+
function arturo(Prism) {
|
|
38589
|
+
;(function (Prism) {
|
|
38590
|
+
/**
|
|
38591
|
+
* @param {string} lang
|
|
38592
|
+
* @param {string} pattern
|
|
38593
|
+
*/
|
|
38594
|
+
var createLanguageString = function (lang, pattern) {
|
|
38595
|
+
return {
|
|
38596
|
+
pattern: RegExp(
|
|
38597
|
+
/\{!/.source + '(?:' + (pattern || lang) + ')' + /$[\s\S]*\}/.source,
|
|
38598
|
+
'm'
|
|
38599
|
+
),
|
|
38600
|
+
greedy: true,
|
|
38601
|
+
inside: {
|
|
38602
|
+
embedded: {
|
|
38603
|
+
pattern: /(^\{!\w+\b)[\s\S]+(?=\}$)/,
|
|
38604
|
+
lookbehind: true,
|
|
38605
|
+
alias: 'language-' + lang,
|
|
38606
|
+
inside: Prism.languages[lang]
|
|
38607
|
+
},
|
|
38608
|
+
string: /[\s\S]+/
|
|
38609
|
+
}
|
|
38610
|
+
}
|
|
38611
|
+
}
|
|
38612
|
+
Prism.languages.arturo = {
|
|
38613
|
+
comment: {
|
|
38614
|
+
pattern: /;.*/,
|
|
38615
|
+
greedy: true
|
|
38616
|
+
},
|
|
38617
|
+
character: {
|
|
38618
|
+
pattern: /`.`/,
|
|
38619
|
+
alias: 'char',
|
|
38620
|
+
greedy: true
|
|
38621
|
+
},
|
|
38622
|
+
number: {
|
|
38623
|
+
pattern: /\b\d+(?:\.\d+(?:\.\d+(?:-[\w+-]+)?)?)?\b/
|
|
38624
|
+
},
|
|
38625
|
+
string: {
|
|
38626
|
+
pattern: /"(?:[^"\\\r\n]|\\.)*"/,
|
|
38627
|
+
greedy: true
|
|
38628
|
+
},
|
|
38629
|
+
regex: {
|
|
38630
|
+
pattern: /\{\/.*?\/\}/,
|
|
38631
|
+
greedy: true
|
|
38632
|
+
},
|
|
38633
|
+
'html-string': createLanguageString('html'),
|
|
38634
|
+
'css-string': createLanguageString('css'),
|
|
38635
|
+
'js-string': createLanguageString('js'),
|
|
38636
|
+
'md-string': createLanguageString('md'),
|
|
38637
|
+
'sql-string': createLanguageString('sql'),
|
|
38638
|
+
'sh-string': createLanguageString('shell', 'sh'),
|
|
38639
|
+
multistring: {
|
|
38640
|
+
pattern: /».*|\{:[\s\S]*?:\}|\{[\s\S]*?\}|^-{6}$[\s\S]*/m,
|
|
38641
|
+
alias: 'string',
|
|
38642
|
+
greedy: true
|
|
38643
|
+
},
|
|
38644
|
+
label: {
|
|
38645
|
+
pattern: /\w+\b\??:/,
|
|
38646
|
+
alias: 'property'
|
|
38647
|
+
},
|
|
38648
|
+
literal: {
|
|
38649
|
+
pattern: /'(?:\w+\b\??:?)/,
|
|
38650
|
+
alias: 'constant'
|
|
38651
|
+
},
|
|
38652
|
+
type: {
|
|
38653
|
+
pattern: /:(?:\w+\b\??:?)/,
|
|
38654
|
+
alias: 'class-name'
|
|
38655
|
+
},
|
|
38656
|
+
color: /#\w+/,
|
|
38657
|
+
predicate: {
|
|
38658
|
+
pattern:
|
|
38659
|
+
/\b(?:all|and|any|ascii|attr|attribute|attributeLabel|binary|block|char|contains|database|date|dictionary|empty|equal|even|every|exists|false|floating|function|greater|greaterOrEqual|if|in|inline|integer|is|key|label|leap|less|lessOrEqual|literal|logical|lower|nand|negative|nor|not|notEqual|null|numeric|odd|or|path|pathLabel|positive|prefix|prime|regex|same|set|some|sorted|standalone|string|subset|suffix|superset|symbol|symbolLiteral|true|try|type|unless|upper|when|whitespace|word|xnor|xor|zero)\?/,
|
|
38660
|
+
alias: 'keyword'
|
|
38661
|
+
},
|
|
38662
|
+
'builtin-function': {
|
|
38663
|
+
pattern:
|
|
38664
|
+
/\b(?:abs|acos|acosh|acsec|acsech|actan|actanh|add|after|alert|alias|and|angle|append|arg|args|arity|array|as|asec|asech|asin|asinh|atan|atan2|atanh|attr|attrs|average|before|benchmark|blend|break|call|capitalize|case|ceil|chop|clear|clip|close|color|combine|conj|continue|copy|cos|cosh|crc|csec|csech|ctan|ctanh|cursor|darken|dec|decode|define|delete|desaturate|deviation|dialog|dictionary|difference|digest|digits|div|do|download|drop|dup|e|else|empty|encode|ensure|env|escape|execute|exit|exp|extend|extract|factors|fdiv|filter|first|flatten|floor|fold|from|function|gamma|gcd|get|goto|hash|hypot|if|inc|indent|index|infinity|info|input|insert|inspect|intersection|invert|jaro|join|keys|kurtosis|last|let|levenshtein|lighten|list|ln|log|loop|lower|mail|map|match|max|median|min|mod|module|mul|nand|neg|new|nor|normalize|not|now|null|open|or|outdent|pad|palette|panic|path|pause|permissions|permutate|pi|pop|popup|pow|powerset|powmod|prefix|print|prints|process|product|query|random|range|read|relative|remove|rename|render|repeat|replace|request|return|reverse|round|sample|saturate|script|sec|sech|select|serve|set|shl|shr|shuffle|sin|sinh|size|skewness|slice|sort|spin|split|sqrt|squeeze|stack|strip|sub|suffix|sum|switch|symbols|symlink|sys|take|tan|tanh|terminal|terminate|to|truncate|try|type|unclip|union|unique|unless|until|unzip|upper|values|var|variance|volume|webview|while|with|wordwrap|write|xnor|xor|zip)\b/,
|
|
38665
|
+
alias: 'keyword'
|
|
38666
|
+
},
|
|
38667
|
+
sugar: {
|
|
38668
|
+
pattern: /->|=>|\||::/,
|
|
38669
|
+
alias: 'operator'
|
|
38670
|
+
},
|
|
38671
|
+
punctuation: /[()[\],]/,
|
|
38672
|
+
symbol: {
|
|
38673
|
+
pattern: /<:|-:|ø|@|#|\+|\||\*|\$|---|-|%|\/|\.\.|\^|~|=|<|>|\\/
|
|
38674
|
+
},
|
|
38675
|
+
boolean: {
|
|
38676
|
+
pattern: /\b(?:false|maybe|true)\b/
|
|
38677
|
+
}
|
|
38678
|
+
}
|
|
38679
|
+
Prism.languages.art = Prism.languages['arturo']
|
|
38680
|
+
})(Prism)
|
|
38681
|
+
}
|
|
38682
|
+
|
|
39063
38683
|
;// CONCATENATED MODULE: ./node_modules/refractor/lang/asciidoc.js
|
|
39064
38684
|
// @ts-nocheck
|
|
39065
38685
|
asciidoc.displayName = 'asciidoc'
|
|
@@ -39442,7 +39062,7 @@ function asmatmel(Prism) {
|
|
|
39442
39062
|
pattern: /\b[acznvshtixy]\b/i,
|
|
39443
39063
|
alias: 'variable'
|
|
39444
39064
|
},
|
|
39445
|
-
operator:
|
|
39065
|
+
operator: />>=?|<<=?|&[&=]?|\|[\|=]?|[-+*/%^!=<>?]=?/,
|
|
39446
39066
|
punctuation: /[(),:]/
|
|
39447
39067
|
}
|
|
39448
39068
|
}
|
|
@@ -39479,16 +39099,21 @@ function autohotkey(Prism) {
|
|
|
39479
39099
|
operator:
|
|
39480
39100
|
/\?|\/\/?=?|:=|\|[=|]?|&[=&]?|\+[=+]?|-[=-]?|\*[=*]?|<(?:<=?|>|=)?|>>?=?|[.^!=~]=?|\b(?:AND|NOT|OR)\b/,
|
|
39481
39101
|
boolean: /\b(?:false|true)\b/,
|
|
39482
|
-
|
|
39483
|
-
|
|
39102
|
+
command: {
|
|
39103
|
+
pattern:
|
|
39104
|
+
/\b(?:AutoTrim|BlockInput|Break|Click|ClipWait|Continue|Control|ControlClick|ControlFocus|ControlGet|ControlGetFocus|ControlGetPos|ControlGetText|ControlMove|ControlSend|ControlSendRaw|ControlSetText|CoordMode|Critical|DetectHiddenText|DetectHiddenWindows|Drive|DriveGet|DriveSpaceFree|EnvAdd|EnvDiv|EnvGet|EnvMult|EnvSet|EnvSub|EnvUpdate|Exit|ExitApp|FileAppend|FileCopy|FileCopyDir|FileCreateDir|FileCreateShortcut|FileDelete|FileEncoding|FileGetAttrib|FileGetShortcut|FileGetSize|FileGetTime|FileGetVersion|FileInstall|FileMove|FileMoveDir|FileRead|FileReadLine|FileRecycle|FileRecycleEmpty|FileRemoveDir|FileSelectFile|FileSelectFolder|FileSetAttrib|FileSetTime|FormatTime|GetKeyState|Gosub|Goto|GroupActivate|GroupAdd|GroupClose|GroupDeactivate|Gui|GuiControl|GuiControlGet|Hotkey|ImageSearch|IniDelete|IniRead|IniWrite|Input|InputBox|KeyWait|ListHotkeys|ListLines|ListVars|Loop|Menu|MouseClick|MouseClickDrag|MouseGetPos|MouseMove|MsgBox|OnExit|OutputDebug|Pause|PixelGetColor|PixelSearch|PostMessage|Process|Progress|Random|RegDelete|RegRead|RegWrite|Reload|Repeat|Return|Run|RunAs|RunWait|Send|SendEvent|SendInput|SendMessage|SendMode|SendPlay|SendRaw|SetBatchLines|SetCapslockState|SetControlDelay|SetDefaultMouseSpeed|SetEnv|SetFormat|SetKeyDelay|SetMouseDelay|SetNumlockState|SetRegView|SetScrollLockState|SetStoreCapslockMode|SetTimer|SetTitleMatchMode|SetWinDelay|SetWorkingDir|Shutdown|Sleep|Sort|SoundBeep|SoundGet|SoundGetWaveVolume|SoundPlay|SoundSet|SoundSetWaveVolume|SplashImage|SplashTextOff|SplashTextOn|SplitPath|StatusBarGetText|StatusBarWait|StringCaseSense|StringGetPos|StringLeft|StringLen|StringLower|StringMid|StringReplace|StringRight|StringSplit|StringTrimLeft|StringTrimRight|StringUpper|Suspend|SysGet|Thread|ToolTip|Transform|TrayTip|URLDownloadToFile|WinActivate|WinActivateBottom|WinClose|WinGet|WinGetActiveStats|WinGetActiveTitle|WinGetClass|WinGetPos|WinGetText|WinGetTitle|WinHide|WinKill|WinMaximize|WinMenuSelectItem|WinMinimize|WinMinimizeAll|WinMinimizeAllUndo|WinMove|WinRestore|WinSet|WinSetTitle|WinShow|WinWait|WinWaitActive|WinWaitClose|WinWaitNotActive)\b/i,
|
|
39105
|
+
alias: 'selector'
|
|
39106
|
+
},
|
|
39484
39107
|
constant:
|
|
39485
39108
|
/\b(?:a_ahkpath|a_ahkversion|a_appdata|a_appdatacommon|a_autotrim|a_batchlines|a_caretx|a_carety|a_computername|a_controldelay|a_cursor|a_dd|a_ddd|a_dddd|a_defaultmousespeed|a_desktop|a_desktopcommon|a_detecthiddentext|a_detecthiddenwindows|a_endchar|a_eventinfo|a_exitreason|a_fileencoding|a_formatfloat|a_formatinteger|a_gui|a_guicontrol|a_guicontrolevent|a_guievent|a_guiheight|a_guiwidth|a_guix|a_guiy|a_hour|a_iconfile|a_iconhidden|a_iconnumber|a_icontip|a_index|a_ipaddress1|a_ipaddress2|a_ipaddress3|a_ipaddress4|a_is64bitos|a_isadmin|a_iscompiled|a_iscritical|a_ispaused|a_issuspended|a_isunicode|a_keydelay|a_language|a_lasterror|a_linefile|a_linenumber|a_loopfield|a_loopfileattrib|a_loopfiledir|a_loopfileext|a_loopfilefullpath|a_loopfilelongpath|a_loopfilename|a_loopfileshortname|a_loopfileshortpath|a_loopfilesize|a_loopfilesizekb|a_loopfilesizemb|a_loopfiletimeaccessed|a_loopfiletimecreated|a_loopfiletimemodified|a_loopreadline|a_loopregkey|a_loopregname|a_loopregsubkey|a_loopregtimemodified|a_loopregtype|a_mday|a_min|a_mm|a_mmm|a_mmmm|a_mon|a_mousedelay|a_msec|a_mydocuments|a_now|a_nowutc|a_numbatchlines|a_ostype|a_osversion|a_priorhotkey|a_priorkey|a_programfiles|a_programs|a_programscommon|a_ptrsize|a_regview|a_screendpi|a_screenheight|a_screenwidth|a_scriptdir|a_scriptfullpath|a_scripthwnd|a_scriptname|a_sec|a_space|a_startmenu|a_startmenucommon|a_startup|a_startupcommon|a_stringcasesense|a_tab|a_temp|a_thisfunc|a_thishotkey|a_thislabel|a_thismenu|a_thismenuitem|a_thismenuitempos|a_tickcount|a_timeidle|a_timeidlephysical|a_timesincepriorhotkey|a_timesincethishotkey|a_titlematchmode|a_titlematchmodespeed|a_username|a_wday|a_windelay|a_windir|a_workingdir|a_yday|a_year|a_yweek|a_yyyy|clipboard|clipboardall|comspec|errorlevel|programfiles)\b/i,
|
|
39486
39109
|
builtin:
|
|
39487
39110
|
/\b(?:abs|acos|asc|asin|atan|ceil|chr|class|comobjactive|comobjarray|comobjconnect|comobjcreate|comobjerror|comobjflags|comobjget|comobjquery|comobjtype|comobjvalue|cos|dllcall|exp|fileexist|Fileopen|floor|format|il_add|il_create|il_destroy|instr|isfunc|islabel|IsObject|ln|log|ltrim|lv_add|lv_delete|lv_deletecol|lv_getcount|lv_getnext|lv_gettext|lv_insert|lv_insertcol|lv_modify|lv_modifycol|lv_setimagelist|mod|numget|numput|onmessage|regexmatch|regexreplace|registercallback|round|rtrim|sb_seticon|sb_setparts|sb_settext|sin|sqrt|strlen|strreplace|strsplit|substr|tan|tv_add|tv_delete|tv_get|tv_getchild|tv_getcount|tv_getnext|tv_getparent|tv_getprev|tv_getselection|tv_gettext|tv_modify|varsetcapacity|winactive|winexist|__Call|__Get|__New|__Set)\b/i,
|
|
39488
39111
|
symbol:
|
|
39489
39112
|
/\b(?:alt|altdown|altup|appskey|backspace|browser_back|browser_favorites|browser_forward|browser_home|browser_refresh|browser_search|browser_stop|bs|capslock|ctrl|ctrlbreak|ctrldown|ctrlup|del|delete|down|end|enter|esc|escape|f1|f10|f11|f12|f13|f14|f15|f16|f17|f18|f19|f2|f20|f21|f22|f23|f24|f3|f4|f5|f6|f7|f8|f9|home|ins|insert|joy1|joy10|joy11|joy12|joy13|joy14|joy15|joy16|joy17|joy18|joy19|joy2|joy20|joy21|joy22|joy23|joy24|joy25|joy26|joy27|joy28|joy29|joy3|joy30|joy31|joy32|joy4|joy5|joy6|joy7|joy8|joy9|joyaxes|joybuttons|joyinfo|joyname|joypov|joyr|joyu|joyv|joyx|joyy|joyz|lalt|launch_app1|launch_app2|launch_mail|launch_media|lbutton|lcontrol|lctrl|left|lshift|lwin|lwindown|lwinup|mbutton|media_next|media_play_pause|media_prev|media_stop|numlock|numpad0|numpad1|numpad2|numpad3|numpad4|numpad5|numpad6|numpad7|numpad8|numpad9|numpadadd|numpadclear|numpaddel|numpaddiv|numpaddot|numpaddown|numpadend|numpadenter|numpadhome|numpadins|numpadleft|numpadmult|numpadpgdn|numpadpgup|numpadright|numpadsub|numpadup|pgdn|pgup|printscreen|ralt|rbutton|rcontrol|rctrl|right|rshift|rwin|rwindown|rwinup|scrolllock|shift|shiftdown|shiftup|space|tab|up|volume_down|volume_mute|volume_up|wheeldown|wheelleft|wheelright|wheelup|xbutton1|xbutton2)\b/i,
|
|
39490
|
-
|
|
39491
|
-
|
|
39113
|
+
directive: {
|
|
39114
|
+
pattern: /#[a-z]+\b/i,
|
|
39115
|
+
alias: 'important'
|
|
39116
|
+
},
|
|
39492
39117
|
keyword:
|
|
39493
39118
|
/\b(?:Abort|AboveNormal|Add|ahk_class|ahk_exe|ahk_group|ahk_id|ahk_pid|All|Alnum|Alpha|AltSubmit|AltTab|AltTabAndMenu|AltTabMenu|AltTabMenuDismiss|AlwaysOnTop|AutoSize|Background|BackgroundTrans|BelowNormal|between|BitAnd|BitNot|BitOr|BitShiftLeft|BitShiftRight|BitXOr|Bold|Border|Button|ByRef|Catch|Checkbox|Checked|CheckedGray|Choose|ChooseString|Close|Color|ComboBox|Contains|ControlList|Count|Date|DateTime|Days|DDL|Default|DeleteAll|Delimiter|Deref|Destroy|Digit|Disable|Disabled|DropDownList|Edit|Eject|Else|Enable|Enabled|Error|Exist|Expand|ExStyle|FileSystem|Finally|First|Flash|Float|FloatFast|Focus|Font|for|global|Grid|Group|GroupBox|GuiClose|GuiContextMenu|GuiDropFiles|GuiEscape|GuiSize|Hdr|Hidden|Hide|High|HKCC|HKCR|HKCU|HKEY_CLASSES_ROOT|HKEY_CURRENT_CONFIG|HKEY_CURRENT_USER|HKEY_LOCAL_MACHINE|HKEY_USERS|HKLM|HKU|Hours|HScroll|Icon|IconSmall|ID|IDLast|If|IfEqual|IfExist|IfGreater|IfGreaterOrEqual|IfInString|IfLess|IfLessOrEqual|IfMsgBox|IfNotEqual|IfNotExist|IfNotInString|IfWinActive|IfWinExist|IfWinNotActive|IfWinNotExist|Ignore|ImageList|in|Integer|IntegerFast|Interrupt|is|italic|Join|Label|LastFound|LastFoundExist|Limit|Lines|List|ListBox|ListView|local|Lock|Logoff|Low|Lower|Lowercase|MainWindow|Margin|Maximize|MaximizeBox|MaxSize|Minimize|MinimizeBox|MinMax|MinSize|Minutes|MonthCal|Mouse|Move|Multi|NA|No|NoActivate|NoDefault|NoHide|NoIcon|NoMainWindow|norm|Normal|NoSort|NoSortHdr|NoStandard|Not|NoTab|NoTimers|Number|Off|Ok|On|OwnDialogs|Owner|Parse|Password|Picture|Pixel|Pos|Pow|Priority|ProcessName|Radio|Range|Read|ReadOnly|Realtime|Redraw|Region|REG_BINARY|REG_DWORD|REG_EXPAND_SZ|REG_MULTI_SZ|REG_SZ|Relative|Rename|Report|Resize|Restore|Retry|RGB|Screen|Seconds|Section|Serial|SetLabel|ShiftAltTab|Show|Single|Slider|SortDesc|Standard|static|Status|StatusBar|StatusCD|strike|Style|Submit|SysMenu|Tab2|TabStop|Text|Theme|Throw|Tile|ToggleCheck|ToggleEnable|ToolWindow|Top|Topmost|TransColor|Transparent|Tray|TreeView|Try|TryAgain|Type|UnCheck|underline|Unicode|Unlock|Until|UpDown|Upper|Uppercase|UseErrorLevel|Vis|VisFirst|Visible|VScroll|Wait|WaitClose|WantCtrlA|WantF2|WantReturn|While|Wrap|Xdigit|xm|xp|xs|Yes|ym|yp|ys)\b/i,
|
|
39494
39119
|
function: /[^(); \t,\n+*\-=?>:\\\/<&%\[\]]+(?=\()/,
|
|
@@ -39768,6 +39393,44 @@ function avroIdl(Prism) {
|
|
|
39768
39393
|
Prism.languages.avdl = Prism.languages['avro-idl']
|
|
39769
39394
|
}
|
|
39770
39395
|
|
|
39396
|
+
;// CONCATENATED MODULE: ./node_modules/refractor/lang/awk.js
|
|
39397
|
+
// @ts-nocheck
|
|
39398
|
+
awk.displayName = 'awk'
|
|
39399
|
+
awk.aliases = ['gawk']
|
|
39400
|
+
|
|
39401
|
+
/** @type {import('../core.js').Syntax} */
|
|
39402
|
+
function awk(Prism) {
|
|
39403
|
+
Prism.languages.awk = {
|
|
39404
|
+
hashbang: {
|
|
39405
|
+
pattern: /^#!.*/,
|
|
39406
|
+
greedy: true,
|
|
39407
|
+
alias: 'comment'
|
|
39408
|
+
},
|
|
39409
|
+
comment: {
|
|
39410
|
+
pattern: /#.*/,
|
|
39411
|
+
greedy: true
|
|
39412
|
+
},
|
|
39413
|
+
string: {
|
|
39414
|
+
pattern: /(^|[^\\])"(?:[^\\"\r\n]|\\.)*"/,
|
|
39415
|
+
lookbehind: true,
|
|
39416
|
+
greedy: true
|
|
39417
|
+
},
|
|
39418
|
+
regex: {
|
|
39419
|
+
pattern: /((?:^|[^\w\s)])\s*)\/(?:[^\/\\\r\n]|\\.)*\//,
|
|
39420
|
+
lookbehind: true,
|
|
39421
|
+
greedy: true
|
|
39422
|
+
},
|
|
39423
|
+
variable: /\$\w+/,
|
|
39424
|
+
keyword:
|
|
39425
|
+
/\b(?:BEGIN|BEGINFILE|END|ENDFILE|break|case|continue|default|delete|do|else|exit|for|function|getline|if|in|next|nextfile|printf?|return|switch|while)\b|@(?:include|load)\b/,
|
|
39426
|
+
function: /\b[a-z_]\w*(?=\s*\()/i,
|
|
39427
|
+
number: /\b(?:\d+(?:\.\d+)?(?:e[+-]?\d+)?|0x[a-fA-F0-9]+)\b/,
|
|
39428
|
+
operator: /--|\+\+|!?~|>&|>>|<<|(?:\*\*|[<>!=+\-*/%^])=?|&&|\|[|&]|[?:]/,
|
|
39429
|
+
punctuation: /[()[\]{},;]/
|
|
39430
|
+
}
|
|
39431
|
+
Prism.languages.gawk = Prism.languages.awk
|
|
39432
|
+
}
|
|
39433
|
+
|
|
39771
39434
|
;// CONCATENATED MODULE: ./node_modules/refractor/lang/batch.js
|
|
39772
39435
|
// @ts-nocheck
|
|
39773
39436
|
batch.displayName = 'batch'
|
|
@@ -40345,7 +40008,7 @@ function cfscript(Prism) {
|
|
|
40345
40008
|
keyword:
|
|
40346
40009
|
/\b(?:abstract|break|catch|component|continue|default|do|else|extends|final|finally|for|function|if|in|include|package|private|property|public|remote|required|rethrow|return|static|switch|throw|try|var|while|xml)\b(?!\s*=)/,
|
|
40347
40010
|
operator: [
|
|
40348
|
-
/\+\+|--|&&|\|\||::|=>|[!=]
|
|
40011
|
+
/\+\+|--|&&|\|\||::|=>|[!=]==|[-+*/%&|^!=<>]=?|\?(?:\.|:)?|:/,
|
|
40349
40012
|
/\b(?:and|contains|eq|equal|eqv|gt|gte|imp|is|lt|lte|mod|not|or|xor)\b/
|
|
40350
40013
|
],
|
|
40351
40014
|
scope: {
|
|
@@ -40538,9 +40201,9 @@ function cmake(Prism) {
|
|
|
40538
40201
|
}
|
|
40539
40202
|
},
|
|
40540
40203
|
variable:
|
|
40541
|
-
/\b(?:CMAKE_\w+|\w+_(?:(?:BINARY|SOURCE)_DIR|DESCRIPTION|HOMEPAGE_URL|ROOT|VERSION(?:_MAJOR|_MINOR|_PATCH|_TWEAK)?)|(?:ANDROID|APPLE|BORLAND|BUILD_SHARED_LIBS|CACHE|CPACK_(?:ABSOLUTE_DESTINATION_FILES|COMPONENT_INCLUDE_TOPLEVEL_DIRECTORY|ERROR_ON_ABSOLUTE_INSTALL_DESTINATION|INCLUDE_TOPLEVEL_DIRECTORY|INSTALL_DEFAULT_DIRECTORY_PERMISSIONS|INSTALL_SCRIPT|PACKAGING_INSTALL_PREFIX|SET_DESTDIR|WARN_ON_ABSOLUTE_INSTALL_DESTINATION)|CTEST_(?:BINARY_DIRECTORY|BUILD_COMMAND|BUILD_NAME|BZR_COMMAND|BZR_UPDATE_OPTIONS|CHANGE_ID|CHECKOUT_COMMAND|CONFIGURATION_TYPE|CONFIGURE_COMMAND|COVERAGE_COMMAND|COVERAGE_EXTRA_FLAGS|CURL_OPTIONS|CUSTOM_(?:COVERAGE_EXCLUDE|ERROR_EXCEPTION|ERROR_MATCH|ERROR_POST_CONTEXT|ERROR_PRE_CONTEXT|MAXIMUM_FAILED_TEST_OUTPUT_SIZE|MAXIMUM_NUMBER_OF_(?:ERRORS|WARNINGS)|MAXIMUM_PASSED_TEST_OUTPUT_SIZE|MEMCHECK_IGNORE|POST_MEMCHECK|POST_TEST|PRE_MEMCHECK|PRE_TEST|TESTS_IGNORE|WARNING_EXCEPTION|WARNING_MATCH)|CVS_CHECKOUT|CVS_COMMAND|CVS_UPDATE_OPTIONS|DROP_LOCATION|DROP_METHOD|DROP_SITE|DROP_SITE_CDASH|DROP_SITE_PASSWORD|DROP_SITE_USER|EXTRA_COVERAGE_GLOB|GIT_COMMAND|GIT_INIT_SUBMODULES|GIT_UPDATE_CUSTOM|GIT_UPDATE_OPTIONS|HG_COMMAND|HG_UPDATE_OPTIONS|LABELS_FOR_SUBPROJECTS|MEMORYCHECK_(?:COMMAND|COMMAND_OPTIONS|SANITIZER_OPTIONS|SUPPRESSIONS_FILE|TYPE)|NIGHTLY_START_TIME|P4_CLIENT|P4_COMMAND|P4_OPTIONS|P4_UPDATE_OPTIONS|RUN_CURRENT_SCRIPT|SCP_COMMAND|SITE|SOURCE_DIRECTORY|SUBMIT_URL|SVN_COMMAND|SVN_OPTIONS|SVN_UPDATE_OPTIONS|TEST_LOAD|TEST_TIMEOUT|TRIGGER_SITE|UPDATE_COMMAND|UPDATE_OPTIONS|UPDATE_VERSION_ONLY|USE_LAUNCHERS)|CYGWIN|ENV|EXECUTABLE_OUTPUT_PATH|GHS-MULTI|IOS|LIBRARY_OUTPUT_PATH|MINGW|MSVC(?:10|11|12|14|60|70|71|80|90|_IDE|_TOOLSET_VERSION|_VERSION)?|MSYS|
|
|
40204
|
+
/\b(?:CMAKE_\w+|\w+_(?:(?:BINARY|SOURCE)_DIR|DESCRIPTION|HOMEPAGE_URL|ROOT|VERSION(?:_MAJOR|_MINOR|_PATCH|_TWEAK)?)|(?:ANDROID|APPLE|BORLAND|BUILD_SHARED_LIBS|CACHE|CPACK_(?:ABSOLUTE_DESTINATION_FILES|COMPONENT_INCLUDE_TOPLEVEL_DIRECTORY|ERROR_ON_ABSOLUTE_INSTALL_DESTINATION|INCLUDE_TOPLEVEL_DIRECTORY|INSTALL_DEFAULT_DIRECTORY_PERMISSIONS|INSTALL_SCRIPT|PACKAGING_INSTALL_PREFIX|SET_DESTDIR|WARN_ON_ABSOLUTE_INSTALL_DESTINATION)|CTEST_(?:BINARY_DIRECTORY|BUILD_COMMAND|BUILD_NAME|BZR_COMMAND|BZR_UPDATE_OPTIONS|CHANGE_ID|CHECKOUT_COMMAND|CONFIGURATION_TYPE|CONFIGURE_COMMAND|COVERAGE_COMMAND|COVERAGE_EXTRA_FLAGS|CURL_OPTIONS|CUSTOM_(?:COVERAGE_EXCLUDE|ERROR_EXCEPTION|ERROR_MATCH|ERROR_POST_CONTEXT|ERROR_PRE_CONTEXT|MAXIMUM_FAILED_TEST_OUTPUT_SIZE|MAXIMUM_NUMBER_OF_(?:ERRORS|WARNINGS)|MAXIMUM_PASSED_TEST_OUTPUT_SIZE|MEMCHECK_IGNORE|POST_MEMCHECK|POST_TEST|PRE_MEMCHECK|PRE_TEST|TESTS_IGNORE|WARNING_EXCEPTION|WARNING_MATCH)|CVS_CHECKOUT|CVS_COMMAND|CVS_UPDATE_OPTIONS|DROP_LOCATION|DROP_METHOD|DROP_SITE|DROP_SITE_CDASH|DROP_SITE_PASSWORD|DROP_SITE_USER|EXTRA_COVERAGE_GLOB|GIT_COMMAND|GIT_INIT_SUBMODULES|GIT_UPDATE_CUSTOM|GIT_UPDATE_OPTIONS|HG_COMMAND|HG_UPDATE_OPTIONS|LABELS_FOR_SUBPROJECTS|MEMORYCHECK_(?:COMMAND|COMMAND_OPTIONS|SANITIZER_OPTIONS|SUPPRESSIONS_FILE|TYPE)|NIGHTLY_START_TIME|P4_CLIENT|P4_COMMAND|P4_OPTIONS|P4_UPDATE_OPTIONS|RUN_CURRENT_SCRIPT|SCP_COMMAND|SITE|SOURCE_DIRECTORY|SUBMIT_URL|SVN_COMMAND|SVN_OPTIONS|SVN_UPDATE_OPTIONS|TEST_LOAD|TEST_TIMEOUT|TRIGGER_SITE|UPDATE_COMMAND|UPDATE_OPTIONS|UPDATE_VERSION_ONLY|USE_LAUNCHERS)|CYGWIN|ENV|EXECUTABLE_OUTPUT_PATH|GHS-MULTI|IOS|LIBRARY_OUTPUT_PATH|MINGW|MSVC(?:10|11|12|14|60|70|71|80|90|_IDE|_TOOLSET_VERSION|_VERSION)?|MSYS|PROJECT_NAME|UNIX|WIN32|WINCE|WINDOWS_PHONE|WINDOWS_STORE|XCODE))\b/,
|
|
40542
40205
|
property:
|
|
40543
|
-
/\b(?:cxx_\w+|(?:ARCHIVE_OUTPUT_(?:DIRECTORY|NAME)|COMPILE_DEFINITIONS|COMPILE_PDB_NAME|COMPILE_PDB_OUTPUT_DIRECTORY|EXCLUDE_FROM_DEFAULT_BUILD|IMPORTED_(?:IMPLIB|LIBNAME|LINK_DEPENDENT_LIBRARIES|LINK_INTERFACE_LANGUAGES|LINK_INTERFACE_LIBRARIES|LINK_INTERFACE_MULTIPLICITY|LOCATION|NO_SONAME|OBJECTS|SONAME)|INTERPROCEDURAL_OPTIMIZATION|LIBRARY_OUTPUT_DIRECTORY|LIBRARY_OUTPUT_NAME|LINK_FLAGS|LINK_INTERFACE_LIBRARIES|LINK_INTERFACE_MULTIPLICITY|LOCATION|MAP_IMPORTED_CONFIG|OSX_ARCHITECTURES|OUTPUT_NAME|PDB_NAME|PDB_OUTPUT_DIRECTORY|RUNTIME_OUTPUT_DIRECTORY|RUNTIME_OUTPUT_NAME|STATIC_LIBRARY_FLAGS|VS_CSHARP|VS_DOTNET_REFERENCEPROP|VS_DOTNET_REFERENCE|VS_GLOBAL_SECTION_POST|VS_GLOBAL_SECTION_PRE|VS_GLOBAL|XCODE_ATTRIBUTE)_\w+|\w+_(?:CLANG_TIDY|COMPILER_LAUNCHER|CPPCHECK|CPPLINT|INCLUDE_WHAT_YOU_USE|OUTPUT_NAME|POSTFIX|VISIBILITY_PRESET)|ABSTRACT|ADDITIONAL_MAKE_CLEAN_FILES|ADVANCED|ALIASED_TARGET|ALLOW_DUPLICATE_CUSTOM_TARGETS|ANDROID_(?:ANT_ADDITIONAL_OPTIONS|API|API_MIN|ARCH|ASSETS_DIRECTORIES|GUI|JAR_DEPENDENCIES|NATIVE_LIB_DEPENDENCIES|NATIVE_LIB_DIRECTORIES|PROCESS_MAX|PROGUARD|PROGUARD_CONFIG_PATH|SECURE_PROPS_PATH|SKIP_ANT_STEP|STL_TYPE)|ARCHIVE_OUTPUT_DIRECTORY|ATTACHED_FILES|ATTACHED_FILES_ON_FAIL|AUTOGEN_(?:BUILD_DIR|ORIGIN_DEPENDS|PARALLEL|SOURCE_GROUP|TARGETS_FOLDER|TARGET_DEPENDS)|AUTOMOC|AUTOMOC_(?:COMPILER_PREDEFINES|DEPEND_FILTERS|EXECUTABLE|MACRO_NAMES|MOC_OPTIONS|SOURCE_GROUP|TARGETS_FOLDER)|AUTORCC|AUTORCC_EXECUTABLE|AUTORCC_OPTIONS|AUTORCC_SOURCE_GROUP|AUTOUIC|AUTOUIC_EXECUTABLE|AUTOUIC_OPTIONS|AUTOUIC_SEARCH_PATHS|BINARY_DIR|BUILDSYSTEM_TARGETS|BUILD_RPATH|BUILD_RPATH_USE_ORIGIN|BUILD_WITH_INSTALL_NAME_DIR|BUILD_WITH_INSTALL_RPATH|BUNDLE|BUNDLE_EXTENSION|CACHE_VARIABLES|CLEAN_NO_CUSTOM|COMMON_LANGUAGE_RUNTIME|COMPATIBLE_INTERFACE_(?:BOOL|NUMBER_MAX|NUMBER_MIN|STRING)|COMPILE_(?:DEFINITIONS|FEATURES|FLAGS|OPTIONS|PDB_NAME|PDB_OUTPUT_DIRECTORY)|COST|CPACK_DESKTOP_SHORTCUTS|CPACK_NEVER_OVERWRITE|CPACK_PERMANENT|CPACK_STARTUP_SHORTCUTS|CPACK_START_MENU_SHORTCUTS|CPACK_WIX_ACL|CROSSCOMPILING_EMULATOR|CUDA_EXTENSIONS|CUDA_PTX_COMPILATION|CUDA_RESOLVE_DEVICE_SYMBOLS|CUDA_SEPARABLE_COMPILATION|CUDA_STANDARD|CUDA_STANDARD_REQUIRED|CXX_EXTENSIONS|CXX_STANDARD|CXX_STANDARD_REQUIRED|C_EXTENSIONS|C_STANDARD|C_STANDARD_REQUIRED|DEBUG_CONFIGURATIONS|DEFINE_SYMBOL|DEFINITIONS|DEPENDS|DEPLOYMENT_ADDITIONAL_FILES|DEPLOYMENT_REMOTE_DIRECTORY|DISABLED|DISABLED_FEATURES|ECLIPSE_EXTRA_CPROJECT_CONTENTS|ECLIPSE_EXTRA_NATURES|ENABLED_FEATURES|ENABLED_LANGUAGES|ENABLE_EXPORTS|ENVIRONMENT|EXCLUDE_FROM_ALL|EXCLUDE_FROM_DEFAULT_BUILD|EXPORT_NAME|EXPORT_PROPERTIES|EXTERNAL_OBJECT|EchoString|FAIL_REGULAR_EXPRESSION|FIND_LIBRARY_USE_LIB32_PATHS|FIND_LIBRARY_USE_LIB64_PATHS|FIND_LIBRARY_USE_LIBX32_PATHS|FIND_LIBRARY_USE_OPENBSD_VERSIONING|FIXTURES_CLEANUP|FIXTURES_REQUIRED|FIXTURES_SETUP|FOLDER|FRAMEWORK|Fortran_FORMAT|Fortran_MODULE_DIRECTORY|GENERATED|GENERATOR_FILE_NAME|GENERATOR_IS_MULTI_CONFIG|GHS_INTEGRITY_APP|GHS_NO_SOURCE_GROUP_FILE|GLOBAL_DEPENDS_DEBUG_MODE|GLOBAL_DEPENDS_NO_CYCLES|GNUtoMS|HAS_CXX|HEADER_FILE_ONLY|HELPSTRING|IMPLICIT_DEPENDS_INCLUDE_TRANSFORM|IMPORTED|IMPORTED_(?:COMMON_LANGUAGE_RUNTIME|CONFIGURATIONS|GLOBAL|IMPLIB|LIBNAME|LINK_DEPENDENT_LIBRARIES|LINK_INTERFACE_(?:LANGUAGES|LIBRARIES|MULTIPLICITY)|LOCATION|NO_SONAME|OBJECTS|SONAME)|IMPORT_PREFIX|IMPORT_SUFFIX|INCLUDE_DIRECTORIES|INCLUDE_REGULAR_EXPRESSION|INSTALL_NAME_DIR|INSTALL_RPATH|INSTALL_RPATH_USE_LINK_PATH|INTERFACE_(?:AUTOUIC_OPTIONS|COMPILE_DEFINITIONS|COMPILE_FEATURES|COMPILE_OPTIONS|INCLUDE_DIRECTORIES|LINK_DEPENDS|LINK_DIRECTORIES|LINK_LIBRARIES|LINK_OPTIONS|POSITION_INDEPENDENT_CODE|SOURCES|SYSTEM_INCLUDE_DIRECTORIES)|INTERPROCEDURAL_OPTIMIZATION|IN_TRY_COMPILE|IOS_INSTALL_COMBINED|JOB_POOLS|JOB_POOL_COMPILE|JOB_POOL_LINK|KEEP_EXTENSION|LABELS|LANGUAGE|LIBRARY_OUTPUT_DIRECTORY|LINKER_LANGUAGE|LINK_(?:DEPENDS|DEPENDS_NO_SHARED|DIRECTORIES|FLAGS|INTERFACE_LIBRARIES|INTERFACE_MULTIPLICITY|LIBRARIES|OPTIONS|SEARCH_END_STATIC|SEARCH_START_STATIC|WHAT_YOU_USE)|LISTFILE_STACK|LOCATION|MACOSX_BUNDLE|MACOSX_BUNDLE_INFO_PLIST|MACOSX_FRAMEWORK_INFO_PLIST|MACOSX_PACKAGE_LOCATION|MACOSX_RPATH|MACROS|MANUALLY_ADDED_DEPENDENCIES|MEASUREMENT|MODIFIED|NAME|NO_SONAME|NO_SYSTEM_FROM_IMPORTED|OBJECT_DEPENDS|OBJECT_OUTPUTS|OSX_ARCHITECTURES|OUTPUT_NAME|PACKAGES_FOUND|PACKAGES_NOT_FOUND|PARENT_DIRECTORY|PASS_REGULAR_EXPRESSION|PDB_NAME|PDB_OUTPUT_DIRECTORY|POSITION_INDEPENDENT_CODE|POST_INSTALL_SCRIPT|PREDEFINED_TARGETS_FOLDER|PREFIX|PRE_INSTALL_SCRIPT|PRIVATE_HEADER|PROCESSORS|PROCESSOR_AFFINITY|PROJECT_LABEL|PUBLIC_HEADER|REPORT_UNDEFINED_PROPERTIES|REQUIRED_FILES|RESOURCE|RESOURCE_LOCK|RULE_LAUNCH_COMPILE|RULE_LAUNCH_CUSTOM|RULE_LAUNCH_LINK|RULE_MESSAGES|RUNTIME_OUTPUT_DIRECTORY|RUN_SERIAL|SKIP_AUTOGEN|SKIP_AUTOMOC|SKIP_AUTORCC|SKIP_AUTOUIC|SKIP_BUILD_RPATH|SKIP_RETURN_CODE|SOURCES|SOURCE_DIR|SOVERSION|STATIC_LIBRARY_FLAGS|STATIC_LIBRARY_OPTIONS|STRINGS|SUBDIRECTORIES|SUFFIX|SYMBOLIC|TARGET_ARCHIVES_MAY_BE_SHARED_LIBS|TARGET_MESSAGES|TARGET_SUPPORTS_SHARED_LIBS|TESTS|TEST_INCLUDE_FILE|TEST_INCLUDE_FILES|TIMEOUT|TIMEOUT_AFTER_MATCH|TYPE|USE_FOLDERS|VALUE|VARIABLES|VERSION|VISIBILITY_INLINES_HIDDEN|VS_(?:CONFIGURATION_TYPE|COPY_TO_OUT_DIR|DEBUGGER_(?:COMMAND|COMMAND_ARGUMENTS|ENVIRONMENT|WORKING_DIRECTORY)|DEPLOYMENT_CONTENT|DEPLOYMENT_LOCATION|DOTNET_REFERENCES|DOTNET_REFERENCES_COPY_LOCAL|
|
|
40206
|
+
/\b(?:cxx_\w+|(?:ARCHIVE_OUTPUT_(?:DIRECTORY|NAME)|COMPILE_DEFINITIONS|COMPILE_PDB_NAME|COMPILE_PDB_OUTPUT_DIRECTORY|EXCLUDE_FROM_DEFAULT_BUILD|IMPORTED_(?:IMPLIB|LIBNAME|LINK_DEPENDENT_LIBRARIES|LINK_INTERFACE_LANGUAGES|LINK_INTERFACE_LIBRARIES|LINK_INTERFACE_MULTIPLICITY|LOCATION|NO_SONAME|OBJECTS|SONAME)|INTERPROCEDURAL_OPTIMIZATION|LIBRARY_OUTPUT_DIRECTORY|LIBRARY_OUTPUT_NAME|LINK_FLAGS|LINK_INTERFACE_LIBRARIES|LINK_INTERFACE_MULTIPLICITY|LOCATION|MAP_IMPORTED_CONFIG|OSX_ARCHITECTURES|OUTPUT_NAME|PDB_NAME|PDB_OUTPUT_DIRECTORY|RUNTIME_OUTPUT_DIRECTORY|RUNTIME_OUTPUT_NAME|STATIC_LIBRARY_FLAGS|VS_CSHARP|VS_DOTNET_REFERENCEPROP|VS_DOTNET_REFERENCE|VS_GLOBAL_SECTION_POST|VS_GLOBAL_SECTION_PRE|VS_GLOBAL|XCODE_ATTRIBUTE)_\w+|\w+_(?:CLANG_TIDY|COMPILER_LAUNCHER|CPPCHECK|CPPLINT|INCLUDE_WHAT_YOU_USE|OUTPUT_NAME|POSTFIX|VISIBILITY_PRESET)|ABSTRACT|ADDITIONAL_MAKE_CLEAN_FILES|ADVANCED|ALIASED_TARGET|ALLOW_DUPLICATE_CUSTOM_TARGETS|ANDROID_(?:ANT_ADDITIONAL_OPTIONS|API|API_MIN|ARCH|ASSETS_DIRECTORIES|GUI|JAR_DEPENDENCIES|NATIVE_LIB_DEPENDENCIES|NATIVE_LIB_DIRECTORIES|PROCESS_MAX|PROGUARD|PROGUARD_CONFIG_PATH|SECURE_PROPS_PATH|SKIP_ANT_STEP|STL_TYPE)|ARCHIVE_OUTPUT_DIRECTORY|ATTACHED_FILES|ATTACHED_FILES_ON_FAIL|AUTOGEN_(?:BUILD_DIR|ORIGIN_DEPENDS|PARALLEL|SOURCE_GROUP|TARGETS_FOLDER|TARGET_DEPENDS)|AUTOMOC|AUTOMOC_(?:COMPILER_PREDEFINES|DEPEND_FILTERS|EXECUTABLE|MACRO_NAMES|MOC_OPTIONS|SOURCE_GROUP|TARGETS_FOLDER)|AUTORCC|AUTORCC_EXECUTABLE|AUTORCC_OPTIONS|AUTORCC_SOURCE_GROUP|AUTOUIC|AUTOUIC_EXECUTABLE|AUTOUIC_OPTIONS|AUTOUIC_SEARCH_PATHS|BINARY_DIR|BUILDSYSTEM_TARGETS|BUILD_RPATH|BUILD_RPATH_USE_ORIGIN|BUILD_WITH_INSTALL_NAME_DIR|BUILD_WITH_INSTALL_RPATH|BUNDLE|BUNDLE_EXTENSION|CACHE_VARIABLES|CLEAN_NO_CUSTOM|COMMON_LANGUAGE_RUNTIME|COMPATIBLE_INTERFACE_(?:BOOL|NUMBER_MAX|NUMBER_MIN|STRING)|COMPILE_(?:DEFINITIONS|FEATURES|FLAGS|OPTIONS|PDB_NAME|PDB_OUTPUT_DIRECTORY)|COST|CPACK_DESKTOP_SHORTCUTS|CPACK_NEVER_OVERWRITE|CPACK_PERMANENT|CPACK_STARTUP_SHORTCUTS|CPACK_START_MENU_SHORTCUTS|CPACK_WIX_ACL|CROSSCOMPILING_EMULATOR|CUDA_EXTENSIONS|CUDA_PTX_COMPILATION|CUDA_RESOLVE_DEVICE_SYMBOLS|CUDA_SEPARABLE_COMPILATION|CUDA_STANDARD|CUDA_STANDARD_REQUIRED|CXX_EXTENSIONS|CXX_STANDARD|CXX_STANDARD_REQUIRED|C_EXTENSIONS|C_STANDARD|C_STANDARD_REQUIRED|DEBUG_CONFIGURATIONS|DEFINE_SYMBOL|DEFINITIONS|DEPENDS|DEPLOYMENT_ADDITIONAL_FILES|DEPLOYMENT_REMOTE_DIRECTORY|DISABLED|DISABLED_FEATURES|ECLIPSE_EXTRA_CPROJECT_CONTENTS|ECLIPSE_EXTRA_NATURES|ENABLED_FEATURES|ENABLED_LANGUAGES|ENABLE_EXPORTS|ENVIRONMENT|EXCLUDE_FROM_ALL|EXCLUDE_FROM_DEFAULT_BUILD|EXPORT_NAME|EXPORT_PROPERTIES|EXTERNAL_OBJECT|EchoString|FAIL_REGULAR_EXPRESSION|FIND_LIBRARY_USE_LIB32_PATHS|FIND_LIBRARY_USE_LIB64_PATHS|FIND_LIBRARY_USE_LIBX32_PATHS|FIND_LIBRARY_USE_OPENBSD_VERSIONING|FIXTURES_CLEANUP|FIXTURES_REQUIRED|FIXTURES_SETUP|FOLDER|FRAMEWORK|Fortran_FORMAT|Fortran_MODULE_DIRECTORY|GENERATED|GENERATOR_FILE_NAME|GENERATOR_IS_MULTI_CONFIG|GHS_INTEGRITY_APP|GHS_NO_SOURCE_GROUP_FILE|GLOBAL_DEPENDS_DEBUG_MODE|GLOBAL_DEPENDS_NO_CYCLES|GNUtoMS|HAS_CXX|HEADER_FILE_ONLY|HELPSTRING|IMPLICIT_DEPENDS_INCLUDE_TRANSFORM|IMPORTED|IMPORTED_(?:COMMON_LANGUAGE_RUNTIME|CONFIGURATIONS|GLOBAL|IMPLIB|LIBNAME|LINK_DEPENDENT_LIBRARIES|LINK_INTERFACE_(?:LANGUAGES|LIBRARIES|MULTIPLICITY)|LOCATION|NO_SONAME|OBJECTS|SONAME)|IMPORT_PREFIX|IMPORT_SUFFIX|INCLUDE_DIRECTORIES|INCLUDE_REGULAR_EXPRESSION|INSTALL_NAME_DIR|INSTALL_RPATH|INSTALL_RPATH_USE_LINK_PATH|INTERFACE_(?:AUTOUIC_OPTIONS|COMPILE_DEFINITIONS|COMPILE_FEATURES|COMPILE_OPTIONS|INCLUDE_DIRECTORIES|LINK_DEPENDS|LINK_DIRECTORIES|LINK_LIBRARIES|LINK_OPTIONS|POSITION_INDEPENDENT_CODE|SOURCES|SYSTEM_INCLUDE_DIRECTORIES)|INTERPROCEDURAL_OPTIMIZATION|IN_TRY_COMPILE|IOS_INSTALL_COMBINED|JOB_POOLS|JOB_POOL_COMPILE|JOB_POOL_LINK|KEEP_EXTENSION|LABELS|LANGUAGE|LIBRARY_OUTPUT_DIRECTORY|LINKER_LANGUAGE|LINK_(?:DEPENDS|DEPENDS_NO_SHARED|DIRECTORIES|FLAGS|INTERFACE_LIBRARIES|INTERFACE_MULTIPLICITY|LIBRARIES|OPTIONS|SEARCH_END_STATIC|SEARCH_START_STATIC|WHAT_YOU_USE)|LISTFILE_STACK|LOCATION|MACOSX_BUNDLE|MACOSX_BUNDLE_INFO_PLIST|MACOSX_FRAMEWORK_INFO_PLIST|MACOSX_PACKAGE_LOCATION|MACOSX_RPATH|MACROS|MANUALLY_ADDED_DEPENDENCIES|MEASUREMENT|MODIFIED|NAME|NO_SONAME|NO_SYSTEM_FROM_IMPORTED|OBJECT_DEPENDS|OBJECT_OUTPUTS|OSX_ARCHITECTURES|OUTPUT_NAME|PACKAGES_FOUND|PACKAGES_NOT_FOUND|PARENT_DIRECTORY|PASS_REGULAR_EXPRESSION|PDB_NAME|PDB_OUTPUT_DIRECTORY|POSITION_INDEPENDENT_CODE|POST_INSTALL_SCRIPT|PREDEFINED_TARGETS_FOLDER|PREFIX|PRE_INSTALL_SCRIPT|PRIVATE_HEADER|PROCESSORS|PROCESSOR_AFFINITY|PROJECT_LABEL|PUBLIC_HEADER|REPORT_UNDEFINED_PROPERTIES|REQUIRED_FILES|RESOURCE|RESOURCE_LOCK|RULE_LAUNCH_COMPILE|RULE_LAUNCH_CUSTOM|RULE_LAUNCH_LINK|RULE_MESSAGES|RUNTIME_OUTPUT_DIRECTORY|RUN_SERIAL|SKIP_AUTOGEN|SKIP_AUTOMOC|SKIP_AUTORCC|SKIP_AUTOUIC|SKIP_BUILD_RPATH|SKIP_RETURN_CODE|SOURCES|SOURCE_DIR|SOVERSION|STATIC_LIBRARY_FLAGS|STATIC_LIBRARY_OPTIONS|STRINGS|SUBDIRECTORIES|SUFFIX|SYMBOLIC|TARGET_ARCHIVES_MAY_BE_SHARED_LIBS|TARGET_MESSAGES|TARGET_SUPPORTS_SHARED_LIBS|TESTS|TEST_INCLUDE_FILE|TEST_INCLUDE_FILES|TIMEOUT|TIMEOUT_AFTER_MATCH|TYPE|USE_FOLDERS|VALUE|VARIABLES|VERSION|VISIBILITY_INLINES_HIDDEN|VS_(?:CONFIGURATION_TYPE|COPY_TO_OUT_DIR|DEBUGGER_(?:COMMAND|COMMAND_ARGUMENTS|ENVIRONMENT|WORKING_DIRECTORY)|DEPLOYMENT_CONTENT|DEPLOYMENT_LOCATION|DOTNET_REFERENCES|DOTNET_REFERENCES_COPY_LOCAL|INCLUDE_IN_VSIX|IOT_STARTUP_TASK|KEYWORD|RESOURCE_GENERATOR|SCC_AUXPATH|SCC_LOCALPATH|SCC_PROJECTNAME|SCC_PROVIDER|SDK_REFERENCES|SHADER_(?:DISABLE_OPTIMIZATIONS|ENABLE_DEBUG|ENTRYPOINT|FLAGS|MODEL|OBJECT_FILE_NAME|OUTPUT_HEADER_FILE|TYPE|VARIABLE_NAME)|STARTUP_PROJECT|TOOL_OVERRIDE|USER_PROPS|WINRT_COMPONENT|WINRT_EXTENSIONS|WINRT_REFERENCES|XAML_TYPE)|WILL_FAIL|WIN32_EXECUTABLE|WINDOWS_EXPORT_ALL_SYMBOLS|WORKING_DIRECTORY|WRAP_EXCLUDE|XCODE_(?:EMIT_EFFECTIVE_PLATFORM_NAME|EXPLICIT_FILE_TYPE|FILE_ATTRIBUTES|LAST_KNOWN_FILE_TYPE|PRODUCT_TYPE|SCHEME_(?:ADDRESS_SANITIZER|ADDRESS_SANITIZER_USE_AFTER_RETURN|ARGUMENTS|DISABLE_MAIN_THREAD_CHECKER|DYNAMIC_LIBRARY_LOADS|DYNAMIC_LINKER_API_USAGE|ENVIRONMENT|EXECUTABLE|GUARD_MALLOC|MAIN_THREAD_CHECKER_STOP|MALLOC_GUARD_EDGES|MALLOC_SCRIBBLE|MALLOC_STACK|THREAD_SANITIZER(?:_STOP)?|UNDEFINED_BEHAVIOUR_SANITIZER(?:_STOP)?|ZOMBIE_OBJECTS))|XCTEST)\b/,
|
|
40544
40207
|
keyword:
|
|
40545
40208
|
/\b(?:add_compile_definitions|add_compile_options|add_custom_command|add_custom_target|add_definitions|add_dependencies|add_executable|add_library|add_link_options|add_subdirectory|add_test|aux_source_directory|break|build_command|build_name|cmake_host_system_information|cmake_minimum_required|cmake_parse_arguments|cmake_policy|configure_file|continue|create_test_sourcelist|ctest_build|ctest_configure|ctest_coverage|ctest_empty_binary_directory|ctest_memcheck|ctest_read_custom_files|ctest_run_script|ctest_sleep|ctest_start|ctest_submit|ctest_test|ctest_update|ctest_upload|define_property|else|elseif|enable_language|enable_testing|endforeach|endfunction|endif|endmacro|endwhile|exec_program|execute_process|export|export_library_dependencies|file|find_file|find_library|find_package|find_path|find_program|fltk_wrap_ui|foreach|function|get_cmake_property|get_directory_property|get_filename_component|get_property|get_source_file_property|get_target_property|get_test_property|if|include|include_directories|include_external_msproject|include_guard|include_regular_expression|install|install_files|install_programs|install_targets|link_directories|link_libraries|list|load_cache|load_command|macro|make_directory|mark_as_advanced|math|message|option|output_required_files|project|qt_wrap_cpp|qt_wrap_ui|remove|remove_definitions|return|separate_arguments|set|set_directory_properties|set_property|set_source_files_properties|set_target_properties|set_tests_properties|site_name|source_group|string|subdir_depends|subdirs|target_compile_definitions|target_compile_features|target_compile_options|target_include_directories|target_link_directories|target_link_libraries|target_link_options|target_sources|try_compile|try_run|unset|use_mangled_mesa|utility_source|variable_requires|variable_watch|while|write_file)(?=\s*\()\b/,
|
|
40546
40209
|
boolean: /\b(?:FALSE|OFF|ON|TRUE)\b/,
|
|
@@ -40873,6 +40536,152 @@ function csp(Prism) {
|
|
|
40873
40536
|
})(Prism)
|
|
40874
40537
|
}
|
|
40875
40538
|
|
|
40539
|
+
;// CONCATENATED MODULE: ./node_modules/refractor/lang/cooklang.js
|
|
40540
|
+
// @ts-nocheck
|
|
40541
|
+
cooklang.displayName = 'cooklang'
|
|
40542
|
+
cooklang.aliases = []
|
|
40543
|
+
|
|
40544
|
+
/** @type {import('../core.js').Syntax} */
|
|
40545
|
+
function cooklang(Prism) {
|
|
40546
|
+
;(function (Prism) {
|
|
40547
|
+
// see https://github.com/cooklang/spec/blob/main/EBNF.md
|
|
40548
|
+
var single_token_suffix = /(?:(?!\s)[\d$+<=a-zA-Z\x80-\uFFFF])+/.source
|
|
40549
|
+
var multi_token_infix = /[^{}@#]+/.source
|
|
40550
|
+
var multi_token_suffix = /\{[^}#@]*\}/.source
|
|
40551
|
+
var multi_token = multi_token_infix + multi_token_suffix
|
|
40552
|
+
var timer_units = /(?:h|hours|hrs|m|min|minutes)/.source
|
|
40553
|
+
var amount_group_impl = {
|
|
40554
|
+
pattern: /\{[^{}]*\}/,
|
|
40555
|
+
inside: {
|
|
40556
|
+
amount: {
|
|
40557
|
+
pattern: /([\{|])[^{}|*%]+/,
|
|
40558
|
+
lookbehind: true,
|
|
40559
|
+
alias: 'number'
|
|
40560
|
+
},
|
|
40561
|
+
unit: {
|
|
40562
|
+
pattern: /(%)[^}]+/,
|
|
40563
|
+
lookbehind: true,
|
|
40564
|
+
alias: 'symbol'
|
|
40565
|
+
},
|
|
40566
|
+
'servings-scaler': {
|
|
40567
|
+
pattern: /\*/,
|
|
40568
|
+
alias: 'operator'
|
|
40569
|
+
},
|
|
40570
|
+
'servings-alternative-separator': {
|
|
40571
|
+
pattern: /\|/,
|
|
40572
|
+
alias: 'operator'
|
|
40573
|
+
},
|
|
40574
|
+
'unit-separator': {
|
|
40575
|
+
pattern: /(?:%|(\*)%)/,
|
|
40576
|
+
lookbehind: true,
|
|
40577
|
+
alias: 'operator'
|
|
40578
|
+
},
|
|
40579
|
+
punctuation: /[{}]/
|
|
40580
|
+
}
|
|
40581
|
+
}
|
|
40582
|
+
Prism.languages.cooklang = {
|
|
40583
|
+
comment: {
|
|
40584
|
+
// [- comment -]
|
|
40585
|
+
// -- comment
|
|
40586
|
+
pattern: /\[-[\s\S]*?-\]|--.*/,
|
|
40587
|
+
greedy: true
|
|
40588
|
+
},
|
|
40589
|
+
meta: {
|
|
40590
|
+
// >> key: value
|
|
40591
|
+
pattern: />>.*:.*/,
|
|
40592
|
+
inside: {
|
|
40593
|
+
property: {
|
|
40594
|
+
// key:
|
|
40595
|
+
pattern: /(>>\s*)[^\s:](?:[^:]*[^\s:])?/,
|
|
40596
|
+
lookbehind: true
|
|
40597
|
+
}
|
|
40598
|
+
}
|
|
40599
|
+
},
|
|
40600
|
+
'cookware-group': {
|
|
40601
|
+
// #...{...}, #...
|
|
40602
|
+
pattern: new RegExp(
|
|
40603
|
+
'#(?:' + multi_token + '|' + single_token_suffix + ')'
|
|
40604
|
+
),
|
|
40605
|
+
inside: {
|
|
40606
|
+
cookware: {
|
|
40607
|
+
pattern: new RegExp('(^#)(?:' + multi_token_infix + ')'),
|
|
40608
|
+
lookbehind: true,
|
|
40609
|
+
alias: 'variable'
|
|
40610
|
+
},
|
|
40611
|
+
'cookware-keyword': {
|
|
40612
|
+
pattern: /^#/,
|
|
40613
|
+
alias: 'keyword'
|
|
40614
|
+
},
|
|
40615
|
+
'quantity-group': {
|
|
40616
|
+
pattern: new RegExp(/\{[^{}@#]*\}/),
|
|
40617
|
+
inside: {
|
|
40618
|
+
quantity: {
|
|
40619
|
+
pattern: new RegExp(/(^\{)/.source + multi_token_infix),
|
|
40620
|
+
lookbehind: true,
|
|
40621
|
+
alias: 'number'
|
|
40622
|
+
},
|
|
40623
|
+
punctuation: /[{}]/
|
|
40624
|
+
}
|
|
40625
|
+
}
|
|
40626
|
+
}
|
|
40627
|
+
},
|
|
40628
|
+
'ingredient-group': {
|
|
40629
|
+
// @...{...}, @...
|
|
40630
|
+
pattern: new RegExp(
|
|
40631
|
+
'@(?:' + multi_token + '|' + single_token_suffix + ')'
|
|
40632
|
+
),
|
|
40633
|
+
inside: {
|
|
40634
|
+
ingredient: {
|
|
40635
|
+
pattern: new RegExp('(^@)(?:' + multi_token_infix + ')'),
|
|
40636
|
+
lookbehind: true,
|
|
40637
|
+
alias: 'variable'
|
|
40638
|
+
},
|
|
40639
|
+
'ingredient-keyword': {
|
|
40640
|
+
pattern: /^@/,
|
|
40641
|
+
alias: 'keyword'
|
|
40642
|
+
},
|
|
40643
|
+
'amount-group': amount_group_impl
|
|
40644
|
+
}
|
|
40645
|
+
},
|
|
40646
|
+
'timer-group': {
|
|
40647
|
+
// ~timer{...}
|
|
40648
|
+
// eslint-disable-next-line regexp/sort-alternatives
|
|
40649
|
+
pattern: /~(?!\s)[^@#~{}]*\{[^{}]*\}/,
|
|
40650
|
+
inside: {
|
|
40651
|
+
timer: {
|
|
40652
|
+
pattern: /(^~)[^{]+/,
|
|
40653
|
+
lookbehind: true,
|
|
40654
|
+
alias: 'variable'
|
|
40655
|
+
},
|
|
40656
|
+
'duration-group': {
|
|
40657
|
+
// {...}
|
|
40658
|
+
pattern: /\{[^{}]*\}/,
|
|
40659
|
+
inside: {
|
|
40660
|
+
punctuation: /[{}]/,
|
|
40661
|
+
unit: {
|
|
40662
|
+
pattern: new RegExp(
|
|
40663
|
+
/(%\s*)/.source + timer_units + /\b/.source
|
|
40664
|
+
),
|
|
40665
|
+
lookbehind: true,
|
|
40666
|
+
alias: 'symbol'
|
|
40667
|
+
},
|
|
40668
|
+
operator: /%/,
|
|
40669
|
+
duration: {
|
|
40670
|
+
pattern: /\d+/,
|
|
40671
|
+
alias: 'number'
|
|
40672
|
+
}
|
|
40673
|
+
}
|
|
40674
|
+
},
|
|
40675
|
+
'timer-keyword': {
|
|
40676
|
+
pattern: /^~/,
|
|
40677
|
+
alias: 'keyword'
|
|
40678
|
+
}
|
|
40679
|
+
}
|
|
40680
|
+
}
|
|
40681
|
+
}
|
|
40682
|
+
})(Prism)
|
|
40683
|
+
}
|
|
40684
|
+
|
|
40876
40685
|
;// CONCATENATED MODULE: ./node_modules/refractor/lang/coq.js
|
|
40877
40686
|
// @ts-nocheck
|
|
40878
40687
|
coq.displayName = 'coq'
|
|
@@ -41143,6 +40952,98 @@ function csv(Prism) {
|
|
|
41143
40952
|
}
|
|
41144
40953
|
}
|
|
41145
40954
|
|
|
40955
|
+
;// CONCATENATED MODULE: ./node_modules/refractor/lang/cue.js
|
|
40956
|
+
// @ts-nocheck
|
|
40957
|
+
cue.displayName = 'cue'
|
|
40958
|
+
cue.aliases = []
|
|
40959
|
+
|
|
40960
|
+
/** @type {import('../core.js').Syntax} */
|
|
40961
|
+
function cue(Prism) {
|
|
40962
|
+
;(function (Prism) {
|
|
40963
|
+
// https://cuelang.org/docs/references/spec/
|
|
40964
|
+
// eslint-disable-next-line regexp/strict
|
|
40965
|
+
var stringEscape = /\\(?:(?!\2)|\2(?:[^()\r\n]|\([^()]*\)))/.source // eslint-disable-next-line regexp/strict
|
|
40966
|
+
var stringTypes =
|
|
40967
|
+
/"""(?:[^\\"]|"(?!""\2)|<esc>)*"""/.source + // eslint-disable-next-line regexp/strict
|
|
40968
|
+
'|' +
|
|
40969
|
+
/'''(?:[^\\']|'(?!''\2)|<esc>)*'''/.source + // eslint-disable-next-line regexp/strict
|
|
40970
|
+
'|' +
|
|
40971
|
+
/"(?:[^\\\r\n"]|"(?!\2)|<esc>)*"/.source + // eslint-disable-next-line regexp/strict
|
|
40972
|
+
'|' +
|
|
40973
|
+
/'(?:[^\\\r\n']|'(?!\2)|<esc>)*'/.source
|
|
40974
|
+
var stringLiteral =
|
|
40975
|
+
'(?:' + stringTypes.replace(/<esc>/g, stringEscape) + ')'
|
|
40976
|
+
Prism.languages.cue = {
|
|
40977
|
+
comment: {
|
|
40978
|
+
pattern: /\/\/.*/,
|
|
40979
|
+
greedy: true
|
|
40980
|
+
},
|
|
40981
|
+
'string-literal': {
|
|
40982
|
+
// eslint-disable-next-line regexp/strict
|
|
40983
|
+
pattern: RegExp(
|
|
40984
|
+
/(^|[^#"'\\])(#*)/.source + stringLiteral + /(?!["'])\2/.source
|
|
40985
|
+
),
|
|
40986
|
+
lookbehind: true,
|
|
40987
|
+
greedy: true,
|
|
40988
|
+
inside: {
|
|
40989
|
+
// I'm using dirty hack here. We have to know the number hashes at the start of the string somehow,
|
|
40990
|
+
// but we can't look back. So instead, we will use a lookahead, go to the end of the string, and
|
|
40991
|
+
// capture the hashes at the end of the string.
|
|
40992
|
+
escape: {
|
|
40993
|
+
pattern:
|
|
40994
|
+
/(?=[\s\S]*["'](#*)$)\\\1(?:U[a-fA-F0-9]{1,8}|u[a-fA-F0-9]{1,4}|x[a-fA-F0-9]{1,2}|\d{2,3}|[^(])/,
|
|
40995
|
+
greedy: true,
|
|
40996
|
+
alias: 'string'
|
|
40997
|
+
},
|
|
40998
|
+
interpolation: {
|
|
40999
|
+
pattern: /(?=[\s\S]*["'](#*)$)\\\1\([^()]*\)/,
|
|
41000
|
+
greedy: true,
|
|
41001
|
+
inside: {
|
|
41002
|
+
punctuation: /^\\#*\(|\)$/,
|
|
41003
|
+
expression: {
|
|
41004
|
+
pattern: /[\s\S]+/,
|
|
41005
|
+
inside: null
|
|
41006
|
+
}
|
|
41007
|
+
}
|
|
41008
|
+
},
|
|
41009
|
+
string: /[\s\S]+/
|
|
41010
|
+
}
|
|
41011
|
+
},
|
|
41012
|
+
keyword: {
|
|
41013
|
+
pattern: /(^|[^\w$])(?:for|if|import|in|let|null|package)(?![\w$])/,
|
|
41014
|
+
lookbehind: true
|
|
41015
|
+
},
|
|
41016
|
+
boolean: {
|
|
41017
|
+
pattern: /(^|[^\w$])(?:false|true)(?![\w$])/,
|
|
41018
|
+
lookbehind: true
|
|
41019
|
+
},
|
|
41020
|
+
builtin: {
|
|
41021
|
+
pattern:
|
|
41022
|
+
/(^|[^\w$])(?:bool|bytes|float|float(?:32|64)|u?int(?:8|16|32|64|128)?|number|rune|string)(?![\w$])/,
|
|
41023
|
+
lookbehind: true
|
|
41024
|
+
},
|
|
41025
|
+
attribute: {
|
|
41026
|
+
pattern: /@[\w$]+(?=\s*\()/,
|
|
41027
|
+
alias: 'function'
|
|
41028
|
+
},
|
|
41029
|
+
function: {
|
|
41030
|
+
pattern: /(^|[^\w$])[a-z_$][\w$]*(?=\s*\()/i,
|
|
41031
|
+
lookbehind: true
|
|
41032
|
+
},
|
|
41033
|
+
number: {
|
|
41034
|
+
pattern:
|
|
41035
|
+
/(^|[^\w$.])(?:0b[01]+(?:_[01]+)*|0o[0-7]+(?:_[0-7]+)*|0[xX][0-9A-Fa-f]+(?:_[0-9A-Fa-f]+)*|(?:\d+(?:_\d+)*(?:\.(?:\d+(?:_\d+)*)?)?|\.\d+(?:_\d+)*)(?:[eE][+-]?\d+(?:_\d+)*)?(?:[KMGTP]i?)?)(?![\w$])/,
|
|
41036
|
+
lookbehind: true
|
|
41037
|
+
},
|
|
41038
|
+
operator: /\.{3}|_\|_|&&?|\|\|?|[=!]~|[<>=!]=?|[+\-*/?]/,
|
|
41039
|
+
punctuation: /[()[\]{},.:]/
|
|
41040
|
+
}
|
|
41041
|
+
Prism.languages.cue[
|
|
41042
|
+
'string-literal'
|
|
41043
|
+
].inside.interpolation.inside.expression.inside = Prism.languages.cue
|
|
41044
|
+
})(Prism)
|
|
41045
|
+
}
|
|
41046
|
+
|
|
41146
41047
|
;// CONCATENATED MODULE: ./node_modules/refractor/lang/cypher.js
|
|
41147
41048
|
// @ts-nocheck
|
|
41148
41049
|
cypher.displayName = 'cypher'
|
|
@@ -42262,7 +42163,7 @@ function erlang(Prism) {
|
|
|
42262
42163
|
alias: 'atom'
|
|
42263
42164
|
},
|
|
42264
42165
|
boolean: /\b(?:false|true)\b/,
|
|
42265
|
-
keyword: /\b(?:after|case|catch|end|fun|if|of|receive|try|when)\b/,
|
|
42166
|
+
keyword: /\b(?:after|begin|case|catch|end|fun|if|of|receive|try|when)\b/,
|
|
42266
42167
|
number: [
|
|
42267
42168
|
/\$\\?./,
|
|
42268
42169
|
/\b\d+#[a-z0-9]+/i,
|
|
@@ -42339,12 +42240,12 @@ function excelFormula(Prism) {
|
|
|
42339
42240
|
},
|
|
42340
42241
|
'function-name': {
|
|
42341
42242
|
pattern: /\b[A-Z]\w*(?=\()/i,
|
|
42342
|
-
alias: '
|
|
42243
|
+
alias: 'builtin'
|
|
42343
42244
|
},
|
|
42344
42245
|
range: {
|
|
42345
42246
|
pattern:
|
|
42346
42247
|
/\$?\b(?:[A-Z]+\$?\d+:\$?[A-Z]+\$?\d+|[A-Z]+:\$?[A-Z]+|\d+:\$?\d+)\b/i,
|
|
42347
|
-
alias: '
|
|
42248
|
+
alias: 'selector',
|
|
42348
42249
|
inside: {
|
|
42349
42250
|
operator: /:/,
|
|
42350
42251
|
cell: /\$?[A-Z]+\$?\d+/i,
|
|
@@ -42356,7 +42257,7 @@ function excelFormula(Prism) {
|
|
|
42356
42257
|
// Excel is case insensitive, so the string "foo1" could be either a variable or a cell.
|
|
42357
42258
|
// To combat this, we match cells case insensitive, if the contain at least one "$", and case sensitive otherwise.
|
|
42358
42259
|
pattern: /\b[A-Z]+\d+\b|\$[A-Za-z]+\$?\d+\b|\b[A-Za-z]+\$\d+\b/,
|
|
42359
|
-
alias: '
|
|
42260
|
+
alias: 'selector'
|
|
42360
42261
|
},
|
|
42361
42262
|
number: /(?:\b\d+(?:\.\d+)?|\B\.\d+)(?:e[+-]?\d+)?\b/i,
|
|
42362
42263
|
boolean: /\b(?:FALSE|TRUE)\b/i,
|
|
@@ -43489,8 +43390,8 @@ function flow_flow(Prism) {
|
|
|
43489
43390
|
type: [
|
|
43490
43391
|
{
|
|
43491
43392
|
pattern:
|
|
43492
|
-
/\b(?:[Bb]oolean|Function|[Nn]umber|[Ss]tring|any|mixed|null|void)\b/,
|
|
43493
|
-
alias: '
|
|
43393
|
+
/\b(?:[Bb]oolean|Function|[Nn]umber|[Ss]tring|[Ss]ymbol|any|mixed|null|void)\b/,
|
|
43394
|
+
alias: 'class-name'
|
|
43494
43395
|
}
|
|
43495
43396
|
]
|
|
43496
43397
|
})
|
|
@@ -43866,12 +43767,12 @@ function gedcom(Prism) {
|
|
|
43866
43767
|
}
|
|
43867
43768
|
}
|
|
43868
43769
|
},
|
|
43869
|
-
|
|
43770
|
+
record: {
|
|
43870
43771
|
// Preceded by level and optional pointer
|
|
43871
43772
|
pattern:
|
|
43872
43773
|
/(^[\t ]*\d+ +(?:@\w[\w!"$%&'()*+,\-./:;<=>?[\\\]^`{|}~\x80-\xfe #]*@ +)?)\w+/m,
|
|
43873
43774
|
lookbehind: true,
|
|
43874
|
-
alias: '
|
|
43775
|
+
alias: 'tag'
|
|
43875
43776
|
},
|
|
43876
43777
|
level: {
|
|
43877
43778
|
pattern: /(^[\t ]*)\d+/m,
|
|
@@ -43885,6 +43786,57 @@ function gedcom(Prism) {
|
|
|
43885
43786
|
}
|
|
43886
43787
|
}
|
|
43887
43788
|
|
|
43789
|
+
;// CONCATENATED MODULE: ./node_modules/refractor/lang/gettext.js
|
|
43790
|
+
// @ts-nocheck
|
|
43791
|
+
gettext.displayName = 'gettext'
|
|
43792
|
+
gettext.aliases = ['po']
|
|
43793
|
+
|
|
43794
|
+
/** @type {import('../core.js').Syntax} */
|
|
43795
|
+
function gettext(Prism) {
|
|
43796
|
+
Prism.languages.gettext = {
|
|
43797
|
+
comment: [
|
|
43798
|
+
{
|
|
43799
|
+
pattern: /# .*/,
|
|
43800
|
+
greedy: true,
|
|
43801
|
+
alias: 'translator-comment'
|
|
43802
|
+
},
|
|
43803
|
+
{
|
|
43804
|
+
pattern: /#\..*/,
|
|
43805
|
+
greedy: true,
|
|
43806
|
+
alias: 'extracted-comment'
|
|
43807
|
+
},
|
|
43808
|
+
{
|
|
43809
|
+
pattern: /#:.*/,
|
|
43810
|
+
greedy: true,
|
|
43811
|
+
alias: 'reference-comment'
|
|
43812
|
+
},
|
|
43813
|
+
{
|
|
43814
|
+
pattern: /#,.*/,
|
|
43815
|
+
greedy: true,
|
|
43816
|
+
alias: 'flag-comment'
|
|
43817
|
+
},
|
|
43818
|
+
{
|
|
43819
|
+
pattern: /#\|.*/,
|
|
43820
|
+
greedy: true,
|
|
43821
|
+
alias: 'previously-untranslated-comment'
|
|
43822
|
+
},
|
|
43823
|
+
{
|
|
43824
|
+
pattern: /#.*/,
|
|
43825
|
+
greedy: true
|
|
43826
|
+
}
|
|
43827
|
+
],
|
|
43828
|
+
string: {
|
|
43829
|
+
pattern: /(^|[^\\])"(?:[^"\\]|\\.)*"/,
|
|
43830
|
+
lookbehind: true,
|
|
43831
|
+
greedy: true
|
|
43832
|
+
},
|
|
43833
|
+
keyword: /^msg(?:ctxt|id|id_plural|str)\b/m,
|
|
43834
|
+
number: /\b\d+\b/,
|
|
43835
|
+
punctuation: /[\[\]]/
|
|
43836
|
+
}
|
|
43837
|
+
Prism.languages.po = Prism.languages.gettext
|
|
43838
|
+
}
|
|
43839
|
+
|
|
43888
43840
|
;// CONCATENATED MODULE: ./node_modules/refractor/lang/gherkin.js
|
|
43889
43841
|
// @ts-nocheck
|
|
43890
43842
|
gherkin.displayName = 'gherkin'
|
|
@@ -44125,6 +44077,40 @@ function gn(Prism) {
|
|
|
44125
44077
|
Prism.languages.gni = Prism.languages.gn
|
|
44126
44078
|
}
|
|
44127
44079
|
|
|
44080
|
+
;// CONCATENATED MODULE: ./node_modules/refractor/lang/linker-script.js
|
|
44081
|
+
// @ts-nocheck
|
|
44082
|
+
linkerScript.displayName = 'linker-script'
|
|
44083
|
+
linkerScript.aliases = ['ld']
|
|
44084
|
+
|
|
44085
|
+
/** @type {import('../core.js').Syntax} */
|
|
44086
|
+
function linkerScript(Prism) {
|
|
44087
|
+
Prism.languages['linker-script'] = {
|
|
44088
|
+
comment: {
|
|
44089
|
+
pattern: /(^|\s)\/\*[\s\S]*?(?:$|\*\/)/,
|
|
44090
|
+
lookbehind: true,
|
|
44091
|
+
greedy: true
|
|
44092
|
+
},
|
|
44093
|
+
identifier: {
|
|
44094
|
+
pattern: /"[^"\r\n]*"/,
|
|
44095
|
+
greedy: true
|
|
44096
|
+
},
|
|
44097
|
+
'location-counter': {
|
|
44098
|
+
pattern: /\B\.\B/,
|
|
44099
|
+
alias: 'important'
|
|
44100
|
+
},
|
|
44101
|
+
section: {
|
|
44102
|
+
pattern: /(^|[^\w*])\.\w+\b/,
|
|
44103
|
+
lookbehind: true,
|
|
44104
|
+
alias: 'keyword'
|
|
44105
|
+
},
|
|
44106
|
+
function: /\b[A-Z][A-Z_]*(?=\s*\()/,
|
|
44107
|
+
number: /\b(?:0[xX][a-fA-F0-9]+|\d+)[KM]?\b/,
|
|
44108
|
+
operator: />>=?|<<=?|->|\+\+|--|&&|\|\||::|[?:~]|[-+*/%&|^!=<>]=?/,
|
|
44109
|
+
punctuation: /[(){},;]/
|
|
44110
|
+
}
|
|
44111
|
+
Prism.languages['ld'] = Prism.languages['linker-script']
|
|
44112
|
+
}
|
|
44113
|
+
|
|
44128
44114
|
;// CONCATENATED MODULE: ./node_modules/refractor/lang/go-module.js
|
|
44129
44115
|
// @ts-nocheck
|
|
44130
44116
|
goModule.displayName = 'go-module'
|
|
@@ -44377,70 +44363,68 @@ groovy.aliases = []
|
|
|
44377
44363
|
/** @type {import('../core.js').Syntax} */
|
|
44378
44364
|
function groovy(Prism) {
|
|
44379
44365
|
Prism.register(clike)
|
|
44380
|
-
|
|
44381
|
-
|
|
44382
|
-
{
|
|
44366
|
+
;(function (Prism) {
|
|
44367
|
+
var interpolation = {
|
|
44368
|
+
pattern: /((?:^|[^\\$])(?:\\{2})*)\$(?:\w+|\{[^{}]*\})/,
|
|
44369
|
+
lookbehind: true,
|
|
44370
|
+
inside: {
|
|
44371
|
+
'interpolation-punctuation': {
|
|
44372
|
+
pattern: /^\$\{?|\}$/,
|
|
44373
|
+
alias: 'punctuation'
|
|
44374
|
+
},
|
|
44375
|
+
expression: {
|
|
44376
|
+
pattern: /[\s\S]+/,
|
|
44377
|
+
inside: null // see below
|
|
44378
|
+
}
|
|
44379
|
+
}
|
|
44380
|
+
}
|
|
44381
|
+
Prism.languages.groovy = Prism.languages.extend('clike', {
|
|
44382
|
+
string: {
|
|
44383
44383
|
// https://groovy-lang.org/syntax.html#_dollar_slashy_string
|
|
44384
|
+
pattern: /'''(?:[^\\]|\\[\s\S])*?'''|'(?:\\.|[^\\'\r\n])*'/,
|
|
44385
|
+
greedy: true
|
|
44386
|
+
},
|
|
44387
|
+
keyword:
|
|
44388
|
+
/\b(?:abstract|as|assert|boolean|break|byte|case|catch|char|class|const|continue|def|default|do|double|else|enum|extends|final|finally|float|for|goto|if|implements|import|in|instanceof|int|interface|long|native|new|package|private|protected|public|return|short|static|strictfp|super|switch|synchronized|this|throw|throws|trait|transient|try|void|volatile|while)\b/,
|
|
44389
|
+
number:
|
|
44390
|
+
/\b(?:0b[01_]+|0x[\da-f_]+(?:\.[\da-f_p\-]+)?|[\d_]+(?:\.[\d_]+)?(?:e[+-]?\d+)?)[glidf]?\b/i,
|
|
44391
|
+
operator: {
|
|
44384
44392
|
pattern:
|
|
44385
|
-
/(
|
|
44393
|
+
/(^|[^.])(?:~|==?~?|\?[.:]?|\*(?:[.=]|\*=?)?|\.[@&]|\.\.<|\.\.(?!\.)|-[-=>]?|\+[+=]?|!=?|<(?:<=?|=>?)?|>(?:>>?=?|=)?|&[&=]?|\|[|=]?|\/=?|\^=?|%=?)/,
|
|
44394
|
+
lookbehind: true
|
|
44395
|
+
},
|
|
44396
|
+
punctuation: /\.+|[{}[\];(),:$]/
|
|
44397
|
+
})
|
|
44398
|
+
Prism.languages.insertBefore('groovy', 'string', {
|
|
44399
|
+
shebang: {
|
|
44400
|
+
pattern: /#!.+/,
|
|
44401
|
+
alias: 'comment',
|
|
44386
44402
|
greedy: true
|
|
44387
44403
|
},
|
|
44388
|
-
{
|
|
44404
|
+
'interpolation-string': {
|
|
44389
44405
|
// TODO: Slash strings (e.g. /foo/) can contain line breaks but this will cause a lot of trouble with
|
|
44390
44406
|
// simple division (see JS regex), so find a fix maybe?
|
|
44391
|
-
pattern:
|
|
44392
|
-
|
|
44407
|
+
pattern:
|
|
44408
|
+
/"""(?:[^\\]|\\[\s\S])*?"""|(["/])(?:\\.|(?!\1)[^\\\r\n])*\1|\$\/(?:[^/$]|\$(?:[/$]|(?![/$]))|\/(?!\$))*\/\$/,
|
|
44409
|
+
greedy: true,
|
|
44410
|
+
inside: {
|
|
44411
|
+
interpolation: interpolation,
|
|
44412
|
+
string: /[\s\S]+/
|
|
44413
|
+
}
|
|
44393
44414
|
}
|
|
44394
|
-
|
|
44395
|
-
|
|
44396
|
-
/\b(?:
|
|
44397
|
-
|
|
44398
|
-
|
|
44399
|
-
|
|
44400
|
-
|
|
44401
|
-
|
|
44402
|
-
|
|
44403
|
-
},
|
|
44404
|
-
punctuation: /\.+|[{}[\];(),:$]/
|
|
44405
|
-
})
|
|
44406
|
-
Prism.languages.insertBefore('groovy', 'string', {
|
|
44407
|
-
shebang: {
|
|
44408
|
-
pattern: /#!.+/,
|
|
44409
|
-
alias: 'comment'
|
|
44410
|
-
}
|
|
44411
|
-
})
|
|
44412
|
-
Prism.languages.insertBefore('groovy', 'punctuation', {
|
|
44413
|
-
'spock-block': /\b(?:and|cleanup|expect|given|setup|then|when|where):/
|
|
44414
|
-
})
|
|
44415
|
-
Prism.languages.insertBefore('groovy', 'function', {
|
|
44416
|
-
annotation: {
|
|
44417
|
-
pattern: /(^|[^.])@\w+/,
|
|
44418
|
-
lookbehind: true,
|
|
44419
|
-
alias: 'punctuation'
|
|
44420
|
-
}
|
|
44421
|
-
}) // Handle string interpolation
|
|
44422
|
-
Prism.hooks.add('wrap', function (env) {
|
|
44423
|
-
if (env.language === 'groovy' && env.type === 'string') {
|
|
44424
|
-
var delimiter = env.content.value[0]
|
|
44425
|
-
if (delimiter != "'") {
|
|
44426
|
-
var pattern = /([^\\])(?:\$(?:\{.*?\}|[\w.]+))/
|
|
44427
|
-
if (delimiter === '$') {
|
|
44428
|
-
pattern = /([^\$])(?:\$(?:\{.*?\}|[\w.]+))/
|
|
44429
|
-
} // To prevent double HTML-encoding we have to decode env.content first
|
|
44430
|
-
env.content.value = env.content.value
|
|
44431
|
-
.replace(/</g, '<')
|
|
44432
|
-
.replace(/&/g, '&')
|
|
44433
|
-
env.content = Prism.highlight(env.content.value, {
|
|
44434
|
-
expression: {
|
|
44435
|
-
pattern: pattern,
|
|
44436
|
-
lookbehind: true,
|
|
44437
|
-
inside: Prism.languages.groovy
|
|
44438
|
-
}
|
|
44439
|
-
})
|
|
44440
|
-
env.classes.push(delimiter === '/' ? 'regex' : 'gstring')
|
|
44415
|
+
})
|
|
44416
|
+
Prism.languages.insertBefore('groovy', 'punctuation', {
|
|
44417
|
+
'spock-block': /\b(?:and|cleanup|expect|given|setup|then|when|where):/
|
|
44418
|
+
})
|
|
44419
|
+
Prism.languages.insertBefore('groovy', 'function', {
|
|
44420
|
+
annotation: {
|
|
44421
|
+
pattern: /(^|[^.])@\w+/,
|
|
44422
|
+
lookbehind: true,
|
|
44423
|
+
alias: 'punctuation'
|
|
44441
44424
|
}
|
|
44442
|
-
}
|
|
44443
|
-
|
|
44425
|
+
})
|
|
44426
|
+
interpolation.inside.expression.inside = Prism.languages.groovy
|
|
44427
|
+
})(Prism)
|
|
44444
44428
|
}
|
|
44445
44429
|
|
|
44446
44430
|
;// CONCATENATED MODULE: ./node_modules/refractor/lang/textile.js
|
|
@@ -44910,7 +44894,7 @@ code |
|
|
|
44910
44894
|
// @ts-nocheck
|
|
44911
44895
|
|
|
44912
44896
|
handlebars.displayName = 'handlebars'
|
|
44913
|
-
handlebars.aliases = ['hbs']
|
|
44897
|
+
handlebars.aliases = ['hbs', 'mustache']
|
|
44914
44898
|
|
|
44915
44899
|
/** @type {import('../core.js').Syntax} */
|
|
44916
44900
|
function handlebars(Prism) {
|
|
@@ -44955,6 +44939,7 @@ function handlebars(Prism) {
|
|
|
44955
44939
|
)
|
|
44956
44940
|
})
|
|
44957
44941
|
Prism.languages.hbs = Prism.languages.handlebars
|
|
44942
|
+
Prism.languages.mustache = Prism.languages.handlebars
|
|
44958
44943
|
})(Prism)
|
|
44959
44944
|
}
|
|
44960
44945
|
|
|
@@ -47407,7 +47392,8 @@ function keyman(Prism) {
|
|
|
47407
47392
|
alias: 'keyword'
|
|
47408
47393
|
},
|
|
47409
47394
|
'structural-keyword': {
|
|
47410
|
-
pattern:
|
|
47395
|
+
pattern:
|
|
47396
|
+
/\b(?:ansi|begin|group|match|newcontext|nomatch|postkeystroke|readonly|unicode|using keys)\b/i,
|
|
47411
47397
|
alias: 'keyword'
|
|
47412
47398
|
},
|
|
47413
47399
|
'compile-target': {
|
|
@@ -48659,6 +48645,63 @@ function magma(Prism) {
|
|
|
48659
48645
|
}
|
|
48660
48646
|
}
|
|
48661
48647
|
|
|
48648
|
+
;// CONCATENATED MODULE: ./node_modules/refractor/lang/mata.js
|
|
48649
|
+
// @ts-nocheck
|
|
48650
|
+
mata.displayName = 'mata'
|
|
48651
|
+
mata.aliases = []
|
|
48652
|
+
|
|
48653
|
+
/** @type {import('../core.js').Syntax} */
|
|
48654
|
+
function mata(Prism) {
|
|
48655
|
+
// https://www.stata.com/manuals/m.pdf
|
|
48656
|
+
;(function (Prism) {
|
|
48657
|
+
var orgType = /\b(?:(?:col|row)?vector|matrix|scalar)\b/.source
|
|
48658
|
+
var type =
|
|
48659
|
+
/\bvoid\b|<org>|\b(?:complex|numeric|pointer(?:\s*\([^()]*\))?|real|string|(?:class|struct)\s+\w+|transmorphic)(?:\s*<org>)?/.source.replace(
|
|
48660
|
+
/<org>/g,
|
|
48661
|
+
orgType
|
|
48662
|
+
)
|
|
48663
|
+
Prism.languages.mata = {
|
|
48664
|
+
comment: {
|
|
48665
|
+
pattern:
|
|
48666
|
+
/\/\/.*|\/\*(?:[^*/]|\*(?!\/)|\/(?!\*)|\/\*(?:[^*]|\*(?!\/))*\*\/)*\*\//,
|
|
48667
|
+
greedy: true
|
|
48668
|
+
},
|
|
48669
|
+
string: {
|
|
48670
|
+
pattern: /"[^"\r\n]*"|[‘`']".*?"[’`']/,
|
|
48671
|
+
greedy: true
|
|
48672
|
+
},
|
|
48673
|
+
'class-name': {
|
|
48674
|
+
pattern: /(\b(?:class|extends|struct)\s+)\w+(?=\s*(?:\{|\bextends\b))/,
|
|
48675
|
+
lookbehind: true
|
|
48676
|
+
},
|
|
48677
|
+
type: {
|
|
48678
|
+
pattern: RegExp(type),
|
|
48679
|
+
alias: 'class-name',
|
|
48680
|
+
inside: {
|
|
48681
|
+
punctuation: /[()]/,
|
|
48682
|
+
keyword: /\b(?:class|function|struct|void)\b/
|
|
48683
|
+
}
|
|
48684
|
+
},
|
|
48685
|
+
keyword:
|
|
48686
|
+
/\b(?:break|class|continue|do|else|end|extends|external|final|for|function|goto|if|pragma|private|protected|public|return|static|struct|unset|unused|version|virtual|while)\b/,
|
|
48687
|
+
constant: /\bNULL\b/,
|
|
48688
|
+
number: {
|
|
48689
|
+
pattern:
|
|
48690
|
+
/(^|[^\w.])(?:\d+(?:\.\d+)?(?:e[+-]?\d+)?|\d[a-f0-9]*(?:\.[a-f0-9]+)?x[+-]?\d+)i?(?![\w.])/i,
|
|
48691
|
+
lookbehind: true
|
|
48692
|
+
},
|
|
48693
|
+
missing: {
|
|
48694
|
+
pattern: /(^|[^\w.])(?:\.[a-z]?)(?![\w.])/,
|
|
48695
|
+
lookbehind: true,
|
|
48696
|
+
alias: 'symbol'
|
|
48697
|
+
},
|
|
48698
|
+
function: /\b[a-z_]\w*(?=\s*\()/i,
|
|
48699
|
+
operator: /\.\.|\+\+|--|&&|\|\||:?(?:[!=<>]=|[+\-*/^<>&|:])|[!?=\\#’`']/,
|
|
48700
|
+
punctuation: /[()[\]{},;.]/
|
|
48701
|
+
}
|
|
48702
|
+
})(Prism)
|
|
48703
|
+
}
|
|
48704
|
+
|
|
48662
48705
|
;// CONCATENATED MODULE: ./node_modules/refractor/lang/matlab.js
|
|
48663
48706
|
// @ts-nocheck
|
|
48664
48707
|
matlab.displayName = 'matlab'
|
|
@@ -48781,16 +48824,23 @@ mel.aliases = []
|
|
|
48781
48824
|
/** @type {import('../core.js').Syntax} */
|
|
48782
48825
|
function mel(Prism) {
|
|
48783
48826
|
Prism.languages.mel = {
|
|
48784
|
-
comment:
|
|
48827
|
+
comment: {
|
|
48828
|
+
pattern: /\/\/.*|\/\*[\s\S]*?\*\//,
|
|
48829
|
+
greedy: true
|
|
48830
|
+
},
|
|
48785
48831
|
code: {
|
|
48786
|
-
pattern: /`(?:\\.|[
|
|
48832
|
+
pattern: /`(?:\\.|[^\\`])*`/,
|
|
48787
48833
|
greedy: true,
|
|
48788
48834
|
alias: 'italic',
|
|
48789
48835
|
inside: {
|
|
48790
48836
|
delimiter: {
|
|
48791
48837
|
pattern: /^`|`$/,
|
|
48792
48838
|
alias: 'punctuation'
|
|
48793
|
-
}
|
|
48839
|
+
},
|
|
48840
|
+
statement: {
|
|
48841
|
+
pattern: /[\s\S]+/,
|
|
48842
|
+
inside: null // see below
|
|
48843
|
+
}
|
|
48794
48844
|
}
|
|
48795
48845
|
},
|
|
48796
48846
|
string: {
|
|
@@ -48805,24 +48855,20 @@ function mel(Prism) {
|
|
|
48805
48855
|
},
|
|
48806
48856
|
keyword:
|
|
48807
48857
|
/\b(?:break|case|continue|default|do|else|float|for|global|if|in|int|matrix|proc|return|string|switch|vector|while)\b/,
|
|
48808
|
-
function:
|
|
48809
|
-
/\b\w+(?=\()|\b(?:CBG|HfAddAttractorToAS|HfAssignAS|HfBuildEqualMap|HfBuildFurFiles|HfBuildFurImages|HfCancelAFR|HfConnectASToHF|HfCreateAttractor|HfDeleteAS|HfEditAS|HfPerformCreateAS|HfRemoveAttractorFromAS|HfSelectAttached|HfSelectAttractors|HfUnAssignAS|Mayatomr|about|abs|addAttr|addAttributeEditorNodeHelp|addDynamic|addNewShelfTab|addPP|addPanelCategory|addPrefixToName|advanceToNextDrivenKey|affectedNet|affects|aimConstraint|air|alias|aliasAttr|align|alignCtx|alignCurve|alignSurface|allViewFit|ambientLight|angle|angleBetween|animCone|animCurveEditor|animDisplay|animView|annotate|appendStringArray|applicationName|applyAttrPreset|applyTake|arcLenDimContext|arcLengthDimension|arclen|arrayMapper|art3dPaintCtx|artAttrCtx|artAttrPaintVertexCtx|artAttrSkinPaintCtx|artAttrTool|artBuildPaintMenu|artFluidAttrCtx|artPuttyCtx|artSelectCtx|artSetPaintCtx|artUserPaintCtx|assignCommand|assignInputDevice|assignViewportFactories|attachCurve|attachDeviceAttr|attachSurface|attrColorSliderGrp|attrCompatibility|attrControlGrp|attrEnumOptionMenu|attrEnumOptionMenuGrp|attrFieldGrp|attrFieldSliderGrp|attrNavigationControlGrp|attrPresetEditWin|attributeExists|attributeInfo|attributeMenu|attributeQuery|autoKeyframe|autoPlace|bakeClip|bakeFluidShading|bakePartialHistory|bakeResults|bakeSimulation|basename|basenameEx|batchRender|bessel|bevel|bevelPlus|binMembership|bindSkin|blend2|blendShape|blendShapeEditor|blendShapePanel|blendTwoAttr|blindDataType|boneLattice|boundary|boxDollyCtx|boxZoomCtx|bufferCurve|buildBookmarkMenu|buildKeyframeMenu|button|buttonManip|cacheFile|cacheFileCombine|cacheFileMerge|cacheFileTrack|camera|cameraView|canCreateManip|canvas|capitalizeString|catch|catchQuiet|ceil|changeSubdivComponentDisplayLevel|changeSubdivRegion|channelBox|character|characterMap|characterOutlineEditor|characterize|chdir|checkBox|checkBoxGrp|checkDefaultRenderGlobals|choice|circle|circularFillet|clamp|clear|clearCache|clip|clipEditor|clipEditorCurrentTimeCtx|clipSchedule|clipSchedulerOutliner|clipTrimBefore|closeCurve|closeSurface|cluster|cmdFileOutput|cmdScrollFieldExecuter|cmdScrollFieldReporter|cmdShell|coarsenSubdivSelectionList|collision|color|colorAtPoint|colorEditor|colorIndex|colorIndexSliderGrp|colorSliderButtonGrp|colorSliderGrp|columnLayout|commandEcho|commandLine|commandPort|compactHairSystem|componentEditor|compositingInterop|computePolysetVolume|condition|cone|confirmDialog|connectAttr|connectControl|connectDynamic|connectJoint|connectionInfo|constrain|constrainValue|constructionHistory|container|containsMultibyte|contextInfo|control|convertFromOldLayers|convertIffToPsd|convertLightmap|convertSolidTx|convertTessellation|convertUnit|copyArray|copyFlexor|copyKey|copySkinWeights|cos|cpButton|cpCache|cpClothSet|cpCollision|cpConstraint|cpConvClothToMesh|cpForces|cpGetSolverAttr|cpPanel|cpProperty|cpRigidCollisionFilter|cpSeam|cpSetEdit|cpSetSolverAttr|cpSolver|cpSolverTypes|cpTool|cpUpdateClothUVs|createDisplayLayer|createDrawCtx|createEditor|createLayeredPsdFile|createMotionField|createNewShelf|createNode|createRenderLayer|createSubdivRegion|cross|crossProduct|ctxAbort|ctxCompletion|ctxEditMode|ctxTraverse|currentCtx|currentTime|currentTimeCtx|currentUnit|curve|curveAddPtCtx|curveCVCtx|curveEPCtx|curveEditorCtx|curveIntersect|curveMoveEPCtx|curveOnSurface|curveSketchCtx|cutKey|cycleCheck|cylinder|dagPose|date|defaultLightListCheckBox|defaultNavigation|defineDataServer|defineVirtualDevice|deformer|deg_to_rad|delete|deleteAttr|deleteShadingGroupsAndMaterials|deleteShelfTab|deleteUI|deleteUnusedBrushes|delrandstr|detachCurve|detachDeviceAttr|detachSurface|deviceEditor|devicePanel|dgInfo|dgdirty|dgeval|dgtimer|dimWhen|directKeyCtx|directionalLight|dirmap|dirname|disable|disconnectAttr|disconnectJoint|diskCache|displacementToPoly|displayAffected|displayColor|displayCull|displayLevelOfDetail|displayPref|displayRGBColor|displaySmoothness|displayStats|displayString|displaySurface|distanceDimContext|distanceDimension|doBlur|dolly|dollyCtx|dopeSheetEditor|dot|dotProduct|doubleProfileBirailSurface|drag|dragAttrContext|draggerContext|dropoffLocator|duplicate|duplicateCurve|duplicateSurface|dynCache|dynControl|dynExport|dynExpression|dynGlobals|dynPaintEditor|dynParticleCtx|dynPref|dynRelEdPanel|dynRelEditor|dynamicLoad|editAttrLimits|editDisplayLayerGlobals|editDisplayLayerMembers|editRenderLayerAdjustment|editRenderLayerGlobals|editRenderLayerMembers|editor|editorTemplate|effector|emit|emitter|enableDevice|encodeString|endString|endsWith|env|equivalent|equivalentTol|erf|error|eval|evalDeferred|evalEcho|event|exactWorldBoundingBox|exclusiveLightCheckBox|exec|executeForEachObject|exists|exp|expression|expressionEditorListen|extendCurve|extendSurface|extrude|fcheck|fclose|feof|fflush|fgetline|fgetword|file|fileBrowserDialog|fileDialog|fileExtension|fileInfo|filetest|filletCurve|filter|filterCurve|filterExpand|filterStudioImport|findAllIntersections|findAnimCurves|findKeyframe|findMenuItem|findRelatedSkinCluster|finder|firstParentOf|fitBspline|flexor|floatEq|floatField|floatFieldGrp|floatScrollBar|floatSlider|floatSlider2|floatSliderButtonGrp|floatSliderGrp|floor|flow|fluidCacheInfo|fluidEmitter|fluidVoxelInfo|flushUndo|fmod|fontDialog|fopen|formLayout|format|fprint|frameLayout|fread|freeFormFillet|frewind|fromNativePath|fwrite|gamma|gauss|geometryConstraint|getApplicationVersionAsFloat|getAttr|getClassification|getDefaultBrush|getFileList|getFluidAttr|getInputDeviceRange|getMayaPanelTypes|getModifiers|getPanel|getParticleAttr|getPluginResource|getenv|getpid|glRender|glRenderEditor|globalStitch|gmatch|goal|gotoBindPose|grabColor|gradientControl|gradientControlNoAttr|graphDollyCtx|graphSelectContext|graphTrackCtx|gravity|grid|gridLayout|group|groupObjectsByName|hardenPointCurve|hardware|hardwareRenderPanel|headsUpDisplay|headsUpMessage|help|helpLine|hermite|hide|hilite|hitTest|hotBox|hotkey|hotkeyCheck|hsv_to_rgb|hudButton|hudSlider|hudSliderButton|hwReflectionMap|hwRender|hwRenderLoad|hyperGraph|hyperPanel|hyperShade|hypot|iconTextButton|iconTextCheckBox|iconTextRadioButton|iconTextRadioCollection|iconTextScrollList|iconTextStaticLabel|ikHandle|ikHandleCtx|ikHandleDisplayScale|ikSolver|ikSplineHandleCtx|ikSystem|ikSystemInfo|ikfkDisplayMethod|illustratorCurves|image|imfPlugins|inheritTransform|insertJoint|insertJointCtx|insertKeyCtx|insertKnotCurve|insertKnotSurface|instance|instanceable|instancer|intField|intFieldGrp|intScrollBar|intSlider|intSliderGrp|interToUI|internalVar|intersect|iprEngine|isAnimCurve|isConnected|isDirty|isParentOf|isSameObject|isTrue|isValidObjectName|isValidString|isValidUiName|isolateSelect|itemFilter|itemFilterAttr|itemFilterRender|itemFilterType|joint|jointCluster|jointCtx|jointDisplayScale|jointLattice|keyTangent|keyframe|keyframeOutliner|keyframeRegionCurrentTimeCtx|keyframeRegionDirectKeyCtx|keyframeRegionDollyCtx|keyframeRegionInsertKeyCtx|keyframeRegionMoveKeyCtx|keyframeRegionScaleKeyCtx|keyframeRegionSelectKeyCtx|keyframeRegionSetKeyCtx|keyframeRegionTrackCtx|keyframeStats|lassoContext|lattice|latticeDeformKeyCtx|launch|launchImageEditor|layerButton|layeredShaderPort|layeredTexturePort|layout|layoutDialog|lightList|lightListEditor|lightListPanel|lightlink|lineIntersection|linearPrecision|linstep|listAnimatable|listAttr|listCameras|listConnections|listDeviceAttachments|listHistory|listInputDeviceAxes|listInputDeviceButtons|listInputDevices|listMenuAnnotation|listNodeTypes|listPanelCategories|listRelatives|listSets|listTransforms|listUnselected|listerEditor|loadFluid|loadNewShelf|loadPlugin|loadPluginLanguageResources|loadPrefObjects|localizedPanelLabel|lockNode|loft|log|longNameOf|lookThru|ls|lsThroughFilter|lsType|lsUI|mag|makeIdentity|makeLive|makePaintable|makeRoll|makeSingleSurface|makeTubeOn|makebot|manipMoveContext|manipMoveLimitsCtx|manipOptions|manipRotateContext|manipRotateLimitsCtx|manipScaleContext|manipScaleLimitsCtx|marker|match|max|memory|menu|menuBarLayout|menuEditor|menuItem|menuItemToShelf|menuSet|menuSetPref|messageLine|min|minimizeApp|mirrorJoint|modelCurrentTimeCtx|modelEditor|modelPanel|mouse|movIn|movOut|move|moveIKtoFK|moveKeyCtx|moveVertexAlongDirection|multiProfileBirailSurface|mute|nParticle|nameCommand|nameField|namespace|namespaceInfo|newPanelItems|newton|nodeCast|nodeIconButton|nodeOutliner|nodePreset|nodeType|noise|nonLinear|normalConstraint|normalize|nurbsBoolean|nurbsCopyUVSet|nurbsCube|nurbsEditUV|nurbsPlane|nurbsSelect|nurbsSquare|nurbsToPoly|nurbsToPolygonsPref|nurbsToSubdiv|nurbsToSubdivPref|nurbsUVSet|nurbsViewDirectionVector|objExists|objectCenter|objectLayer|objectType|objectTypeUI|obsoleteProc|oceanNurbsPreviewPlane|offsetCurve|offsetCurveOnSurface|offsetSurface|openGLExtension|openMayaPref|optionMenu|optionMenuGrp|optionVar|orbit|orbitCtx|orientConstraint|outlinerEditor|outlinerPanel|overrideModifier|paintEffectsDisplay|pairBlend|palettePort|paneLayout|panel|panelConfiguration|panelHistory|paramDimContext|paramDimension|paramLocator|parent|parentConstraint|particle|particleExists|particleInstancer|particleRenderInfo|partition|pasteKey|pathAnimation|pause|pclose|percent|performanceOptions|pfxstrokes|pickWalk|picture|pixelMove|planarSrf|plane|play|playbackOptions|playblast|plugAttr|plugNode|pluginInfo|pluginResourceUtil|pointConstraint|pointCurveConstraint|pointLight|pointMatrixMult|pointOnCurve|pointOnSurface|pointPosition|poleVectorConstraint|polyAppend|polyAppendFacetCtx|polyAppendVertex|polyAutoProjection|polyAverageNormal|polyAverageVertex|polyBevel|polyBlendColor|polyBlindData|polyBoolOp|polyBridgeEdge|polyCacheMonitor|polyCheck|polyChipOff|polyClipboard|polyCloseBorder|polyCollapseEdge|polyCollapseFacet|polyColorBlindData|polyColorDel|polyColorPerVertex|polyColorSet|polyCompare|polyCone|polyCopyUV|polyCrease|polyCreaseCtx|polyCreateFacet|polyCreateFacetCtx|polyCube|polyCut|polyCutCtx|polyCylinder|polyCylindricalProjection|polyDelEdge|polyDelFacet|polyDelVertex|polyDuplicateAndConnect|polyDuplicateEdge|polyEditUV|polyEditUVShell|polyEvaluate|polyExtrudeEdge|polyExtrudeFacet|polyExtrudeVertex|polyFlipEdge|polyFlipUV|polyForceUV|polyGeoSampler|polyHelix|polyInfo|polyInstallAction|polyLayoutUV|polyListComponentConversion|polyMapCut|polyMapDel|polyMapSew|polyMapSewMove|polyMergeEdge|polyMergeEdgeCtx|polyMergeFacet|polyMergeFacetCtx|polyMergeUV|polyMergeVertex|polyMirrorFace|polyMoveEdge|polyMoveFacet|polyMoveFacetUV|polyMoveUV|polyMoveVertex|polyNormal|polyNormalPerVertex|polyNormalizeUV|polyOptUvs|polyOptions|polyOutput|polyPipe|polyPlanarProjection|polyPlane|polyPlatonicSolid|polyPoke|polyPrimitive|polyPrism|polyProjection|polyPyramid|polyQuad|polyQueryBlindData|polyReduce|polySelect|polySelectConstraint|polySelectConstraintMonitor|polySelectCtx|polySelectEditCtx|polySeparate|polySetToFaceNormal|polySewEdge|polyShortestPathCtx|polySmooth|polySoftEdge|polySphere|polySphericalProjection|polySplit|polySplitCtx|polySplitEdge|polySplitRing|polySplitVertex|polyStraightenUVBorder|polySubdivideEdge|polySubdivideFacet|polyToSubdiv|polyTorus|polyTransfer|polyTriangulate|polyUVSet|polyUnite|polyWedgeFace|popen|popupMenu|pose|pow|preloadRefEd|print|progressBar|progressWindow|projFileViewer|projectCurve|projectTangent|projectionContext|projectionManip|promptDialog|propModCtx|propMove|psdChannelOutliner|psdEditTextureFile|psdExport|psdTextureFile|putenv|pwd|python|querySubdiv|quit|rad_to_deg|radial|radioButton|radioButtonGrp|radioCollection|radioMenuItemCollection|rampColorPort|rand|randomizeFollicles|randstate|rangeControl|readTake|rebuildCurve|rebuildSurface|recordAttr|recordDevice|redo|reference|referenceEdit|referenceQuery|refineSubdivSelectionList|refresh|refreshAE|registerPluginResource|rehash|reloadImage|removeJoint|removeMultiInstance|removePanelCategory|rename|renameAttr|renameSelectionList|renameUI|render|renderGlobalsNode|renderInfo|renderLayerButton|renderLayerParent|renderLayerPostProcess|renderLayerUnparent|renderManip|renderPartition|renderQualityNode|renderSettings|renderThumbnailUpdate|renderWindowEditor|renderWindowSelectContext|renderer|reorder|reorderDeformers|requires|reroot|resampleFluid|resetAE|resetPfxToPolyCamera|resetTool|resolutionNode|retarget|reverseCurve|reverseSurface|revolve|rgb_to_hsv|rigidBody|rigidSolver|roll|rollCtx|rootOf|rot|rotate|rotationInterpolation|roundConstantRadius|rowColumnLayout|rowLayout|runTimeCommand|runup|sampleImage|saveAllShelves|saveAttrPreset|saveFluid|saveImage|saveInitialState|saveMenu|savePrefObjects|savePrefs|saveShelf|saveToolSettings|scale|scaleBrushBrightness|scaleComponents|scaleConstraint|scaleKey|scaleKeyCtx|sceneEditor|sceneUIReplacement|scmh|scriptCtx|scriptEditorInfo|scriptJob|scriptNode|scriptTable|scriptToShelf|scriptedPanel|scriptedPanelType|scrollField|scrollLayout|sculpt|searchPathArray|seed|selLoadSettings|select|selectContext|selectCurveCV|selectKey|selectKeyCtx|selectKeyframeRegionCtx|selectMode|selectPref|selectPriority|selectType|selectedNodes|selectionConnection|separator|setAttr|setAttrEnumResource|setAttrMapping|setAttrNiceNameResource|setConstraintRestPosition|setDefaultShadingGroup|setDrivenKeyframe|setDynamic|setEditCtx|setEditor|setFluidAttr|setFocus|setInfinity|setInputDeviceMapping|setKeyCtx|setKeyPath|setKeyframe|setKeyframeBlendshapeTargetWts|setMenuMode|setNodeNiceNameResource|setNodeTypeFlag|setParent|setParticleAttr|setPfxToPolyCamera|setPluginResource|setProject|setStampDensity|setStartupMessage|setState|setToolTo|setUITemplate|setXformManip|sets|shadingConnection|shadingGeometryRelCtx|shadingLightRelCtx|shadingNetworkCompare|shadingNode|shapeCompare|shelfButton|shelfLayout|shelfTabLayout|shellField|shortNameOf|showHelp|showHidden|showManipCtx|showSelectionInTitle|showShadingGroupAttrEditor|showWindow|sign|simplify|sin|singleProfileBirailSurface|size|sizeBytes|skinCluster|skinPercent|smoothCurve|smoothTangentSurface|smoothstep|snap2to2|snapKey|snapMode|snapTogetherCtx|snapshot|soft|softMod|softModCtx|sort|sound|soundControl|source|spaceLocator|sphere|sphrand|spotLight|spotLightPreviewPort|spreadSheetEditor|spring|sqrt|squareSurface|srtContext|stackTrace|startString|startsWith|stitchAndExplodeShell|stitchSurface|stitchSurfacePoints|strcmp|stringArrayCatenate|stringArrayContains|stringArrayCount|stringArrayInsertAtIndex|stringArrayIntersector|stringArrayRemove|stringArrayRemoveAtIndex|stringArrayRemoveDuplicates|stringArrayRemoveExact|stringArrayToString|stringToStringArray|strip|stripPrefixFromName|stroke|subdAutoProjection|subdCleanTopology|subdCollapse|subdDuplicateAndConnect|subdEditUV|subdListComponentConversion|subdMapCut|subdMapSewMove|subdMatchTopology|subdMirror|subdToBlind|subdToPoly|subdTransferUVsToCache|subdiv|subdivCrease|subdivDisplaySmoothness|substitute|substituteAllString|substituteGeometry|substring|surface|surfaceSampler|surfaceShaderList|swatchDisplayPort|switchTable|symbolButton|symbolCheckBox|sysFile|system|tabLayout|tan|tangentConstraint|texLatticeDeformContext|texManipContext|texMoveContext|texMoveUVShellContext|texRotateContext|texScaleContext|texSelectContext|texSelectShortestPathCtx|texSmudgeUVContext|texWinToolCtx|text|textCurves|textField|textFieldButtonGrp|textFieldGrp|textManip|textScrollList|textToShelf|textureDisplacePlane|textureHairColor|texturePlacementContext|textureWindow|threadCount|threePointArcCtx|timeControl|timePort|timerX|toNativePath|toggle|toggleAxis|toggleWindowVisibility|tokenize|tokenizeList|tolerance|tolower|toolButton|toolCollection|toolDropped|toolHasOptions|toolPropertyWindow|torus|toupper|trace|track|trackCtx|transferAttributes|transformCompare|transformLimits|translator|trim|trunc|truncateFluidCache|truncateHairCache|tumble|tumbleCtx|turbulence|twoPointArcCtx|uiRes|uiTemplate|unassignInputDevice|undo|undoInfo|ungroup|uniform|unit|unloadPlugin|untangleUV|untitledFileName|untrim|upAxis|updateAE|userCtx|uvLink|uvSnapshot|validateShelfName|vectorize|view2dToolCtx|viewCamera|viewClipPlane|viewFit|viewHeadOn|viewLookAt|viewManip|viewPlace|viewSet|visor|volumeAxis|vortex|waitCursor|warning|webBrowser|webBrowserPrefs|whatIs|window|windowPref|wire|wireContext|workspace|wrinkle|wrinkleContext|writeTake|xbmLangPathList|xform)\b/,
|
|
48810
|
-
|
|
48811
|
-
|
|
48812
|
-
|
|
48813
|
-
|
|
48814
|
-
|
|
48815
|
-
|
|
48816
|
-
|
|
48817
|
-
|
|
48818
|
-
|
|
48819
|
-
|
|
48820
|
-
lookbehind: true
|
|
48821
|
-
}
|
|
48822
|
-
],
|
|
48823
|
-
punctuation: /<<|>>|[.,:;?\[\](){}]/
|
|
48858
|
+
function: {
|
|
48859
|
+
pattern:
|
|
48860
|
+
/((?:^|[{;])[ \t]*)[a-z_]\w*\b(?!\s*(?:\.(?!\.)|[[{=]))|\b[a-z_]\w*(?=[ \t]*\()/im,
|
|
48861
|
+
lookbehind: true,
|
|
48862
|
+
greedy: true
|
|
48863
|
+
},
|
|
48864
|
+
'tensor-punctuation': {
|
|
48865
|
+
pattern: /<<|>>/,
|
|
48866
|
+
alias: 'punctuation'
|
|
48867
|
+
},
|
|
48868
|
+
operator: /\+[+=]?|-[-=]?|&&|\|\||[<>]=?|[*\/!=]=?|[%^]/,
|
|
48869
|
+
punctuation: /[.,:;?\[\](){}]/
|
|
48824
48870
|
}
|
|
48825
|
-
Prism.languages.mel['code'].inside.
|
|
48871
|
+
Prism.languages.mel['code'].inside['statement'].inside = Prism.languages.mel
|
|
48826
48872
|
}
|
|
48827
48873
|
|
|
48828
48874
|
;// CONCATENATED MODULE: ./node_modules/refractor/lang/mermaid.js
|
|
@@ -49657,7 +49703,7 @@ function neon(Prism) {
|
|
|
49657
49703
|
key: {
|
|
49658
49704
|
pattern: /(^|[[{(,\s])[^,:=[\]{}()'"\s]+(?=\s*:(?:$|[\]}),\s])|\s*=)/,
|
|
49659
49705
|
lookbehind: true,
|
|
49660
|
-
alias: '
|
|
49706
|
+
alias: 'property'
|
|
49661
49707
|
},
|
|
49662
49708
|
number: {
|
|
49663
49709
|
pattern:
|
|
@@ -50098,6 +50144,103 @@ function ocaml(Prism) {
|
|
|
50098
50144
|
}
|
|
50099
50145
|
}
|
|
50100
50146
|
|
|
50147
|
+
;// CONCATENATED MODULE: ./node_modules/refractor/lang/odin.js
|
|
50148
|
+
// @ts-nocheck
|
|
50149
|
+
odin.displayName = 'odin'
|
|
50150
|
+
odin.aliases = []
|
|
50151
|
+
|
|
50152
|
+
/** @type {import('../core.js').Syntax} */
|
|
50153
|
+
function odin(Prism) {
|
|
50154
|
+
;(function (Prism) {
|
|
50155
|
+
var escapes =
|
|
50156
|
+
/\\(?:["'\\abefnrtv]|0[0-7]{2}|U[\dA-Fa-f]{6}|u[\dA-Fa-f]{4}|x[\dA-Fa-f]{2})/
|
|
50157
|
+
Prism.languages.odin = {
|
|
50158
|
+
/**
|
|
50159
|
+
* The current implementation supports only 1 level of nesting.
|
|
50160
|
+
*
|
|
50161
|
+
* @author Michael Schmidt
|
|
50162
|
+
* @author edukisto
|
|
50163
|
+
*/
|
|
50164
|
+
comment: [
|
|
50165
|
+
{
|
|
50166
|
+
pattern:
|
|
50167
|
+
/\/\*(?:[^/*]|\/(?!\*)|\*(?!\/)|\/\*(?:\*(?!\/)|[^*])*(?:\*\/|$))*(?:\*\/|$)/,
|
|
50168
|
+
greedy: true
|
|
50169
|
+
},
|
|
50170
|
+
{
|
|
50171
|
+
pattern: /#![^\n\r]*/,
|
|
50172
|
+
greedy: true
|
|
50173
|
+
},
|
|
50174
|
+
{
|
|
50175
|
+
pattern: /\/\/[^\n\r]*/,
|
|
50176
|
+
greedy: true
|
|
50177
|
+
}
|
|
50178
|
+
],
|
|
50179
|
+
/**
|
|
50180
|
+
* Should be found before strings because of '"'"- and '`'`-like sequences.
|
|
50181
|
+
*/
|
|
50182
|
+
char: {
|
|
50183
|
+
pattern: /'(?:\\(?:.|[0Uux][0-9A-Fa-f]{1,6})|[^\n\r'\\])'/,
|
|
50184
|
+
greedy: true,
|
|
50185
|
+
inside: {
|
|
50186
|
+
symbol: escapes
|
|
50187
|
+
}
|
|
50188
|
+
},
|
|
50189
|
+
string: [
|
|
50190
|
+
{
|
|
50191
|
+
pattern: /`[^`]*`/,
|
|
50192
|
+
greedy: true
|
|
50193
|
+
},
|
|
50194
|
+
{
|
|
50195
|
+
pattern: /"(?:\\.|[^\n\r"\\])*"/,
|
|
50196
|
+
greedy: true,
|
|
50197
|
+
inside: {
|
|
50198
|
+
symbol: escapes
|
|
50199
|
+
}
|
|
50200
|
+
}
|
|
50201
|
+
],
|
|
50202
|
+
directive: {
|
|
50203
|
+
pattern: /#\w+/,
|
|
50204
|
+
alias: 'property'
|
|
50205
|
+
},
|
|
50206
|
+
number:
|
|
50207
|
+
/\b0(?:b[01_]+|d[\d_]+|h_*(?:(?:(?:[\dA-Fa-f]_*){8}){1,2}|(?:[\dA-Fa-f]_*){4})|o[0-7_]+|x[\dA-F_a-f]+|z[\dAB_ab]+)\b|(?:\b\d+(?:\.(?!\.)\d*)?|\B\.\d+)(?:[Ee][+-]?\d*)?[ijk]?(?!\w)/,
|
|
50208
|
+
discard: {
|
|
50209
|
+
pattern: /\b_\b/,
|
|
50210
|
+
alias: 'keyword'
|
|
50211
|
+
},
|
|
50212
|
+
'procedure-definition': {
|
|
50213
|
+
pattern: /\b\w+(?=[ \t]*(?::\s*){2}proc\b)/,
|
|
50214
|
+
alias: 'function'
|
|
50215
|
+
},
|
|
50216
|
+
keyword:
|
|
50217
|
+
/\b(?:asm|auto_cast|bit_set|break|case|cast|context|continue|defer|distinct|do|dynamic|else|enum|fallthrough|for|foreign|if|import|in|map|matrix|not_in|or_else|or_return|package|proc|return|struct|switch|transmute|typeid|union|using|when|where)\b/,
|
|
50218
|
+
/**
|
|
50219
|
+
* false, nil, true can be used as procedure names. "_" and keywords can't.
|
|
50220
|
+
*/
|
|
50221
|
+
'procedure-name': {
|
|
50222
|
+
pattern: /\b\w+(?=[ \t]*\()/,
|
|
50223
|
+
alias: 'function'
|
|
50224
|
+
},
|
|
50225
|
+
boolean: /\b(?:false|nil|true)\b/,
|
|
50226
|
+
'constant-parameter-sign': {
|
|
50227
|
+
pattern: /\$/,
|
|
50228
|
+
alias: 'important'
|
|
50229
|
+
},
|
|
50230
|
+
undefined: {
|
|
50231
|
+
pattern: /---/,
|
|
50232
|
+
alias: 'operator'
|
|
50233
|
+
},
|
|
50234
|
+
arrow: {
|
|
50235
|
+
pattern: /->/,
|
|
50236
|
+
alias: 'punctuation'
|
|
50237
|
+
},
|
|
50238
|
+
operator: /\+\+|--|\.\.[<=]?|(?:&~|[-!*+/=~]|[%&<>|]{1,2})=?|[?^]/,
|
|
50239
|
+
punctuation: /[(),.:;@\[\]{}]/
|
|
50240
|
+
}
|
|
50241
|
+
})(Prism)
|
|
50242
|
+
}
|
|
50243
|
+
|
|
50101
50244
|
;// CONCATENATED MODULE: ./node_modules/refractor/lang/opencl.js
|
|
50102
50245
|
// @ts-nocheck
|
|
50103
50246
|
|
|
@@ -50795,6 +50938,128 @@ function phpExtras(Prism) {
|
|
|
50795
50938
|
})
|
|
50796
50939
|
}
|
|
50797
50940
|
|
|
50941
|
+
;// CONCATENATED MODULE: ./node_modules/refractor/lang/plant-uml.js
|
|
50942
|
+
// @ts-nocheck
|
|
50943
|
+
plantUml.displayName = 'plant-uml'
|
|
50944
|
+
plantUml.aliases = ['plantuml']
|
|
50945
|
+
|
|
50946
|
+
/** @type {import('../core.js').Syntax} */
|
|
50947
|
+
function plantUml(Prism) {
|
|
50948
|
+
;(function (Prism) {
|
|
50949
|
+
var variable = /\$\w+|%[a-z]+%/
|
|
50950
|
+
var arrowAttr = /\[[^[\]]*\]/.source
|
|
50951
|
+
var arrowDirection = /(?:[drlu]|do|down|le|left|ri|right|up)/.source
|
|
50952
|
+
var arrowBody =
|
|
50953
|
+
'(?:-+' +
|
|
50954
|
+
arrowDirection +
|
|
50955
|
+
'-+|\\.+' +
|
|
50956
|
+
arrowDirection +
|
|
50957
|
+
'\\.+|-+(?:' +
|
|
50958
|
+
arrowAttr +
|
|
50959
|
+
'-*)?|' +
|
|
50960
|
+
arrowAttr +
|
|
50961
|
+
'-+|\\.+(?:' +
|
|
50962
|
+
arrowAttr +
|
|
50963
|
+
'\\.*)?|' +
|
|
50964
|
+
arrowAttr +
|
|
50965
|
+
'\\.+)'
|
|
50966
|
+
var arrowLeft = /(?:<{1,2}|\/{1,2}|\\{1,2}|<\||[#*^+}xo])/.source
|
|
50967
|
+
var arrowRight = /(?:>{1,2}|\/{1,2}|\\{1,2}|\|>|[#*^+{xo])/.source
|
|
50968
|
+
var arrowPrefix = /[[?]?[ox]?/.source
|
|
50969
|
+
var arrowSuffix = /[ox]?[\]?]?/.source
|
|
50970
|
+
var arrow =
|
|
50971
|
+
arrowPrefix +
|
|
50972
|
+
'(?:' +
|
|
50973
|
+
arrowBody +
|
|
50974
|
+
arrowRight +
|
|
50975
|
+
'|' +
|
|
50976
|
+
arrowLeft +
|
|
50977
|
+
arrowBody +
|
|
50978
|
+
'(?:' +
|
|
50979
|
+
arrowRight +
|
|
50980
|
+
')?' +
|
|
50981
|
+
')' +
|
|
50982
|
+
arrowSuffix
|
|
50983
|
+
Prism.languages['plant-uml'] = {
|
|
50984
|
+
comment: {
|
|
50985
|
+
pattern: /(^[ \t]*)(?:'.*|\/'[\s\S]*?'\/)/m,
|
|
50986
|
+
lookbehind: true,
|
|
50987
|
+
greedy: true
|
|
50988
|
+
},
|
|
50989
|
+
preprocessor: {
|
|
50990
|
+
pattern: /(^[ \t]*)!.*/m,
|
|
50991
|
+
lookbehind: true,
|
|
50992
|
+
greedy: true,
|
|
50993
|
+
alias: 'property',
|
|
50994
|
+
inside: {
|
|
50995
|
+
variable: variable
|
|
50996
|
+
}
|
|
50997
|
+
},
|
|
50998
|
+
delimiter: {
|
|
50999
|
+
pattern: /(^[ \t]*)@(?:end|start)uml\b/m,
|
|
51000
|
+
lookbehind: true,
|
|
51001
|
+
greedy: true,
|
|
51002
|
+
alias: 'punctuation'
|
|
51003
|
+
},
|
|
51004
|
+
arrow: {
|
|
51005
|
+
pattern: RegExp(
|
|
51006
|
+
/(^|[^-.<>?|\\[\]ox])/.source + arrow + /(?![-.<>?|\\\]ox])/.source
|
|
51007
|
+
),
|
|
51008
|
+
lookbehind: true,
|
|
51009
|
+
greedy: true,
|
|
51010
|
+
alias: 'operator',
|
|
51011
|
+
inside: {
|
|
51012
|
+
expression: {
|
|
51013
|
+
pattern: /(\[)[^[\]]+(?=\])/,
|
|
51014
|
+
lookbehind: true,
|
|
51015
|
+
inside: null // see below
|
|
51016
|
+
},
|
|
51017
|
+
punctuation: /\[(?=$|\])|^\]/
|
|
51018
|
+
}
|
|
51019
|
+
},
|
|
51020
|
+
string: {
|
|
51021
|
+
pattern: /"[^"]*"/,
|
|
51022
|
+
greedy: true
|
|
51023
|
+
},
|
|
51024
|
+
text: {
|
|
51025
|
+
pattern: /(\[[ \t]*[\r\n]+(?![\r\n]))[^\]]*(?=\])/,
|
|
51026
|
+
lookbehind: true,
|
|
51027
|
+
greedy: true,
|
|
51028
|
+
alias: 'string'
|
|
51029
|
+
},
|
|
51030
|
+
keyword: [
|
|
51031
|
+
{
|
|
51032
|
+
pattern:
|
|
51033
|
+
/^([ \t]*)(?:abstract\s+class|end\s+(?:box|fork|group|merge|note|ref|split|title)|(?:fork|split)(?:\s+again)?|activate|actor|agent|alt|annotation|artifact|autoactivate|autonumber|backward|binary|boundary|box|break|caption|card|case|circle|class|clock|cloud|collections|component|concise|control|create|critical|database|deactivate|destroy|detach|diamond|else|elseif|end|end[hr]note|endif|endswitch|endwhile|entity|enum|file|folder|footer|frame|group|[hr]?note|header|hexagon|hide|if|interface|label|legend|loop|map|namespace|network|newpage|node|nwdiag|object|opt|package|page|par|participant|person|queue|rectangle|ref|remove|repeat|restore|return|robust|scale|set|show|skinparam|stack|start|state|stop|storage|switch|title|together|usecase|usecase\/|while)(?=\s|$)/m,
|
|
51034
|
+
lookbehind: true,
|
|
51035
|
+
greedy: true
|
|
51036
|
+
},
|
|
51037
|
+
/\b(?:elseif|equals|not|while)(?=\s*\()/,
|
|
51038
|
+
/\b(?:as|is|then)\b/
|
|
51039
|
+
],
|
|
51040
|
+
divider: {
|
|
51041
|
+
pattern: /^==.+==$/m,
|
|
51042
|
+
greedy: true,
|
|
51043
|
+
alias: 'important'
|
|
51044
|
+
},
|
|
51045
|
+
time: {
|
|
51046
|
+
pattern: /@(?:\d+(?:[:/]\d+){2}|[+-]?\d+|:[a-z]\w*(?:[+-]\d+)?)\b/i,
|
|
51047
|
+
greedy: true,
|
|
51048
|
+
alias: 'number'
|
|
51049
|
+
},
|
|
51050
|
+
color: {
|
|
51051
|
+
pattern: /#(?:[a-z_]+|[a-fA-F0-9]+)\b/,
|
|
51052
|
+
alias: 'symbol'
|
|
51053
|
+
},
|
|
51054
|
+
variable: variable,
|
|
51055
|
+
punctuation: /[:,;()[\]{}]|\.{3}/
|
|
51056
|
+
}
|
|
51057
|
+
Prism.languages['plant-uml'].arrow.inside.expression.inside =
|
|
51058
|
+
Prism.languages['plant-uml']
|
|
51059
|
+
Prism.languages['plantuml'] = Prism.languages['plant-uml']
|
|
51060
|
+
})(Prism)
|
|
51061
|
+
}
|
|
51062
|
+
|
|
50798
51063
|
;// CONCATENATED MODULE: ./node_modules/refractor/lang/plsql.js
|
|
50799
51064
|
// @ts-nocheck
|
|
50800
51065
|
|
|
@@ -51122,12 +51387,16 @@ properties.aliases = []
|
|
|
51122
51387
|
function properties(Prism) {
|
|
51123
51388
|
Prism.languages.properties = {
|
|
51124
51389
|
comment: /^[ \t]*[#!].*$/m,
|
|
51125
|
-
|
|
51390
|
+
value: {
|
|
51126
51391
|
pattern:
|
|
51127
51392
|
/(^[ \t]*(?:\\(?:\r\n|[\s\S])|[^\\\s:=])+(?: *[=:] *(?! )| ))(?:\\(?:\r\n|[\s\S])|[^\\\r\n])+/m,
|
|
51128
|
-
lookbehind: true
|
|
51393
|
+
lookbehind: true,
|
|
51394
|
+
alias: 'attr-value'
|
|
51395
|
+
},
|
|
51396
|
+
key: {
|
|
51397
|
+
pattern: /^[ \t]*(?:\\(?:\r\n|[\s\S])|[^\\\s:=])+(?= *[=:]| )/m,
|
|
51398
|
+
alias: 'attr-name'
|
|
51129
51399
|
},
|
|
51130
|
-
'attr-name': /^[ \t]*(?:\\(?:\r\n|[\s\S])|[^\\\s:=])+(?= *[=:]| )/m,
|
|
51131
51400
|
punctuation: /[=:]/
|
|
51132
51401
|
}
|
|
51133
51402
|
}
|
|
@@ -51875,7 +52144,7 @@ slightly changed to pass all tests
|
|
|
51875
52144
|
function: /\b\w+(?:\.\w+)?\s*(?=\()/,
|
|
51876
52145
|
number: /(?:\$[\da-f]+|\b-?(?:\d+(?:\.\d+)?|\.\d+)(?:e[+-]?\d+)?)\b/i,
|
|
51877
52146
|
operator:
|
|
51878
|
-
/(?:@\*?|\?|\*)\w
|
|
52147
|
+
/(?:@\*?|\?|\*)\w+\$?|-[>-]?|\+\+?|!=?|<<?=?|>>?=?|==?|&&?|\|?\||[~^%?*/@]/
|
|
51879
52148
|
})
|
|
51880
52149
|
Prism.languages.insertBefore('purebasic', 'keyword', {
|
|
51881
52150
|
tag: /#\w+\$?/,
|
|
@@ -52363,9 +52632,28 @@ function cshtml(Prism) {
|
|
|
52363
52632
|
.replace(/<comment>/g, '(?:' + commentLike + ')')
|
|
52364
52633
|
}
|
|
52365
52634
|
var round = nested(/\((?:[^()'"@/]|<str>|<comment>|<self>)*\)/.source, 2)
|
|
52366
|
-
var square = nested(/\[(?:[^\[\]'"@/]|<str>|<comment>|<self>)*\]/.source,
|
|
52635
|
+
var square = nested(/\[(?:[^\[\]'"@/]|<str>|<comment>|<self>)*\]/.source, 1)
|
|
52367
52636
|
var curly = nested(/\{(?:[^{}'"@/]|<str>|<comment>|<self>)*\}/.source, 2)
|
|
52368
|
-
var angle = nested(/<(?:[^<>'"@/]|<
|
|
52637
|
+
var angle = nested(/<(?:[^<>'"@/]|<comment>|<self>)*>/.source, 1)
|
|
52638
|
+
var inlineCs =
|
|
52639
|
+
/@/.source +
|
|
52640
|
+
/(?:await\b\s*)?/.source +
|
|
52641
|
+
'(?:' +
|
|
52642
|
+
/(?!await\b)\w+\b/.source +
|
|
52643
|
+
'|' +
|
|
52644
|
+
round +
|
|
52645
|
+
')' +
|
|
52646
|
+
'(?:' +
|
|
52647
|
+
/[?!]?\.\w+\b/.source +
|
|
52648
|
+
'|' +
|
|
52649
|
+
'(?:' +
|
|
52650
|
+
angle +
|
|
52651
|
+
')?' +
|
|
52652
|
+
round +
|
|
52653
|
+
'|' +
|
|
52654
|
+
square +
|
|
52655
|
+
')*' +
|
|
52656
|
+
/(?![?!\.(\[]|<(?!\/))/.source // Note about the above bracket patterns:
|
|
52369
52657
|
// They all ignore HTML expressions that might be in the C# code. This is a problem because HTML (like strings and
|
|
52370
52658
|
// comments) is parsed differently. This is a huge problem because HTML might contain brackets and quotes which
|
|
52371
52659
|
// messes up the bracket and string counting implemented by the above patterns.
|
|
@@ -52376,9 +52664,20 @@ function cshtml(Prism) {
|
|
|
52376
52664
|
//
|
|
52377
52665
|
// To somewhat alleviate the problem a bit, the patterns for characters (e.g. 'a') is very permissive, it also
|
|
52378
52666
|
// allows invalid characters to support HTML expressions like this: <p>That's it!</p>.
|
|
52667
|
+
var tagAttrInlineCs = /@(?![\w()])/.source + '|' + inlineCs
|
|
52668
|
+
var tagAttrValue =
|
|
52669
|
+
'(?:' +
|
|
52670
|
+
/"[^"@]*"|'[^'@]*'|[^\s'"@>=]+(?=[\s>])/.source +
|
|
52671
|
+
'|' +
|
|
52672
|
+
'["\'][^"\'@]*(?:(?:' +
|
|
52673
|
+
tagAttrInlineCs +
|
|
52674
|
+
')[^"\'@]*)+["\']' +
|
|
52675
|
+
')'
|
|
52379
52676
|
var tagAttrs =
|
|
52380
|
-
/(?:\s(?:\s*[^\s>\/=]+(?:\s*=\s
|
|
52381
|
-
|
|
52677
|
+
/(?:\s(?:\s*[^\s>\/=]+(?:\s*=\s*<tagAttrValue>|(?=[\s/>])))+)?/.source.replace(
|
|
52678
|
+
/<tagAttrValue>/,
|
|
52679
|
+
tagAttrValue
|
|
52680
|
+
)
|
|
52382
52681
|
var tagContent = /(?!\d)[^\s>\/=$<%]+/.source + tagAttrs + /\s*\/?>/.source
|
|
52383
52682
|
var tagRegion =
|
|
52384
52683
|
/\B@?/.source +
|
|
@@ -52443,6 +52742,28 @@ function cshtml(Prism) {
|
|
|
52443
52742
|
alias: 'language-csharp',
|
|
52444
52743
|
inside: csharpWithHtml
|
|
52445
52744
|
}
|
|
52745
|
+
var inlineValue = {
|
|
52746
|
+
pattern: RegExp(/(^|[^@])/.source + inlineCs),
|
|
52747
|
+
lookbehind: true,
|
|
52748
|
+
greedy: true,
|
|
52749
|
+
alias: 'variable',
|
|
52750
|
+
inside: {
|
|
52751
|
+
keyword: /^@/,
|
|
52752
|
+
csharp: cs
|
|
52753
|
+
}
|
|
52754
|
+
}
|
|
52755
|
+
Prism.languages.cshtml.tag.pattern = RegExp(/<\/?/.source + tagContent)
|
|
52756
|
+
Prism.languages.cshtml.tag.inside['attr-value'].pattern = RegExp(
|
|
52757
|
+
/=\s*/.source + tagAttrValue
|
|
52758
|
+
)
|
|
52759
|
+
Prism.languages.insertBefore(
|
|
52760
|
+
'inside',
|
|
52761
|
+
'punctuation',
|
|
52762
|
+
{
|
|
52763
|
+
value: inlineValue
|
|
52764
|
+
},
|
|
52765
|
+
Prism.languages.cshtml.tag.inside['attr-value']
|
|
52766
|
+
)
|
|
52446
52767
|
Prism.languages.insertBefore('cshtml', 'prolog', {
|
|
52447
52768
|
'razor-comment': {
|
|
52448
52769
|
pattern: /@\*[\s\S]*?\*@/,
|
|
@@ -52486,7 +52807,8 @@ function cshtml(Prism) {
|
|
|
52486
52807
|
')?' +
|
|
52487
52808
|
/\s*/.source +
|
|
52488
52809
|
curly +
|
|
52489
|
-
')*'
|
|
52810
|
+
')*', // @helper Ident(params) { ... }
|
|
52811
|
+
/helper\s+\w+\s*/.source + round + /\s*/.source + curly
|
|
52490
52812
|
].join('|') +
|
|
52491
52813
|
')'
|
|
52492
52814
|
),
|
|
@@ -52507,34 +52829,7 @@ function cshtml(Prism) {
|
|
|
52507
52829
|
csharp: cs
|
|
52508
52830
|
}
|
|
52509
52831
|
},
|
|
52510
|
-
value:
|
|
52511
|
-
pattern: RegExp(
|
|
52512
|
-
/(^|[^@])@/.source +
|
|
52513
|
-
/(?:await\b\s*)?/.source +
|
|
52514
|
-
'(?:' +
|
|
52515
|
-
/\w+\b/.source +
|
|
52516
|
-
'|' +
|
|
52517
|
-
round +
|
|
52518
|
-
')' +
|
|
52519
|
-
'(?:' +
|
|
52520
|
-
/[?!]?\.\w+\b/.source +
|
|
52521
|
-
'|' +
|
|
52522
|
-
round +
|
|
52523
|
-
'|' +
|
|
52524
|
-
square +
|
|
52525
|
-
'|' +
|
|
52526
|
-
angle +
|
|
52527
|
-
round +
|
|
52528
|
-
')*'
|
|
52529
|
-
),
|
|
52530
|
-
lookbehind: true,
|
|
52531
|
-
greedy: true,
|
|
52532
|
-
alias: 'variable',
|
|
52533
|
-
inside: {
|
|
52534
|
-
keyword: /^@/,
|
|
52535
|
-
csharp: cs
|
|
52536
|
-
}
|
|
52537
|
-
},
|
|
52832
|
+
value: inlineValue,
|
|
52538
52833
|
'delegate-operator': {
|
|
52539
52834
|
pattern: /(^|[^@])@(?=<)/,
|
|
52540
52835
|
lookbehind: true,
|
|
@@ -52864,6 +53159,81 @@ function renpy(Prism) {
|
|
|
52864
53159
|
Prism.languages.rpy = Prism.languages.renpy
|
|
52865
53160
|
}
|
|
52866
53161
|
|
|
53162
|
+
;// CONCATENATED MODULE: ./node_modules/refractor/lang/rescript.js
|
|
53163
|
+
// @ts-nocheck
|
|
53164
|
+
rescript.displayName = 'rescript'
|
|
53165
|
+
rescript.aliases = ['res']
|
|
53166
|
+
|
|
53167
|
+
/** @type {import('../core.js').Syntax} */
|
|
53168
|
+
function rescript(Prism) {
|
|
53169
|
+
Prism.languages.rescript = {
|
|
53170
|
+
comment: {
|
|
53171
|
+
pattern: /\/\/.*|\/\*[\s\S]*?(?:\*\/|$)/,
|
|
53172
|
+
greedy: true
|
|
53173
|
+
},
|
|
53174
|
+
char: {
|
|
53175
|
+
pattern: /'(?:[^\r\n\\]|\\(?:.|\w+))'/,
|
|
53176
|
+
greedy: true
|
|
53177
|
+
},
|
|
53178
|
+
string: {
|
|
53179
|
+
pattern: /"(?:\\(?:\r\n|[\s\S])|[^\\\r\n"])*"/,
|
|
53180
|
+
greedy: true
|
|
53181
|
+
},
|
|
53182
|
+
'class-name': /\b[A-Z]\w*|@[a-z.]*|#[A-Za-z]\w*|#\d/,
|
|
53183
|
+
function: {
|
|
53184
|
+
pattern: /[a-zA-Z]\w*(?=\()|(\.)[a-z]\w*/,
|
|
53185
|
+
lookbehind: true
|
|
53186
|
+
},
|
|
53187
|
+
number:
|
|
53188
|
+
/(?:\b0x(?:[\da-f]+(?:\.[\da-f]*)?|\.[\da-f]+)(?:p[+-]?\d+)?|(?:\b\d+(?:\.\d*)?|\B\.\d+)(?:e[+-]?\d+)?)[ful]{0,4}/i,
|
|
53189
|
+
boolean: /\b(?:false|true)\b/,
|
|
53190
|
+
'attr-value': /[A-Za-z]\w*(?==)/,
|
|
53191
|
+
constant: {
|
|
53192
|
+
pattern: /(\btype\s+)[a-z]\w*/,
|
|
53193
|
+
lookbehind: true
|
|
53194
|
+
},
|
|
53195
|
+
tag: {
|
|
53196
|
+
pattern: /(<)[a-z]\w*|(?:<\/)[a-z]\w*/,
|
|
53197
|
+
lookbehind: true,
|
|
53198
|
+
inside: {
|
|
53199
|
+
operator: /<|>|\//
|
|
53200
|
+
}
|
|
53201
|
+
},
|
|
53202
|
+
keyword:
|
|
53203
|
+
/\b(?:and|as|assert|begin|bool|class|constraint|do|done|downto|else|end|exception|external|float|for|fun|function|if|in|include|inherit|initializer|int|lazy|let|method|module|mutable|new|nonrec|object|of|open|or|private|rec|string|switch|then|to|try|type|when|while|with)\b/,
|
|
53204
|
+
operator:
|
|
53205
|
+
/\.{3}|:[:=]?|\|>|->|=(?:==?|>)?|<=?|>=?|[|^?'#!~`]|[+\-*\/]\.?|\b(?:asr|land|lor|lsl|lsr|lxor|mod)\b/,
|
|
53206
|
+
punctuation: /[(){}[\],;.]/
|
|
53207
|
+
}
|
|
53208
|
+
Prism.languages.insertBefore('rescript', 'string', {
|
|
53209
|
+
'template-string': {
|
|
53210
|
+
pattern:
|
|
53211
|
+
/`(?:\\[\s\S]|\$\{(?:[^{}]|\{(?:[^{}]|\{[^}]*\})*\})+\}|(?!\$\{)[^\\`])*`/,
|
|
53212
|
+
greedy: true,
|
|
53213
|
+
inside: {
|
|
53214
|
+
'template-punctuation': {
|
|
53215
|
+
pattern: /^`|`$/,
|
|
53216
|
+
alias: 'string'
|
|
53217
|
+
},
|
|
53218
|
+
interpolation: {
|
|
53219
|
+
pattern:
|
|
53220
|
+
/((?:^|[^\\])(?:\\{2})*)\$\{(?:[^{}]|\{(?:[^{}]|\{[^}]*\})*\})+\}/,
|
|
53221
|
+
lookbehind: true,
|
|
53222
|
+
inside: {
|
|
53223
|
+
'interpolation-punctuation': {
|
|
53224
|
+
pattern: /^\$\{|\}$/,
|
|
53225
|
+
alias: 'tag'
|
|
53226
|
+
},
|
|
53227
|
+
rest: Prism.languages.rescript
|
|
53228
|
+
}
|
|
53229
|
+
},
|
|
53230
|
+
string: /[\s\S]+/
|
|
53231
|
+
}
|
|
53232
|
+
}
|
|
53233
|
+
})
|
|
53234
|
+
Prism.languages.res = Prism.languages.rescript
|
|
53235
|
+
}
|
|
53236
|
+
|
|
52867
53237
|
;// CONCATENATED MODULE: ./node_modules/refractor/lang/rest.js
|
|
52868
53238
|
// @ts-nocheck
|
|
52869
53239
|
rest.displayName = 'rest'
|
|
@@ -54557,6 +54927,93 @@ function stan(Prism) {
|
|
|
54557
54927
|
})(Prism)
|
|
54558
54928
|
}
|
|
54559
54929
|
|
|
54930
|
+
;// CONCATENATED MODULE: ./node_modules/refractor/lang/stata.js
|
|
54931
|
+
// @ts-nocheck
|
|
54932
|
+
|
|
54933
|
+
|
|
54934
|
+
|
|
54935
|
+
stata.displayName = 'stata'
|
|
54936
|
+
stata.aliases = []
|
|
54937
|
+
|
|
54938
|
+
/** @type {import('../core.js').Syntax} */
|
|
54939
|
+
function stata(Prism) {
|
|
54940
|
+
Prism.register(java)
|
|
54941
|
+
Prism.register(mata)
|
|
54942
|
+
Prism.register(python)
|
|
54943
|
+
// https://www.stata.com/manuals/u.pdf
|
|
54944
|
+
// https://www.stata.com/manuals/p.pdf
|
|
54945
|
+
Prism.languages.stata = {
|
|
54946
|
+
comment: [
|
|
54947
|
+
{
|
|
54948
|
+
pattern: /(^[ \t]*)\*.*/m,
|
|
54949
|
+
lookbehind: true,
|
|
54950
|
+
greedy: true
|
|
54951
|
+
},
|
|
54952
|
+
{
|
|
54953
|
+
pattern: /(^|\s)\/\/.*|\/\*[\s\S]*?\*\//,
|
|
54954
|
+
lookbehind: true,
|
|
54955
|
+
greedy: true
|
|
54956
|
+
}
|
|
54957
|
+
],
|
|
54958
|
+
'string-literal': {
|
|
54959
|
+
pattern: /"[^"\r\n]*"|[‘`']".*?"[’`']/,
|
|
54960
|
+
greedy: true,
|
|
54961
|
+
inside: {
|
|
54962
|
+
interpolation: {
|
|
54963
|
+
pattern: /\$\{[^{}]*\}|[‘`']\w[^’`'\r\n]*[’`']/,
|
|
54964
|
+
inside: {
|
|
54965
|
+
punctuation: /^\$\{|\}$/,
|
|
54966
|
+
expression: {
|
|
54967
|
+
pattern: /[\s\S]+/,
|
|
54968
|
+
inside: null // see below
|
|
54969
|
+
}
|
|
54970
|
+
}
|
|
54971
|
+
},
|
|
54972
|
+
string: /[\s\S]+/
|
|
54973
|
+
}
|
|
54974
|
+
},
|
|
54975
|
+
mata: {
|
|
54976
|
+
pattern: /(^[ \t]*mata[ \t]*:)[\s\S]+?(?=^end\b)/m,
|
|
54977
|
+
lookbehind: true,
|
|
54978
|
+
greedy: true,
|
|
54979
|
+
alias: 'language-mata',
|
|
54980
|
+
inside: Prism.languages.mata
|
|
54981
|
+
},
|
|
54982
|
+
java: {
|
|
54983
|
+
pattern: /(^[ \t]*java[ \t]*:)[\s\S]+?(?=^end\b)/m,
|
|
54984
|
+
lookbehind: true,
|
|
54985
|
+
greedy: true,
|
|
54986
|
+
alias: 'language-java',
|
|
54987
|
+
inside: Prism.languages.java
|
|
54988
|
+
},
|
|
54989
|
+
python: {
|
|
54990
|
+
pattern: /(^[ \t]*python[ \t]*:)[\s\S]+?(?=^end\b)/m,
|
|
54991
|
+
lookbehind: true,
|
|
54992
|
+
greedy: true,
|
|
54993
|
+
alias: 'language-python',
|
|
54994
|
+
inside: Prism.languages.python
|
|
54995
|
+
},
|
|
54996
|
+
command: {
|
|
54997
|
+
pattern:
|
|
54998
|
+
/(^[ \t]*(?:\.[ \t]+)?(?:(?:bayes|bootstrap|by|bysort|capture|collect|fmm|fp|frame|jackknife|mfp|mi|nestreg|noisily|permute|quietly|rolling|simulate|statsby|stepwise|svy|version|xi)\b[^:\r\n]*:[ \t]*|(?:capture|noisily|quietly|version)[ \t]+)?)[a-zA-Z]\w*/m,
|
|
54999
|
+
lookbehind: true,
|
|
55000
|
+
greedy: true,
|
|
55001
|
+
alias: 'keyword'
|
|
55002
|
+
},
|
|
55003
|
+
variable: /\$\w+|[‘`']\w[^’`'\r\n]*[’`']/,
|
|
55004
|
+
keyword:
|
|
55005
|
+
/\b(?:bayes|bootstrap|by|bysort|capture|clear|collect|fmm|fp|frame|if|in|jackknife|mi[ \t]+estimate|mfp|nestreg|noisily|of|permute|quietly|rolling|simulate|sort|statsby|stepwise|svy|varlist|version|xi)\b/,
|
|
55006
|
+
boolean: /\b(?:off|on)\b/,
|
|
55007
|
+
number: /\b\d+(?:\.\d+)?\b|\B\.\d+/,
|
|
55008
|
+
function: /\b[a-z_]\w*(?=\()/i,
|
|
55009
|
+
operator: /\+\+|--|##?|[<>!=~]=?|[+\-*^&|/]/,
|
|
55010
|
+
punctuation: /[(){}[\],:]/
|
|
55011
|
+
}
|
|
55012
|
+
Prism.languages.stata[
|
|
55013
|
+
'string-literal'
|
|
55014
|
+
].inside.interpolation.inside.expression.inside = Prism.languages.stata
|
|
55015
|
+
}
|
|
55016
|
+
|
|
54560
55017
|
;// CONCATENATED MODULE: ./node_modules/refractor/lang/iecst.js
|
|
54561
55018
|
// @ts-nocheck
|
|
54562
55019
|
iecst.displayName = 'iecst'
|
|
@@ -54602,6 +55059,49 @@ function iecst(Prism) {
|
|
|
54602
55059
|
}
|
|
54603
55060
|
}
|
|
54604
55061
|
|
|
55062
|
+
;// CONCATENATED MODULE: ./node_modules/refractor/lang/supercollider.js
|
|
55063
|
+
// @ts-nocheck
|
|
55064
|
+
supercollider.displayName = 'supercollider'
|
|
55065
|
+
supercollider.aliases = ['sclang']
|
|
55066
|
+
|
|
55067
|
+
/** @type {import('../core.js').Syntax} */
|
|
55068
|
+
function supercollider(Prism) {
|
|
55069
|
+
Prism.languages.supercollider = {
|
|
55070
|
+
comment: {
|
|
55071
|
+
pattern:
|
|
55072
|
+
/\/\/.*|\/\*(?:[^*/]|\*(?!\/)|\/(?!\*)|\/\*(?:[^*]|\*(?!\/))*\*\/)*\*\//,
|
|
55073
|
+
greedy: true
|
|
55074
|
+
},
|
|
55075
|
+
string: {
|
|
55076
|
+
pattern: /(^|[^\\])"(?:[^"\\]|\\[\s\S])*"/,
|
|
55077
|
+
lookbehind: true,
|
|
55078
|
+
greedy: true
|
|
55079
|
+
},
|
|
55080
|
+
char: {
|
|
55081
|
+
pattern: /\$(?:[^\\\r\n]|\\.)/,
|
|
55082
|
+
greedy: true
|
|
55083
|
+
},
|
|
55084
|
+
symbol: {
|
|
55085
|
+
pattern: /(^|[^\\])'(?:[^'\\]|\\[\s\S])*'|\\\w+/,
|
|
55086
|
+
lookbehind: true,
|
|
55087
|
+
greedy: true
|
|
55088
|
+
},
|
|
55089
|
+
keyword: /\b(?:_|arg|classvar|const|nil|var|while)\b/,
|
|
55090
|
+
boolean: /\b(?:false|true)\b/,
|
|
55091
|
+
label: {
|
|
55092
|
+
pattern: /\b[a-z_]\w*(?=\s*:)/,
|
|
55093
|
+
alias: 'property'
|
|
55094
|
+
},
|
|
55095
|
+
number:
|
|
55096
|
+
/\b(?:inf|pi|0x[0-9a-fA-F]+|\d+(?:\.\d+)?(?:[eE][+-]?\d+)?(?:pi)?|\d+r[0-9a-zA-Z]+(?:\.[0-9a-zA-Z]+)?|\d+[sb]{1,4}\d*)\b/,
|
|
55097
|
+
'class-name': /\b[A-Z]\w*\b/,
|
|
55098
|
+
operator:
|
|
55099
|
+
/\.{2,3}|#(?![[{])|&&|[!=]==?|\+>>|\+{1,3}|-[->]|=>|>>|\?\?|@\|?@|\|(?:@|[!=]=)?\||!\?|<[!=>]|\*{1,2}|<{2,3}\*?|[-!%&/<>?@|=`]/,
|
|
55100
|
+
punctuation: /[{}()[\].:,;]|#[[{]/
|
|
55101
|
+
}
|
|
55102
|
+
Prism.languages.sclang = Prism.languages.supercollider
|
|
55103
|
+
}
|
|
55104
|
+
|
|
54605
55105
|
;// CONCATENATED MODULE: ./node_modules/refractor/lang/systemd.js
|
|
54606
55106
|
// @ts-nocheck
|
|
54607
55107
|
systemd.displayName = 'systemd'
|
|
@@ -55600,10 +56100,13 @@ function vhdl(Prism) {
|
|
|
55600
56100
|
alias: 'function'
|
|
55601
56101
|
},
|
|
55602
56102
|
string: /"(?:[^\\"\r\n]|\\(?:\r\n|[\s\S]))*"/,
|
|
55603
|
-
|
|
56103
|
+
attribute: {
|
|
56104
|
+
pattern: /\b'\w+/,
|
|
56105
|
+
alias: 'attr-name'
|
|
56106
|
+
},
|
|
55604
56107
|
// support for predefined attributes included
|
|
55605
56108
|
keyword:
|
|
55606
|
-
/\b(?:
|
|
56109
|
+
/\b(?:access|after|alias|all|architecture|array|assert|attribute|begin|block|body|buffer|bus|case|component|configuration|constant|disconnect|downto|else|elsif|end|entity|exit|file|for|function|generate|generic|group|guarded|if|impure|in|inertial|inout|is|label|library|linkage|literal|loop|map|new|next|null|of|on|open|others|out|package|port|postponed|private|procedure|process|pure|range|record|register|reject|report|return|select|severity|shared|signal|subtype|then|to|transport|type|unaffected|units|until|use|variable|view|wait|when|while|with)\b/i,
|
|
55607
56110
|
boolean: /\b(?:false|true)\b/i,
|
|
55608
56111
|
function: /\w+(?=\()/,
|
|
55609
56112
|
// decimal, based, physical, and exponential numbers supported
|
|
@@ -55990,7 +56493,7 @@ function wolfram(Prism) {
|
|
|
55990
56493
|
number:
|
|
55991
56494
|
/(?:\b(?=\d)|\B(?=\.))(?:0[bo])?(?:(?:\d|0x[\da-f])[\da-f]*(?:\.\d*)?|\.\d+)(?:e[+-]?\d+)?j?\b/i,
|
|
55992
56495
|
operator:
|
|
55993
|
-
|
|
56496
|
+
/\/\.|;|=\.|\^=|\^:=|:=|<<|>>|<\||\|>|:>|\|->|->|<-|@@@|@@|@|\/@|=!=|===|==|=|\+|-|\[\/-+%=\]=?|!=|\*\*?=?|\/\/?=?|<[<=>]?|>[=>]?|[&|^~]/,
|
|
55994
56497
|
punctuation: /[{}[\];(),.:]/
|
|
55995
56498
|
}
|
|
55996
56499
|
Prism.languages.mathematica = Prism.languages.wolfram
|
|
@@ -56933,6 +57436,19 @@ function zig(Prism) {
|
|
|
56933
57436
|
|
|
56934
57437
|
|
|
56935
57438
|
|
|
57439
|
+
|
|
57440
|
+
|
|
57441
|
+
|
|
57442
|
+
|
|
57443
|
+
|
|
57444
|
+
|
|
57445
|
+
|
|
57446
|
+
|
|
57447
|
+
|
|
57448
|
+
|
|
57449
|
+
|
|
57450
|
+
|
|
57451
|
+
|
|
56936
57452
|
|
|
56937
57453
|
|
|
56938
57454
|
|
|
@@ -56969,6 +57485,11 @@ refractor.register(c)
|
|
|
56969
57485
|
refractor.register(cpp)
|
|
56970
57486
|
refractor.register(arduino)
|
|
56971
57487
|
refractor.register(arff)
|
|
57488
|
+
refractor.register(armasm)
|
|
57489
|
+
refractor.register(bash)
|
|
57490
|
+
refractor.register(yaml)
|
|
57491
|
+
refractor.register(markdown)
|
|
57492
|
+
refractor.register(arturo)
|
|
56972
57493
|
refractor.register(asciidoc)
|
|
56973
57494
|
refractor.register(csharp)
|
|
56974
57495
|
refractor.register(aspnet)
|
|
@@ -56978,7 +57499,7 @@ refractor.register(autohotkey)
|
|
|
56978
57499
|
refractor.register(autoit)
|
|
56979
57500
|
refractor.register(avisynth)
|
|
56980
57501
|
refractor.register(avroIdl)
|
|
56981
|
-
refractor.register(
|
|
57502
|
+
refractor.register(awk)
|
|
56982
57503
|
refractor.register(basic)
|
|
56983
57504
|
refractor.register(batch)
|
|
56984
57505
|
refractor.register(bbcode)
|
|
@@ -56999,11 +57520,13 @@ refractor.register(cobol)
|
|
|
56999
57520
|
refractor.register(coffeescript)
|
|
57000
57521
|
refractor.register(concurnas)
|
|
57001
57522
|
refractor.register(csp)
|
|
57523
|
+
refractor.register(cooklang)
|
|
57002
57524
|
refractor.register(coq)
|
|
57003
57525
|
refractor.register(ruby)
|
|
57004
57526
|
refractor.register(crystal)
|
|
57005
57527
|
refractor.register(cssExtras)
|
|
57006
57528
|
refractor.register(csv)
|
|
57529
|
+
refractor.register(cue)
|
|
57007
57530
|
refractor.register(cypher)
|
|
57008
57531
|
refractor.register(d)
|
|
57009
57532
|
refractor.register(dart)
|
|
@@ -57039,14 +57562,14 @@ refractor.register(gap)
|
|
|
57039
57562
|
refractor.register(gcode)
|
|
57040
57563
|
refractor.register(gdscript)
|
|
57041
57564
|
refractor.register(gedcom)
|
|
57565
|
+
refractor.register(gettext)
|
|
57042
57566
|
refractor.register(gherkin)
|
|
57043
57567
|
refractor.register(git)
|
|
57044
57568
|
refractor.register(glsl)
|
|
57045
57569
|
refractor.register(gn)
|
|
57570
|
+
refractor.register(linkerScript)
|
|
57046
57571
|
refractor.register(go)
|
|
57047
57572
|
refractor.register(goModule)
|
|
57048
|
-
refractor.register(yaml)
|
|
57049
|
-
refractor.register(markdown)
|
|
57050
57573
|
refractor.register(graphql)
|
|
57051
57574
|
refractor.register(groovy)
|
|
57052
57575
|
refractor.register(less)
|
|
@@ -57108,6 +57631,7 @@ refractor.register(log)
|
|
|
57108
57631
|
refractor.register(lolcode)
|
|
57109
57632
|
refractor.register(magma)
|
|
57110
57633
|
refractor.register(makefile)
|
|
57634
|
+
refractor.register(mata)
|
|
57111
57635
|
refractor.register(matlab)
|
|
57112
57636
|
refractor.register(maxscript)
|
|
57113
57637
|
refractor.register(mel)
|
|
@@ -57128,6 +57652,7 @@ refractor.register(nix)
|
|
|
57128
57652
|
refractor.register(nsis)
|
|
57129
57653
|
refractor.register(objectivec)
|
|
57130
57654
|
refractor.register(ocaml)
|
|
57655
|
+
refractor.register(odin)
|
|
57131
57656
|
refractor.register(opencl)
|
|
57132
57657
|
refractor.register(openqasm)
|
|
57133
57658
|
refractor.register(oz)
|
|
@@ -57141,6 +57666,7 @@ refractor.register(peoplecode)
|
|
|
57141
57666
|
refractor.register(perl)
|
|
57142
57667
|
refractor.register(phpdoc)
|
|
57143
57668
|
refractor.register(phpExtras)
|
|
57669
|
+
refractor.register(plantUml)
|
|
57144
57670
|
refractor.register(plsql)
|
|
57145
57671
|
refractor.register(powerquery)
|
|
57146
57672
|
refractor.register(powershell)
|
|
@@ -57169,6 +57695,7 @@ refractor.register(tsx)
|
|
|
57169
57695
|
refractor.register(reason)
|
|
57170
57696
|
refractor.register(rego)
|
|
57171
57697
|
refractor.register(renpy)
|
|
57698
|
+
refractor.register(rescript)
|
|
57172
57699
|
refractor.register(rest)
|
|
57173
57700
|
refractor.register(rip)
|
|
57174
57701
|
refractor.register(roboconf)
|
|
@@ -57190,7 +57717,9 @@ refractor.register(splunkSpl)
|
|
|
57190
57717
|
refractor.register(sqf)
|
|
57191
57718
|
refractor.register(squirrel)
|
|
57192
57719
|
refractor.register(stan)
|
|
57720
|
+
refractor.register(stata)
|
|
57193
57721
|
refractor.register(iecst)
|
|
57722
|
+
refractor.register(supercollider)
|
|
57194
57723
|
refractor.register(swift)
|
|
57195
57724
|
refractor.register(systemd)
|
|
57196
57725
|
refractor.register(t4Templating)
|
|
@@ -57894,7 +58423,7 @@ const pseudo_handle = zwitch('name', {
|
|
|
57894
58423
|
// @ts-expect-error: hush.
|
|
57895
58424
|
has,
|
|
57896
58425
|
// @ts-expect-error: hush.
|
|
57897
|
-
lang,
|
|
58426
|
+
lang: pseudo_lang,
|
|
57898
58427
|
// @ts-expect-error: hush.
|
|
57899
58428
|
'last-child': lastChild,
|
|
57900
58429
|
// @ts-expect-error: hush.
|
|
@@ -58208,7 +58737,7 @@ function firstChild(query, _1, _2, _3, state) {
|
|
|
58208
58737
|
* @param {SelectState} state
|
|
58209
58738
|
* @returns {boolean}
|
|
58210
58739
|
*/
|
|
58211
|
-
function
|
|
58740
|
+
function pseudo_lang(query, _1, _2, _3, state) {
|
|
58212
58741
|
return (
|
|
58213
58742
|
state.language !== '' &&
|
|
58214
58743
|
state.language !== undefined &&
|
|
@@ -59237,16 +59766,32 @@ function copyElement(str) {
|
|
|
59237
59766
|
;// CONCATENATED MODULE: ./node_modules/@uiw/react-markdown-preview/esm/styles/markdown.css
|
|
59238
59767
|
// extracted by mini-css-extract-plugin
|
|
59239
59768
|
/* harmony default export */ const styles_markdown = ({});
|
|
59240
|
-
|
|
59241
|
-
var jsx_runtime = __webpack_require__(724);
|
|
59242
|
-
;// CONCATENATED MODULE: ./node_modules/@uiw/react-markdown-preview/esm/index.js
|
|
59769
|
+
;// CONCATENATED MODULE: ./node_modules/@uiw/react-markdown-preview/esm/plugins/reservedMeta.js
|
|
59243
59770
|
|
|
59244
59771
|
|
|
59245
|
-
var
|
|
59772
|
+
var reservedMeta = function reservedMeta(options) {
|
|
59773
|
+
if (options === void 0) {
|
|
59774
|
+
options = {};
|
|
59775
|
+
}
|
|
59246
59776
|
|
|
59777
|
+
return tree => {
|
|
59778
|
+
visit(tree, node => {
|
|
59779
|
+
if (node.type === 'element' && node.tagName === 'code' && node.data && node.data.meta) {
|
|
59780
|
+
node.properties = _extends({}, node.properties, {
|
|
59781
|
+
'data-meta': String(node.data.meta)
|
|
59782
|
+
});
|
|
59783
|
+
}
|
|
59784
|
+
});
|
|
59785
|
+
};
|
|
59786
|
+
};
|
|
59247
59787
|
|
|
59788
|
+
// EXTERNAL MODULE: ./node_modules/react/jsx-runtime.js
|
|
59789
|
+
var jsx_runtime = __webpack_require__(724);
|
|
59790
|
+
;// CONCATENATED MODULE: ./node_modules/@uiw/react-markdown-preview/esm/index.js
|
|
59248
59791
|
|
|
59249
59792
|
|
|
59793
|
+
var _excluded = ["prefixCls", "className", "source", "style", "disableCopy", "onScroll", "onMouseOver", "pluginsFilter", "warpperElement"];
|
|
59794
|
+
|
|
59250
59795
|
|
|
59251
59796
|
|
|
59252
59797
|
|
|
@@ -59257,23 +59802,8 @@ var _excluded = ["prefixCls", "className", "source", "style", "onScroll", "onMou
|
|
|
59257
59802
|
|
|
59258
59803
|
|
|
59259
59804
|
|
|
59260
|
-
var rehypeRewriteHandle = (node, index, parent) => {
|
|
59261
|
-
if (node.type === 'element' && parent && parent.type === 'root' && /h(1|2|3|4|5|6)/.test(node.tagName)) {
|
|
59262
|
-
var child = node.children && node.children[0];
|
|
59263
59805
|
|
|
59264
|
-
if (child && child.properties && child.properties.ariaHidden === 'true') {
|
|
59265
|
-
child.properties = _extends({
|
|
59266
|
-
class: 'anchor'
|
|
59267
|
-
}, child.properties);
|
|
59268
|
-
child.children = [octiconLink];
|
|
59269
|
-
}
|
|
59270
|
-
}
|
|
59271
59806
|
|
|
59272
|
-
if (node.type === 'element' && node.tagName === 'pre') {
|
|
59273
|
-
var code = getCodeString(node.children);
|
|
59274
|
-
node.children.push(copyElement(code));
|
|
59275
|
-
}
|
|
59276
|
-
};
|
|
59277
59807
|
|
|
59278
59808
|
/* harmony default export */ const esm = (/*#__PURE__*/external_root_React_commonjs2_react_commonjs_react_amd_react_default().forwardRef((props, ref) => {
|
|
59279
59809
|
var {
|
|
@@ -59281,6 +59811,7 @@ var rehypeRewriteHandle = (node, index, parent) => {
|
|
|
59281
59811
|
className,
|
|
59282
59812
|
source,
|
|
59283
59813
|
style,
|
|
59814
|
+
disableCopy = false,
|
|
59284
59815
|
onScroll,
|
|
59285
59816
|
onMouseOver,
|
|
59286
59817
|
pluginsFilter,
|
|
@@ -59293,7 +59824,26 @@ var rehypeRewriteHandle = (node, index, parent) => {
|
|
|
59293
59824
|
mdp
|
|
59294
59825
|
}), [mdp, props]);
|
|
59295
59826
|
var cls = (prefixCls || '') + " " + (className || '');
|
|
59296
|
-
|
|
59827
|
+
|
|
59828
|
+
var rehypeRewriteHandle = (node, index, parent) => {
|
|
59829
|
+
if (node.type === 'element' && parent && parent.type === 'root' && /h(1|2|3|4|5|6)/.test(node.tagName)) {
|
|
59830
|
+
var child = node.children && node.children[0];
|
|
59831
|
+
|
|
59832
|
+
if (child && child.properties && child.properties.ariaHidden === 'true') {
|
|
59833
|
+
child.properties = _extends({
|
|
59834
|
+
class: 'anchor'
|
|
59835
|
+
}, child.properties);
|
|
59836
|
+
child.children = [octiconLink];
|
|
59837
|
+
}
|
|
59838
|
+
}
|
|
59839
|
+
|
|
59840
|
+
if (node.type === 'element' && node.tagName === 'pre' && !disableCopy) {
|
|
59841
|
+
var code = getCodeString(node.children);
|
|
59842
|
+
node.children.push(copyElement(code));
|
|
59843
|
+
}
|
|
59844
|
+
};
|
|
59845
|
+
|
|
59846
|
+
var rehypePlugins = [reservedMeta, [m, {
|
|
59297
59847
|
ignoreMissing: true
|
|
59298
59848
|
}], rehypeRaw, rehypeSlug, rehypeAutolinkHeadings, [rehype_rewrite_lib, {
|
|
59299
59849
|
rewrite: rehypeRewriteHandle
|
|
@@ -61329,10 +61879,10 @@ var newSelectionRange=selectWord({text:state.text,selection:state.selection});va
|
|
|
61329
61879
|
var state2=api.replaceSelection("**".concat(state1.selectedText,"**"));// Adjust the selection to not contain the **
|
|
61330
61880
|
api.setSelectionRange({start:state2.selection.end-2-state1.selectedText.length,end:state2.selection.end-2});}};
|
|
61331
61881
|
;// CONCATENATED MODULE: ./src/commands/code.tsx
|
|
61332
|
-
var code_code={name:'code',keyCommand:'code',shortcuts:'ctrlcmd+j',buttonProps:{'aria-label':'Insert code'},icon:/*#__PURE__*/(0,jsx_runtime.jsx)("svg",{width:"12",height:"12",role:"img",viewBox:"0 0 640 512",children:/*#__PURE__*/(0,jsx_runtime.jsx)("path",{fill:"currentColor",d:"M278.9 511.5l-61-17.7c-6.4-1.8-10-8.5-8.2-14.9L346.2 8.7c1.8-6.4 8.5-10 14.9-8.2l61 17.7c6.4 1.8 10 8.5 8.2 14.9L293.8 503.3c-1.9 6.4-8.5 10.1-14.9 8.2zm-114-112.2l43.5-46.4c4.6-4.9 4.3-12.7-.8-17.2L117 256l90.6-79.7c5.1-4.5 5.5-12.3.8-17.2l-43.5-46.4c-4.5-4.8-12.1-5.1-17-.5L3.8 247.2c-5.1 4.7-5.1 12.8 0 17.5l144.1 135.1c4.9 4.6 12.5 4.4 17-.5zm327.2.6l144.1-135.1c5.1-4.7 5.1-12.8 0-17.5L492.1 112.1c-4.8-4.5-12.4-4.3-17 .5L431.6 159c-4.6 4.9-4.3 12.7.8 17.2L523 256l-90.6 79.7c-5.1 4.5-5.5 12.3-.8 17.2l43.5 46.4c4.5 4.9 12.1 5.1 17 .6z"})}),execute:function execute(tate,api){// Adjust the selection to encompass the whole word if the caret is inside one
|
|
61882
|
+
var code_code={name:'code',keyCommand:'code',shortcuts:'ctrlcmd+j',buttonProps:{'aria-label':'Insert code',title:'Insert code'},icon:/*#__PURE__*/(0,jsx_runtime.jsx)("svg",{width:"12",height:"12",role:"img",viewBox:"0 0 640 512",children:/*#__PURE__*/(0,jsx_runtime.jsx)("path",{fill:"currentColor",d:"M278.9 511.5l-61-17.7c-6.4-1.8-10-8.5-8.2-14.9L346.2 8.7c1.8-6.4 8.5-10 14.9-8.2l61 17.7c6.4 1.8 10 8.5 8.2 14.9L293.8 503.3c-1.9 6.4-8.5 10.1-14.9 8.2zm-114-112.2l43.5-46.4c4.6-4.9 4.3-12.7-.8-17.2L117 256l90.6-79.7c5.1-4.5 5.5-12.3.8-17.2l-43.5-46.4c-4.5-4.8-12.1-5.1-17-.5L3.8 247.2c-5.1 4.7-5.1 12.8 0 17.5l144.1 135.1c4.9 4.6 12.5 4.4 17-.5zm327.2.6l144.1-135.1c5.1-4.7 5.1-12.8 0-17.5L492.1 112.1c-4.8-4.5-12.4-4.3-17 .5L431.6 159c-4.6 4.9-4.3 12.7.8 17.2L523 256l-90.6 79.7c-5.1 4.5-5.5 12.3-.8 17.2l43.5 46.4c4.5 4.9 12.1 5.1 17 .6z"})}),execute:function execute(tate,api){// Adjust the selection to encompass the whole word if the caret is inside one
|
|
61333
61883
|
var newSelectionRange=selectWord({text:tate.text,selection:tate.selection});var state1=api.setSelectionRange(newSelectionRange);// when there's no breaking line
|
|
61334
61884
|
if(state1.selectedText.indexOf('\n')===-1){api.replaceSelection("`".concat(state1.selectedText,"`"));// Adjust the selection to not contain the **
|
|
61335
|
-
var _selectionStart=state1.selection.start+1;var _selectionEnd=_selectionStart+state1.selectedText.length;api.setSelectionRange({start:_selectionStart,end:_selectionEnd});return;}var breaksBeforeCount=getBreaksNeededForEmptyLineBefore(state1.text,state1.selection.start);var breaksBefore=Array(breaksBeforeCount+1).join('\n');var breaksAfterCount=getBreaksNeededForEmptyLineAfter(state1.text,state1.selection.end);var breaksAfter=Array(breaksAfterCount+1).join('\n');api.replaceSelection("".concat(breaksBefore,"```\n").concat(state1.selectedText,"\n```").concat(breaksAfter));var selectionStart=state1.selection.start+breaksBeforeCount+4;var selectionEnd=selectionStart+state1.selectedText.length;api.setSelectionRange({start:selectionStart,end:selectionEnd});}};var codeBlock={name:'codeBlock',keyCommand:'codeBlock',shortcuts:'ctrlcmd+shift+j',icon:/*#__PURE__*/(0,jsx_runtime.jsx)("svg",{width:"12",height:"12",role:"img",viewBox:"0 0 156 156",children:/*#__PURE__*/(0,jsx_runtime.jsx)("path",{fill:"currentColor",d:"M110.85 120.575 43.7 120.483333 43.7083334 110.091667 110.85 110.191667 110.841667 120.583333 110.85 120.575ZM85.1333334 87.1916666 43.625 86.7083332 43.7083334 76.3166666 85.2083334 76.7916666 85.1333334 87.1916666 85.1333334 87.1916666ZM110.841667 53.4166666 43.7 53.3166666 43.7083334 42.925 110.85 43.025 110.841667 53.4166666ZM36 138C27.2916666 138 20.75 136.216667 16.4 132.666667 12.1333334 129.2 10 124.308333 10 118L10 95.3333332C10 91.0666666 9.25 88.1333332 7.7333334 86.5333332 6.3166668 84.8416666 3.7333334 84 0 84L0 72C3.7333334 72 6.3083334 71.2 7.7333334 69.6 9.2416668 67.9083334 10 64.9333334 10 60.6666666L10 38C10 31.775 12.1333334 26.8833334 16.4 23.3333332 20.7583334 19.7749998 27.2916666 18 36 18L40.6666668 18 40.6666668 30 36 30C34.0212222 29.9719277 32.1263151 30.7979128 30.8 32.2666666 29.3605875 33.8216362 28.5938182 35.8823287 28.6666668 38L28.6666668 60.6666666C28.6666668 67.5083332 26.6666668 72.4 22.6666668 75.3333332 20.9317416 76.7274684 18.8640675 77.6464347 16.6666668 78 18.8916668 78.35 20.8916668 79.2416666 22.6666668 80.6666666 26.6666668 83.95 28.6666668 88.8416666 28.6666668 95.3333332L28.6666668 118C28.6666668 120.308333 29.3750002 122.216667 30.8 123.733333 32.2166666 125.241667 33.9583334 126 36 126L40.6666668 126 40.6666668 138 36 138 36 138ZM114.116667 126 118.783333 126C120.833333 126 122.566667 125.241667 123.983333 123.733333 125.422746 122.178364 126.189515 120.117671 126.116667 118L126.116667 95.3333332C126.116667 88.8333332 128.116667 83.9499998 132.116667 80.6666666 133.9 79.2416666 135.9 78.35 138.116667 78 135.919156 77.6468047 133.851391 76.7277979 132.116667 75.3333332 128.116667 72.3999998 126.116667 67.5 126.116667 60.6666666L126.116667 38C126.189515 35.8823287 125.422746 33.8216361 123.983333 32.2666666 122.657018 30.7979128 120.762111 29.9719277 118.783333 30L114.116667 30 114.116667 18 118.783333 18C127.5 18 133.983333 19.775 138.25 23.3333332 142.608333 26.8833332 144.783333 31.7749998 144.783333 38L144.783333 60.6666666C144.783333 64.9333332 145.5 67.9083332 146.916667 69.6 148.433333 71.2 151.05 72 154.783333 72L154.783333 84C151.05 84 148.433333 84.8333334 146.916667 86.5333332 145.5 88.1333332 144.783333 91.0666666 144.783333 95.3333332L144.783333 118C144.783333 124.308333 142.616667 129.2 138.25 132.666667 133.983333 136.216667 127.5 138 118.783333 138L114.116667 138 114.116667 126 114.116667 126Z"})}),buttonProps:{'aria-label':'Insert Code Block'},execute:function execute(tate,api){// Adjust the selection to encompass the whole word if the caret is inside one
|
|
61885
|
+
var _selectionStart=state1.selection.start+1;var _selectionEnd=_selectionStart+state1.selectedText.length;api.setSelectionRange({start:_selectionStart,end:_selectionEnd});return;}var breaksBeforeCount=getBreaksNeededForEmptyLineBefore(state1.text,state1.selection.start);var breaksBefore=Array(breaksBeforeCount+1).join('\n');var breaksAfterCount=getBreaksNeededForEmptyLineAfter(state1.text,state1.selection.end);var breaksAfter=Array(breaksAfterCount+1).join('\n');api.replaceSelection("".concat(breaksBefore,"```\n").concat(state1.selectedText,"\n```").concat(breaksAfter));var selectionStart=state1.selection.start+breaksBeforeCount+4;var selectionEnd=selectionStart+state1.selectedText.length;api.setSelectionRange({start:selectionStart,end:selectionEnd});}};var codeBlock={name:'codeBlock',keyCommand:'codeBlock',shortcuts:'ctrlcmd+shift+j',icon:/*#__PURE__*/(0,jsx_runtime.jsx)("svg",{width:"12",height:"12",role:"img",viewBox:"0 0 156 156",children:/*#__PURE__*/(0,jsx_runtime.jsx)("path",{fill:"currentColor",d:"M110.85 120.575 43.7 120.483333 43.7083334 110.091667 110.85 110.191667 110.841667 120.583333 110.85 120.575ZM85.1333334 87.1916666 43.625 86.7083332 43.7083334 76.3166666 85.2083334 76.7916666 85.1333334 87.1916666 85.1333334 87.1916666ZM110.841667 53.4166666 43.7 53.3166666 43.7083334 42.925 110.85 43.025 110.841667 53.4166666ZM36 138C27.2916666 138 20.75 136.216667 16.4 132.666667 12.1333334 129.2 10 124.308333 10 118L10 95.3333332C10 91.0666666 9.25 88.1333332 7.7333334 86.5333332 6.3166668 84.8416666 3.7333334 84 0 84L0 72C3.7333334 72 6.3083334 71.2 7.7333334 69.6 9.2416668 67.9083334 10 64.9333334 10 60.6666666L10 38C10 31.775 12.1333334 26.8833334 16.4 23.3333332 20.7583334 19.7749998 27.2916666 18 36 18L40.6666668 18 40.6666668 30 36 30C34.0212222 29.9719277 32.1263151 30.7979128 30.8 32.2666666 29.3605875 33.8216362 28.5938182 35.8823287 28.6666668 38L28.6666668 60.6666666C28.6666668 67.5083332 26.6666668 72.4 22.6666668 75.3333332 20.9317416 76.7274684 18.8640675 77.6464347 16.6666668 78 18.8916668 78.35 20.8916668 79.2416666 22.6666668 80.6666666 26.6666668 83.95 28.6666668 88.8416666 28.6666668 95.3333332L28.6666668 118C28.6666668 120.308333 29.3750002 122.216667 30.8 123.733333 32.2166666 125.241667 33.9583334 126 36 126L40.6666668 126 40.6666668 138 36 138 36 138ZM114.116667 126 118.783333 126C120.833333 126 122.566667 125.241667 123.983333 123.733333 125.422746 122.178364 126.189515 120.117671 126.116667 118L126.116667 95.3333332C126.116667 88.8333332 128.116667 83.9499998 132.116667 80.6666666 133.9 79.2416666 135.9 78.35 138.116667 78 135.919156 77.6468047 133.851391 76.7277979 132.116667 75.3333332 128.116667 72.3999998 126.116667 67.5 126.116667 60.6666666L126.116667 38C126.189515 35.8823287 125.422746 33.8216361 123.983333 32.2666666 122.657018 30.7979128 120.762111 29.9719277 118.783333 30L114.116667 30 114.116667 18 118.783333 18C127.5 18 133.983333 19.775 138.25 23.3333332 142.608333 26.8833332 144.783333 31.7749998 144.783333 38L144.783333 60.6666666C144.783333 64.9333332 145.5 67.9083332 146.916667 69.6 148.433333 71.2 151.05 72 154.783333 72L154.783333 84C151.05 84 148.433333 84.8333334 146.916667 86.5333332 145.5 88.1333332 144.783333 91.0666666 144.783333 95.3333332L144.783333 118C144.783333 124.308333 142.616667 129.2 138.25 132.666667 133.983333 136.216667 127.5 138 118.783333 138L114.116667 138 114.116667 126 114.116667 126Z"})}),buttonProps:{'aria-label':'Insert Code Block',title:'Insert Code Block'},execute:function execute(tate,api){// Adjust the selection to encompass the whole word if the caret is inside one
|
|
61336
61886
|
var newSelectionRange=selectWord({text:tate.text,selection:tate.selection});var state1=api.setSelectionRange(newSelectionRange);var breaksBeforeCount=getBreaksNeededForEmptyLineBefore(state1.text,state1.selection.start);var breaksBefore=Array(breaksBeforeCount+1).join('\n');var breaksAfterCount=getBreaksNeededForEmptyLineAfter(state1.text,state1.selection.end);var breaksAfter=Array(breaksAfterCount+1).join('\n');api.replaceSelection("".concat(breaksBefore,"```\n").concat(state1.selectedText,"\n```").concat(breaksAfter));var selectionStart=state1.selection.start+breaksBeforeCount+4;var selectionEnd=selectionStart+state1.selectedText.length;api.setSelectionRange({start:selectionStart,end:selectionEnd});}};
|
|
61337
61887
|
;// CONCATENATED MODULE: ./src/commands/italic.tsx
|
|
61338
61888
|
var italic={name:'italic',keyCommand:'italic',shortcuts:'ctrlcmd+i',buttonProps:{'aria-label':'Add italic text',title:'Add italic text'},icon:/*#__PURE__*/(0,jsx_runtime.jsx)("svg",{"data-name":"italic",width:"12",height:"12",role:"img",viewBox:"0 0 320 512",children:/*#__PURE__*/(0,jsx_runtime.jsx)("path",{fill:"currentColor",d:"M204.758 416h-33.849l62.092-320h40.725a16 16 0 0 0 15.704-12.937l6.242-32C297.599 41.184 290.034 32 279.968 32H120.235a16 16 0 0 0-15.704 12.937l-6.242 32C96.362 86.816 103.927 96 113.993 96h33.846l-62.09 320H46.278a16 16 0 0 0-15.704 12.935l-6.245 32C22.402 470.815 29.967 480 40.034 480h158.479a16 16 0 0 0 15.704-12.935l6.245-32c1.927-9.88-5.638-19.065-15.704-19.065z"})}),execute:function execute(state,api){// Adjust the selection to encompass the whole word if the caret is inside one
|
|
@@ -61476,7 +62026,7 @@ function Child_Child(props){var _ref=props||{},prefixCls=_ref.prefixCls,groupNam
|
|
|
61476
62026
|
function ToolbarItems(props){var prefixCls=props.prefixCls,overflow=props.overflow;var _useContext=(0,external_root_React_commonjs2_react_commonjs_react_amd_react_.useContext)(EditorContext),fullscreen=_useContext.fullscreen,preview=_useContext.preview,_useContext$barPopup=_useContext.barPopup,barPopup=_useContext$barPopup===void 0?{}:_useContext$barPopup,commandOrchestrator=_useContext.commandOrchestrator,dispatch=_useContext.dispatch;var originalOverflow=(0,external_root_React_commonjs2_react_commonjs_react_amd_react_.useRef)('');function handleClick(command,name){if(!dispatch)return;var state={barPopup:_objectSpread2({},barPopup)};if(command.keyCommand==='preview'){state.preview=command.value;}if(command.keyCommand==='fullscreen'){state.fullscreen=!fullscreen;}if(props.commands&&command.keyCommand==='group'){props.commands.forEach(function(item){if(name===item.groupName){state.barPopup[name]=true;}else if(item.keyCommand){state.barPopup[item.groupName]=false;}});}else if(name||command.parent){Object.keys(state.barPopup||{}).forEach(function(keyName){state.barPopup[keyName]=false;});}if(Object.keys(state).length){dispatch(_objectSpread2({},state));}commandOrchestrator&&commandOrchestrator.executeCommand(command);}(0,external_root_React_commonjs2_react_commonjs_react_amd_react_.useEffect)(function(){if(document&&overflow){if(fullscreen){// prevent scroll on fullscreen
|
|
61477
62027
|
document.body.style.overflow='hidden';}else{// get the original overflow only the first time
|
|
61478
62028
|
if(!originalOverflow.current){originalOverflow.current=window.getComputedStyle(document.body,null).overflow;}// reset to the original overflow
|
|
61479
|
-
document.body.style.overflow=originalOverflow.current;}}},[fullscreen,originalOverflow,overflow]);return/*#__PURE__*/(0,jsx_runtime.jsx)("ul",{children:(props.commands||[]).map(function(item,idx){if(item.keyCommand==='divider'){return/*#__PURE__*/(0,jsx_runtime.jsx)("li",_objectSpread2(_objectSpread2({},item.liProps),{},{className:"".concat(prefixCls,"-toolbar-divider")}),idx);}if(!item.keyCommand)return/*#__PURE__*/(0,jsx_runtime.jsx)(external_root_React_commonjs2_react_commonjs_react_amd_react_.Fragment,{},idx);var activeBtn=fullscreen&&item.keyCommand==='fullscreen'||item.keyCommand==='preview'&&preview===item.value;var childNode=item.children&&typeof item.children==='function'?item.children({getState:function getState(){return commandOrchestrator.getState();},textApi:commandOrchestrator?commandOrchestrator.textApi:undefined,close:function close(){return handleClick({},item.groupName);},execute:function execute(){return handleClick({execute:item.execute});}}):undefined;var disabled=barPopup&&preview&&preview==='preview'&&!/(preview|fullscreen)/.test(item.keyCommand);return/*#__PURE__*/(0,jsx_runtime.jsxs)("li",_objectSpread2(_objectSpread2({},item.liProps),{},{className:activeBtn?"active":'',children:[!item.buttonProps&&item.icon,item.buttonProps&&/*#__PURE__*/external_root_React_commonjs2_react_commonjs_react_amd_react_default().createElement('button',_objectSpread2(_objectSpread2({type:'button',key:idx,disabled:disabled,'data-name':item.name},item.buttonProps),{},{onClick:function onClick(evn){evn.stopPropagation();handleClick(item,item.groupName);}}),item.icon),item.children&&/*#__PURE__*/(0,jsx_runtime.jsx)(Child_Child,{overflow:overflow,groupName:item.groupName,prefixCls:prefixCls,children:childNode,commands:Array.isArray(item.children)?item.children:undefined})]}),idx);})});}function Toolbar_Toolbar(){var props=arguments.length>0&&arguments[0]!==undefined?arguments[0]:{};var prefixCls=props.prefixCls,_props$height=props.height,height=_props$height===void 0?29:_props$height,isChild=props.isChild;var _useContext2=(0,external_root_React_commonjs2_react_commonjs_react_amd_react_.useContext)(EditorContext),commands=_useContext2.commands,extraCommands=_useContext2.extraCommands;return/*#__PURE__*/(0,jsx_runtime.jsxs)("div",{className:"".concat(prefixCls,"-toolbar"),style:{height:height},children:[/*#__PURE__*/(0,jsx_runtime.jsx)(ToolbarItems,_objectSpread2(_objectSpread2({},props),{},{commands:props.commands||commands||[]})),!isChild&&/*#__PURE__*/(0,jsx_runtime.jsx)(ToolbarItems,_objectSpread2(_objectSpread2({},props),{},{commands:extraCommands||[]}))]});}
|
|
62029
|
+
document.body.style.overflow=originalOverflow.current;}}},[fullscreen,originalOverflow,overflow]);return/*#__PURE__*/(0,jsx_runtime.jsx)("ul",{children:(props.commands||[]).map(function(item,idx){if(item.keyCommand==='divider'){return/*#__PURE__*/(0,jsx_runtime.jsx)("li",_objectSpread2(_objectSpread2({},item.liProps),{},{className:"".concat(prefixCls,"-toolbar-divider")}),idx);}if(!item.keyCommand)return/*#__PURE__*/(0,jsx_runtime.jsx)(external_root_React_commonjs2_react_commonjs_react_amd_react_.Fragment,{},idx);var activeBtn=fullscreen&&item.keyCommand==='fullscreen'||item.keyCommand==='preview'&&preview===item.value;var childNode=item.children&&typeof item.children==='function'?item.children({getState:function getState(){return commandOrchestrator.getState();},textApi:commandOrchestrator?commandOrchestrator.textApi:undefined,close:function close(){return handleClick({},item.groupName);},execute:function execute(){return handleClick({execute:item.execute});}}):undefined;var disabled=barPopup&&preview&&preview==='preview'&&!/(preview|fullscreen)/.test(item.keyCommand);return/*#__PURE__*/(0,jsx_runtime.jsxs)("li",_objectSpread2(_objectSpread2({},item.liProps),{},{className:activeBtn?"active":'',children:[!item.buttonProps&&item.icon,item.buttonProps&&/*#__PURE__*/external_root_React_commonjs2_react_commonjs_react_amd_react_default().createElement('button',_objectSpread2(_objectSpread2({type:'button',key:idx,disabled:disabled,'data-name':item.name},item.buttonProps),{},{onClick:function onClick(evn){evn.stopPropagation();handleClick(item,item.groupName);}}),item.icon),item.children&&/*#__PURE__*/(0,jsx_runtime.jsx)(Child_Child,{overflow:overflow,groupName:item.groupName,prefixCls:prefixCls,children:childNode,commands:Array.isArray(item.children)?item.children:undefined})]}),idx);})});}function Toolbar_Toolbar(){var props=arguments.length>0&&arguments[0]!==undefined?arguments[0]:{};var prefixCls=props.prefixCls,_props$height=props.height,height=_props$height===void 0?29:_props$height,toolbarBottom=props.toolbarBottom,isChild=props.isChild;var _useContext2=(0,external_root_React_commonjs2_react_commonjs_react_amd_react_.useContext)(EditorContext),commands=_useContext2.commands,extraCommands=_useContext2.extraCommands;var bottomClassName=toolbarBottom?'bottom':'';return/*#__PURE__*/(0,jsx_runtime.jsxs)("div",{className:"".concat(prefixCls,"-toolbar ").concat(bottomClassName),style:{height:height},children:[/*#__PURE__*/(0,jsx_runtime.jsx)(ToolbarItems,_objectSpread2(_objectSpread2({},props),{},{commands:props.commands||commands||[]})),!isChild&&/*#__PURE__*/(0,jsx_runtime.jsx)(ToolbarItems,_objectSpread2(_objectSpread2({},props),{},{commands:extraCommands||[]}))]});}
|
|
61480
62030
|
;// CONCATENATED MODULE: ./src/components/DragBar/index.less
|
|
61481
62031
|
// extracted by mini-css-extract-plugin
|
|
61482
62032
|
/* harmony default export */ const DragBar = ({});
|
|
@@ -61487,14 +62037,14 @@ var DragBar_DragBar=function DragBar(props){var _ref=props||{},prefixCls=_ref.pr
|
|
|
61487
62037
|
// extracted by mini-css-extract-plugin
|
|
61488
62038
|
/* harmony default export */ const src = ({});
|
|
61489
62039
|
;// CONCATENATED MODULE: ./src/Editor.tsx
|
|
61490
|
-
var Editor_excluded=["prefixCls","className","value","commands","commandsFilter","extraCommands","height","toolbarHeight","enableScroll","visiableDragbar","highlightEnable","preview","fullscreen","overflow","previewOptions","textareaProps","maxHeight","minHeight","autoFocus","tabSize","defaultTabEnable","onChange","onHeightChange","hideToolbar","renderTextarea"];function setGroupPopFalse(){var data=arguments.length>0&&arguments[0]!==undefined?arguments[0]:{};Object.keys(data).forEach(function(keyname){data[keyname]=false;});return data;}var InternalMDEditor=function InternalMDEditor(props,ref){var _ref=props||{},_ref$prefixCls=_ref.prefixCls,prefixCls=_ref$prefixCls===void 0?'w-md-editor':_ref$prefixCls,className=_ref.className,propsValue=_ref.value,_ref$commands=_ref.commands,commands=_ref$commands===void 0?commands_getCommands():_ref$commands,commandsFilter=_ref.commandsFilter,_ref$extraCommands=_ref.extraCommands,extraCommands=_ref$extraCommands===void 0?getExtraCommands():_ref$extraCommands,_ref$height=_ref.height,height=_ref$height===void 0?200:_ref$height,_ref$toolbarHeight=_ref.toolbarHeight,toolbarHeight=_ref$toolbarHeight===void 0?29:_ref$toolbarHeight,_ref$enableScroll=_ref.enableScroll,enableScroll=_ref$enableScroll===void 0?true:_ref$enableScroll,_ref$visiableDragbar=_ref.visiableDragbar,visiableDragbar=_ref$visiableDragbar===void 0?true:_ref$visiableDragbar,_ref$highlightEnable=_ref.highlightEnable,highlightEnable=_ref$highlightEnable===void 0?true:_ref$highlightEnable,_ref$preview=_ref.preview,previewType=_ref$preview===void 0?'live':_ref$preview,_ref$fullscreen=_ref.fullscreen,fullscreen=_ref$fullscreen===void 0?false:_ref$fullscreen,_ref$overflow=_ref.overflow,overflow=_ref$overflow===void 0?true:_ref$overflow,_ref$previewOptions=_ref.previewOptions,previewOptions=_ref$previewOptions===void 0?{}:_ref$previewOptions,textareaProps=_ref.textareaProps,_ref$maxHeight=_ref.maxHeight,maxHeight=_ref$maxHeight===void 0?1200:_ref$maxHeight,_ref$minHeight=_ref.minHeight,minHeight=_ref$minHeight===void 0?100:_ref$minHeight,autoFocus=_ref.autoFocus,_ref$tabSize=_ref.tabSize,tabSize=_ref$tabSize===void 0?2:_ref$tabSize,_ref$defaultTabEnable=_ref.defaultTabEnable,defaultTabEnable=_ref$defaultTabEnable===void 0?false:_ref$defaultTabEnable,_onChange=_ref.onChange,onHeightChange=_ref.onHeightChange,hideToolbar=_ref.hideToolbar,renderTextarea=_ref.renderTextarea,other=_objectWithoutProperties(_ref,Editor_excluded);var cmds=commands.map(function(item){return commandsFilter?commandsFilter(item,false):item;}).filter(Boolean);var extraCmds=extraCommands.map(function(item){return commandsFilter?commandsFilter(item,true):item;}).filter(Boolean);var _useReducer=(0,external_root_React_commonjs2_react_commonjs_react_amd_react_.useReducer)(reducer,{markdown:propsValue,preview:previewType,height:height,highlightEnable:highlightEnable,tabSize:tabSize,defaultTabEnable:defaultTabEnable,scrollTop:0,scrollTopPreview:0,commands:cmds,extraCommands:extraCmds,fullscreen:fullscreen,barPopup:{}}),_useReducer2=_slicedToArray(_useReducer,2),state=_useReducer2[0],dispatch=_useReducer2[1];var container=(0,external_root_React_commonjs2_react_commonjs_react_amd_react_.useRef)(null);var previewRef=(0,external_root_React_commonjs2_react_commonjs_react_amd_react_.useRef)(null);var enableScrollRef=(0,external_root_React_commonjs2_react_commonjs_react_amd_react_.useRef)(enableScroll);(0,external_root_React_commonjs2_react_commonjs_react_amd_react_.useImperativeHandle)(ref,function(){return _objectSpread2({},state);});(0,external_root_React_commonjs2_react_commonjs_react_amd_react_.useMemo)(function(){return enableScrollRef.current=enableScroll;},[enableScroll]);(0,external_root_React_commonjs2_react_commonjs_react_amd_react_.useEffect)(function(){var stateInit={};if(container.current){stateInit.container=container.current||undefined;}stateInit.markdown=propsValue||'';stateInit.barPopup={};if(dispatch){dispatch(_objectSpread2(_objectSpread2({},state),stateInit));}// eslint-disable-next-line react-hooks/exhaustive-deps
|
|
62040
|
+
var Editor_excluded=["prefixCls","className","value","commands","commandsFilter","extraCommands","height","toolbarHeight","enableScroll","visiableDragbar","highlightEnable","preview","fullscreen","overflow","previewOptions","textareaProps","maxHeight","minHeight","autoFocus","tabSize","defaultTabEnable","onChange","onHeightChange","hideToolbar","toolbarBottom","renderTextarea"];function setGroupPopFalse(){var data=arguments.length>0&&arguments[0]!==undefined?arguments[0]:{};Object.keys(data).forEach(function(keyname){data[keyname]=false;});return data;}var InternalMDEditor=function InternalMDEditor(props,ref){var _ref=props||{},_ref$prefixCls=_ref.prefixCls,prefixCls=_ref$prefixCls===void 0?'w-md-editor':_ref$prefixCls,className=_ref.className,propsValue=_ref.value,_ref$commands=_ref.commands,commands=_ref$commands===void 0?commands_getCommands():_ref$commands,commandsFilter=_ref.commandsFilter,_ref$extraCommands=_ref.extraCommands,extraCommands=_ref$extraCommands===void 0?getExtraCommands():_ref$extraCommands,_ref$height=_ref.height,height=_ref$height===void 0?200:_ref$height,_ref$toolbarHeight=_ref.toolbarHeight,toolbarHeight=_ref$toolbarHeight===void 0?29:_ref$toolbarHeight,_ref$enableScroll=_ref.enableScroll,enableScroll=_ref$enableScroll===void 0?true:_ref$enableScroll,_ref$visiableDragbar=_ref.visiableDragbar,visiableDragbar=_ref$visiableDragbar===void 0?true:_ref$visiableDragbar,_ref$highlightEnable=_ref.highlightEnable,highlightEnable=_ref$highlightEnable===void 0?true:_ref$highlightEnable,_ref$preview=_ref.preview,previewType=_ref$preview===void 0?'live':_ref$preview,_ref$fullscreen=_ref.fullscreen,fullscreen=_ref$fullscreen===void 0?false:_ref$fullscreen,_ref$overflow=_ref.overflow,overflow=_ref$overflow===void 0?true:_ref$overflow,_ref$previewOptions=_ref.previewOptions,previewOptions=_ref$previewOptions===void 0?{}:_ref$previewOptions,textareaProps=_ref.textareaProps,_ref$maxHeight=_ref.maxHeight,maxHeight=_ref$maxHeight===void 0?1200:_ref$maxHeight,_ref$minHeight=_ref.minHeight,minHeight=_ref$minHeight===void 0?100:_ref$minHeight,autoFocus=_ref.autoFocus,_ref$tabSize=_ref.tabSize,tabSize=_ref$tabSize===void 0?2:_ref$tabSize,_ref$defaultTabEnable=_ref.defaultTabEnable,defaultTabEnable=_ref$defaultTabEnable===void 0?false:_ref$defaultTabEnable,_onChange=_ref.onChange,onHeightChange=_ref.onHeightChange,hideToolbar=_ref.hideToolbar,_ref$toolbarBottom=_ref.toolbarBottom,toolbarBottom=_ref$toolbarBottom===void 0?false:_ref$toolbarBottom,renderTextarea=_ref.renderTextarea,other=_objectWithoutProperties(_ref,Editor_excluded);var cmds=commands.map(function(item){return commandsFilter?commandsFilter(item,false):item;}).filter(Boolean);var extraCmds=extraCommands.map(function(item){return commandsFilter?commandsFilter(item,true):item;}).filter(Boolean);var _useReducer=(0,external_root_React_commonjs2_react_commonjs_react_amd_react_.useReducer)(reducer,{markdown:propsValue,preview:previewType,height:height,highlightEnable:highlightEnable,tabSize:tabSize,defaultTabEnable:defaultTabEnable,scrollTop:0,scrollTopPreview:0,commands:cmds,extraCommands:extraCmds,fullscreen:fullscreen,barPopup:{}}),_useReducer2=_slicedToArray(_useReducer,2),state=_useReducer2[0],dispatch=_useReducer2[1];var container=(0,external_root_React_commonjs2_react_commonjs_react_amd_react_.useRef)(null);var previewRef=(0,external_root_React_commonjs2_react_commonjs_react_amd_react_.useRef)(null);var enableScrollRef=(0,external_root_React_commonjs2_react_commonjs_react_amd_react_.useRef)(enableScroll);(0,external_root_React_commonjs2_react_commonjs_react_amd_react_.useImperativeHandle)(ref,function(){return _objectSpread2({},state);});(0,external_root_React_commonjs2_react_commonjs_react_amd_react_.useMemo)(function(){return enableScrollRef.current=enableScroll;},[enableScroll]);(0,external_root_React_commonjs2_react_commonjs_react_amd_react_.useEffect)(function(){var stateInit={};if(container.current){stateInit.container=container.current||undefined;}stateInit.markdown=propsValue||'';stateInit.barPopup={};if(dispatch){dispatch(_objectSpread2(_objectSpread2({},state),stateInit));}// eslint-disable-next-line react-hooks/exhaustive-deps
|
|
61491
62041
|
},[]);var cls=[className,'wmde-markdown-var',prefixCls,state.preview?"".concat(prefixCls,"-show-").concat(state.preview):null,state.fullscreen?"".concat(prefixCls,"-fullscreen"):null].filter(Boolean).join(' ').trim();(0,external_root_React_commonjs2_react_commonjs_react_amd_react_.useMemo)(function(){return propsValue!==state.markdown&&dispatch({markdown:propsValue||''});},[propsValue,state.markdown]);// eslint-disable-next-line react-hooks/exhaustive-deps
|
|
61492
62042
|
(0,external_root_React_commonjs2_react_commonjs_react_amd_react_.useMemo)(function(){return previewType!==state.preview&&dispatch({preview:previewType});},[previewType]);// eslint-disable-next-line react-hooks/exhaustive-deps
|
|
61493
62043
|
(0,external_root_React_commonjs2_react_commonjs_react_amd_react_.useMemo)(function(){return tabSize!==state.tabSize&&dispatch({tabSize:tabSize});},[tabSize]);(0,external_root_React_commonjs2_react_commonjs_react_amd_react_.useMemo)(function(){return highlightEnable!==state.highlightEnable&&dispatch({highlightEnable:highlightEnable});},// eslint-disable-next-line react-hooks/exhaustive-deps
|
|
61494
62044
|
[highlightEnable]);// eslint-disable-next-line react-hooks/exhaustive-deps
|
|
61495
62045
|
(0,external_root_React_commonjs2_react_commonjs_react_amd_react_.useMemo)(function(){return autoFocus!==state.autoFocus&&dispatch({autoFocus:autoFocus});},[autoFocus]);(0,external_root_React_commonjs2_react_commonjs_react_amd_react_.useMemo)(function(){return fullscreen!==state.fullscreen&&dispatch({fullscreen:fullscreen});},// eslint-disable-next-line react-hooks/exhaustive-deps
|
|
61496
62046
|
[fullscreen]);// eslint-disable-next-line react-hooks/exhaustive-deps
|
|
61497
|
-
(0,external_root_React_commonjs2_react_commonjs_react_amd_react_.useMemo)(function(){return height!==state.height&&dispatch({height:height});},[height]);(0,external_root_React_commonjs2_react_commonjs_react_amd_react_.useMemo)(function(){return height!==state.height&&onHeightChange&&onHeightChange(state.height,height,state);},[height,onHeightChange,state]);var textareaDomRef=(0,external_root_React_commonjs2_react_commonjs_react_amd_react_.useRef)();var active=(0,external_root_React_commonjs2_react_commonjs_react_amd_react_.useRef)('preview');var initScroll=(0,external_root_React_commonjs2_react_commonjs_react_amd_react_.useRef)(false);(0,external_root_React_commonjs2_react_commonjs_react_amd_react_.useMemo)(function(){textareaDomRef.current=state.textareaWarp;if(state.textareaWarp){state.textareaWarp.addEventListener('mouseover',function(){active.current='text';});state.textareaWarp.addEventListener('mouseleave',function(){active.current='preview';});}},[state.textareaWarp]);var handleScroll=function handleScroll(e,type){if(!enableScrollRef.current)return;var textareaDom=textareaDomRef.current;var previewDom=previewRef.current?previewRef.current.mdp.current:undefined;if(!initScroll.current){active.current=type;initScroll.current=true;}if(textareaDom&&previewDom){var scale=(textareaDom.scrollHeight-textareaDom.offsetHeight)/(previewDom.scrollHeight-previewDom.offsetHeight);if(e.target===textareaDom&&active.current==='text'){previewDom.scrollTop=textareaDom.scrollTop/scale;}if(e.target===previewDom&&active.current==='preview'){textareaDom.scrollTop=previewDom.scrollTop*scale;}var scrollTop=0;if(active.current==='text'){scrollTop=textareaDom.scrollTop||0;}else if(active.current==='preview'){scrollTop=previewDom.scrollTop||0;}dispatch({scrollTop:scrollTop});}};var mdPreview=(0,external_root_React_commonjs2_react_commonjs_react_amd_react_.useMemo)(function(){return/*#__PURE__*/(0,jsx_runtime.jsx)(esm,_objectSpread2(_objectSpread2({},previewOptions),{},{onScroll:function onScroll(e){return handleScroll(e,'preview');},ref:previewRef,source:state.markdown||'',className:"".concat(prefixCls,"-preview ").concat(previewOptions.className||'')}));},[prefixCls,previewOptions,state.markdown]);return/*#__PURE__*/(0,jsx_runtime.jsx)(EditorContext.Provider,{value:_objectSpread2(_objectSpread2({},state),{},{dispatch:dispatch}),children:/*#__PURE__*/(0,jsx_runtime.jsxs)("div",_objectSpread2(_objectSpread2({ref:container,className:cls},other),{},{onClick:function onClick(){dispatch({barPopup:_objectSpread2({},setGroupPopFalse(state.barPopup))});},style:_objectSpread2(_objectSpread2({},other.style),{},{height:state.fullscreen?'100%':hideToolbar?Number(state.height)-toolbarHeight:state.height}),children:[!hideToolbar&&/*#__PURE__*/(0,jsx_runtime.jsx)(Toolbar_Toolbar,{prefixCls:prefixCls,height:toolbarHeight,overflow:overflow}),/*#__PURE__*/(0,jsx_runtime.jsxs)("div",{className:"".concat(prefixCls,"-content"),style:{height:state.fullscreen?"calc(100% - ".concat(toolbarHeight,"px)"):Number(state.height)-toolbarHeight},children:[/(edit|live)/.test(state.preview||'')&&/*#__PURE__*/(0,jsx_runtime.jsx)(TextArea_TextArea,_objectSpread2(_objectSpread2({className:"".concat(prefixCls,"-input"),prefixCls:prefixCls,autoFocus:autoFocus},textareaProps),{},{onChange:function onChange(evn){_onChange&&_onChange(evn.target.value,evn,state);if(textareaProps&&textareaProps.onChange){textareaProps.onChange(evn);}},renderTextarea:renderTextarea,onScroll:function onScroll(e){return handleScroll(e,'text');}})),/(live|preview)/.test(state.preview||'')&&mdPreview]}),visiableDragbar&&!state.fullscreen&&/*#__PURE__*/(0,jsx_runtime.jsx)(components_DragBar,{prefixCls:prefixCls,height:state.height,maxHeight:maxHeight,minHeight:minHeight,onChange:function onChange(newHeight){dispatch({height:newHeight});}})]}))});};var mdEditor=/*#__PURE__*/external_root_React_commonjs2_react_commonjs_react_amd_react_default().forwardRef(InternalMDEditor);mdEditor.Markdown=esm;/* harmony default export */ const Editor = (mdEditor);
|
|
62047
|
+
(0,external_root_React_commonjs2_react_commonjs_react_amd_react_.useMemo)(function(){return height!==state.height&&dispatch({height:height});},[height]);(0,external_root_React_commonjs2_react_commonjs_react_amd_react_.useMemo)(function(){return height!==state.height&&onHeightChange&&onHeightChange(state.height,height,state);},[height,onHeightChange,state]);var textareaDomRef=(0,external_root_React_commonjs2_react_commonjs_react_amd_react_.useRef)();var active=(0,external_root_React_commonjs2_react_commonjs_react_amd_react_.useRef)('preview');var initScroll=(0,external_root_React_commonjs2_react_commonjs_react_amd_react_.useRef)(false);(0,external_root_React_commonjs2_react_commonjs_react_amd_react_.useMemo)(function(){textareaDomRef.current=state.textareaWarp;if(state.textareaWarp){state.textareaWarp.addEventListener('mouseover',function(){active.current='text';});state.textareaWarp.addEventListener('mouseleave',function(){active.current='preview';});}},[state.textareaWarp]);var handleScroll=function handleScroll(e,type){if(!enableScrollRef.current)return;var textareaDom=textareaDomRef.current;var previewDom=previewRef.current?previewRef.current.mdp.current:undefined;if(!initScroll.current){active.current=type;initScroll.current=true;}if(textareaDom&&previewDom){var scale=(textareaDom.scrollHeight-textareaDom.offsetHeight)/(previewDom.scrollHeight-previewDom.offsetHeight);if(e.target===textareaDom&&active.current==='text'){previewDom.scrollTop=textareaDom.scrollTop/scale;}if(e.target===previewDom&&active.current==='preview'){textareaDom.scrollTop=previewDom.scrollTop*scale;}var scrollTop=0;if(active.current==='text'){scrollTop=textareaDom.scrollTop||0;}else if(active.current==='preview'){scrollTop=previewDom.scrollTop||0;}dispatch({scrollTop:scrollTop});}};var mdPreview=(0,external_root_React_commonjs2_react_commonjs_react_amd_react_.useMemo)(function(){return/*#__PURE__*/(0,jsx_runtime.jsx)(esm,_objectSpread2(_objectSpread2({},previewOptions),{},{onScroll:function onScroll(e){return handleScroll(e,'preview');},ref:previewRef,source:state.markdown||'',className:"".concat(prefixCls,"-preview ").concat(previewOptions.className||'')}));},[prefixCls,previewOptions,state.markdown]);return/*#__PURE__*/(0,jsx_runtime.jsx)(EditorContext.Provider,{value:_objectSpread2(_objectSpread2({},state),{},{dispatch:dispatch}),children:/*#__PURE__*/(0,jsx_runtime.jsxs)("div",_objectSpread2(_objectSpread2({ref:container,className:cls},other),{},{onClick:function onClick(){dispatch({barPopup:_objectSpread2({},setGroupPopFalse(state.barPopup))});},style:_objectSpread2(_objectSpread2({},other.style),{},{height:state.fullscreen?'100%':hideToolbar?Number(state.height)-toolbarHeight:state.height}),children:[!hideToolbar&&!toolbarBottom&&/*#__PURE__*/(0,jsx_runtime.jsx)(Toolbar_Toolbar,{prefixCls:prefixCls,height:toolbarHeight,overflow:overflow,toolbarBottom:toolbarBottom}),/*#__PURE__*/(0,jsx_runtime.jsxs)("div",{className:"".concat(prefixCls,"-content"),style:{height:state.fullscreen?"calc(100% - ".concat(toolbarHeight,"px)"):Number(state.height)-toolbarHeight},children:[/(edit|live)/.test(state.preview||'')&&/*#__PURE__*/(0,jsx_runtime.jsx)(TextArea_TextArea,_objectSpread2(_objectSpread2({className:"".concat(prefixCls,"-input"),prefixCls:prefixCls,autoFocus:autoFocus},textareaProps),{},{onChange:function onChange(evn){_onChange&&_onChange(evn.target.value,evn,state);if(textareaProps&&textareaProps.onChange){textareaProps.onChange(evn);}},renderTextarea:renderTextarea,onScroll:function onScroll(e){return handleScroll(e,'text');}})),/(live|preview)/.test(state.preview||'')&&mdPreview]}),visiableDragbar&&!state.fullscreen&&/*#__PURE__*/(0,jsx_runtime.jsx)(components_DragBar,{prefixCls:prefixCls,height:state.height,maxHeight:maxHeight,minHeight:minHeight,onChange:function onChange(newHeight){dispatch({height:newHeight});}}),!hideToolbar&&toolbarBottom&&/*#__PURE__*/(0,jsx_runtime.jsx)(Toolbar_Toolbar,{prefixCls:prefixCls,height:toolbarHeight,overflow:overflow,toolbarBottom:toolbarBottom})]}))});};var mdEditor=/*#__PURE__*/external_root_React_commonjs2_react_commonjs_react_amd_react_default().forwardRef(InternalMDEditor);mdEditor.Markdown=esm;/* harmony default export */ const Editor = (mdEditor);
|
|
61498
62048
|
;// CONCATENATED MODULE: ./src/index.tsx
|
|
61499
62049
|
/* harmony default export */ const src_0 = (Editor);
|
|
61500
62050
|
})();
|