marked 13.0.0 → 13.0.1

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.cjs CHANGED
@@ -1,5 +1,5 @@
1
1
  /**
2
- * marked v13.0.0 - a markdown parser
2
+ * marked v13.0.1 - a markdown parser
3
3
  * Copyright (c) 2011-2024, Christopher Jeffrey. (MIT Licensed)
4
4
  * https://github.com/markedjs/marked
5
5
  */
@@ -2358,7 +2358,7 @@ class Marked {
2358
2358
  // eslint-disable-next-line prefer-rest-params
2359
2359
  return func.apply(this, arguments);
2360
2360
  }
2361
- return func(renderer.parser.parseInline(token.tokens), token.depth, unescape(renderer.parser.parseInline(token.tokens, renderer.parser.textRenderer)));
2361
+ return func.call(this, renderer.parser.parseInline(token.tokens), token.depth, unescape(renderer.parser.parseInline(token.tokens, renderer.parser.textRenderer)));
2362
2362
  };
2363
2363
  case 'code':
2364
2364
  return function (token) {
@@ -2367,7 +2367,7 @@ class Marked {
2367
2367
  // eslint-disable-next-line prefer-rest-params
2368
2368
  return func.apply(this, arguments);
2369
2369
  }
2370
- return func(token.text, token.lang, !!token.escaped);
2370
+ return func.call(this, token.text, token.lang, !!token.escaped);
2371
2371
  };
2372
2372
  case 'table':
2373
2373
  return function (token) {
@@ -2402,7 +2402,7 @@ class Marked {
2402
2402
  }
2403
2403
  body += this.tablerow({ text: cell });
2404
2404
  }
2405
- return func(header, body);
2405
+ return func.call(this, header, body);
2406
2406
  };
2407
2407
  case 'blockquote':
2408
2408
  return function (token) {
@@ -2412,7 +2412,7 @@ class Marked {
2412
2412
  return func.apply(this, arguments);
2413
2413
  }
2414
2414
  const body = this.parser.parse(token.tokens);
2415
- return func(body);
2415
+ return func.call(this, body);
2416
2416
  };
2417
2417
  case 'list':
2418
2418
  return function (token) {
@@ -2461,7 +2461,7 @@ class Marked {
2461
2461
  tokens: item.tokens
2462
2462
  });
2463
2463
  }
2464
- return func(body, ordered, start);
2464
+ return func.call(this, body, ordered, start);
2465
2465
  };
2466
2466
  case 'html':
2467
2467
  return function (token) {
@@ -2470,7 +2470,7 @@ class Marked {
2470
2470
  // eslint-disable-next-line prefer-rest-params
2471
2471
  return func.apply(this, arguments);
2472
2472
  }
2473
- return func(token.text, token.block);
2473
+ return func.call(this, token.text, token.block);
2474
2474
  };
2475
2475
  case 'paragraph':
2476
2476
  return function (token) {
@@ -2479,7 +2479,7 @@ class Marked {
2479
2479
  // eslint-disable-next-line prefer-rest-params
2480
2480
  return func.apply(this, arguments);
2481
2481
  }
2482
- return func(this.parser.parseInline(token.tokens));
2482
+ return func.call(this, this.parser.parseInline(token.tokens));
2483
2483
  };
2484
2484
  case 'escape':
2485
2485
  return function (token) {
@@ -2488,7 +2488,7 @@ class Marked {
2488
2488
  // eslint-disable-next-line prefer-rest-params
2489
2489
  return func.apply(this, arguments);
2490
2490
  }
2491
- return func(token.text);
2491
+ return func.call(this, token.text);
2492
2492
  };
2493
2493
  case 'link':
2494
2494
  return function (token) {
@@ -2497,7 +2497,7 @@ class Marked {
2497
2497
  // eslint-disable-next-line prefer-rest-params
2498
2498
  return func.apply(this, arguments);
2499
2499
  }
2500
- return func(token.href, token.title, this.parser.parseInline(token.tokens));
2500
+ return func.call(this, token.href, token.title, this.parser.parseInline(token.tokens));
2501
2501
  };
2502
2502
  case 'image':
2503
2503
  return function (token) {
@@ -2506,7 +2506,7 @@ class Marked {
2506
2506
  // eslint-disable-next-line prefer-rest-params
2507
2507
  return func.apply(this, arguments);
2508
2508
  }
2509
- return func(token.href, token.title, token.text);
2509
+ return func.call(this, token.href, token.title, token.text);
2510
2510
  };
2511
2511
  case 'strong':
2512
2512
  return function (token) {
@@ -2515,7 +2515,7 @@ class Marked {
2515
2515
  // eslint-disable-next-line prefer-rest-params
2516
2516
  return func.apply(this, arguments);
2517
2517
  }
2518
- return func(this.parser.parseInline(token.tokens));
2518
+ return func.call(this, this.parser.parseInline(token.tokens));
2519
2519
  };
2520
2520
  case 'em':
2521
2521
  return function (token) {
@@ -2524,7 +2524,7 @@ class Marked {
2524
2524
  // eslint-disable-next-line prefer-rest-params
2525
2525
  return func.apply(this, arguments);
2526
2526
  }
2527
- return func(this.parser.parseInline(token.tokens));
2527
+ return func.call(this, this.parser.parseInline(token.tokens));
2528
2528
  };
2529
2529
  case 'codespan':
2530
2530
  return function (token) {
@@ -2533,7 +2533,7 @@ class Marked {
2533
2533
  // eslint-disable-next-line prefer-rest-params
2534
2534
  return func.apply(this, arguments);
2535
2535
  }
2536
- return func(token.text);
2536
+ return func.call(this, token.text);
2537
2537
  };
2538
2538
  case 'del':
2539
2539
  return function (token) {
@@ -2542,7 +2542,7 @@ class Marked {
2542
2542
  // eslint-disable-next-line prefer-rest-params
2543
2543
  return func.apply(this, arguments);
2544
2544
  }
2545
- return func(this.parser.parseInline(token.tokens));
2545
+ return func.call(this, this.parser.parseInline(token.tokens));
2546
2546
  };
2547
2547
  case 'text':
2548
2548
  return function (token) {
@@ -2551,7 +2551,7 @@ class Marked {
2551
2551
  // eslint-disable-next-line prefer-rest-params
2552
2552
  return func.apply(this, arguments);
2553
2553
  }
2554
- return func(token.text);
2554
+ return func.call(this, token.text);
2555
2555
  };
2556
2556
  // do nothing
2557
2557
  }