marked 11.1.0 → 11.2.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/lib/marked.umd.js CHANGED
@@ -1,6 +1,6 @@
1
1
  /**
2
- * marked v11.1.0 - a markdown parser
3
- * Copyright (c) 2011-2023, Christopher Jeffrey. (MIT Licensed)
2
+ * marked v11.2.0 - a markdown parser
3
+ * Copyright (c) 2011-2024, Christopher Jeffrey. (MIT Licensed)
4
4
  * https://github.com/markedjs/marked
5
5
  */
6
6
 
@@ -1266,10 +1266,11 @@
1266
1266
  src = src
1267
1267
  .replace(/\r\n|\r/g, '\n');
1268
1268
  this.blockTokens(src, this.tokens);
1269
- let next;
1270
- while (next = this.inlineQueue.shift()) {
1269
+ for (let i = 0; i < this.inlineQueue.length; i++) {
1270
+ const next = this.inlineQueue[i];
1271
1271
  this.inlineTokens(next.src, next.tokens);
1272
1272
  }
1273
+ this.inlineQueue = [];
1273
1274
  return this.tokens;
1274
1275
  }
1275
1276
  blockTokens(src, tokens = []) {
@@ -2094,7 +2095,8 @@
2094
2095
  const genericToken = token;
2095
2096
  if (this.defaults.extensions?.childTokens?.[genericToken.type]) {
2096
2097
  this.defaults.extensions.childTokens[genericToken.type].forEach((childTokens) => {
2097
- values = values.concat(this.walkTokens(genericToken[childTokens], callback));
2098
+ const tokens = genericToken[childTokens].flat(Infinity);
2099
+ values = values.concat(this.walkTokens(tokens, callback));
2098
2100
  });
2099
2101
  }
2100
2102
  else if (genericToken.tokens) {