Skip to content

Commit e9eef44

Browse files
committedMar 11, 2025
Update Prism to 1.30.0
1 parent 44ca20e commit e9eef44

File tree

4 files changed

+935
-812
lines changed

4 files changed

+935
-812
lines changed
 

‎.npmrc

-1
Original file line numberDiff line numberDiff line change
@@ -1,2 +1 @@
11
ignore-scripts=true
2-
package-lock=false

‎lib/prism-core.js

+5-52
Original file line numberDiff line numberDiff line change
@@ -94,9 +94,11 @@ var _ = {
9494
clone = []
9595
visited[id] = clone
9696

97-
o.forEach(function (v, i) {
98-
clone[i] = deepClone(v, visited)
99-
})
97+
;/** @type {Array} */ (/** @type {any} */ (o)).forEach(
98+
function (v, i) {
99+
clone[i] = deepClone(v, visited)
100+
}
101+
)
100102

101103
return /** @type {any} */ (clone)
102104

@@ -764,52 +766,3 @@ function toArray(list) {
764766
}
765767

766768
export const Prism = _
767-
768-
// some additional documentation/types
769-
770-
/**
771-
* The expansion of a simple `RegExp` literal to support additional properties.
772-
*
773-
* @typedef GrammarToken
774-
* @property {RegExp} pattern The regular expression of the token.
775-
* @property {boolean} [lookbehind=false] If `true`, then the first capturing group of `pattern` will (effectively)
776-
* behave as a lookbehind group meaning that the captured text will not be part of the matched text of the new token.
777-
* @property {boolean} [greedy=false] Whether the token is greedy.
778-
* @property {string|string[]} [alias] An optional alias or list of aliases.
779-
* @property {Grammar} [inside] The nested grammar of this token.
780-
*
781-
* The `inside` grammar will be used to tokenize the text value of each token of this kind.
782-
*
783-
* This can be used to make nested and even recursive language definitions.
784-
*
785-
* Note: This can cause infinite recursion. Be careful when you embed different languages or even the same language into
786-
* each another.
787-
* @global
788-
* @public
789-
*/
790-
791-
/**
792-
* @typedef Grammar
793-
* @type {Object<string, RegExp | GrammarToken | Array<RegExp | GrammarToken>>}
794-
* @property {Grammar} [rest] An optional grammar object that will be appended to this grammar.
795-
* @global
796-
* @public
797-
*/
798-
799-
/**
800-
* A function which will invoked after an element was successfully highlighted.
801-
*
802-
* @callback HighlightCallback
803-
* @param {Element} element The element successfully highlighted.
804-
* @returns {void}
805-
* @global
806-
* @public
807-
*/
808-
809-
/**
810-
* @callback HookCallback
811-
* @param {Object<string, any>} env The environment variables of the hook.
812-
* @returns {void}
813-
* @global
814-
* @public
815-
*/

‎package.json

+1-1
Original file line numberDiff line numberDiff line change
@@ -32,7 +32,7 @@
3232
"mdast-zone": "^6.0.0",
3333
"patch-package": "^8.0.0",
3434
"prettier": "^3.0.0",
35-
"prismjs": "~1.29.0",
35+
"prismjs": "~1.30.0",
3636
"rehype": "^13.0.0",
3737
"remark-cli": "^12.0.0",
3838
"remark-preset-wooorm": "^11.0.0",

‎patches/prismjs+1.29.0.patch ‎patches/prismjs+1.30.0.patch

+929-758
Large diffs are not rendered by default.

0 commit comments

Comments
 (0)
Please sign in to comment.