Skip to content

Commit 48e5bd0

Browse files
author
MarkedJS bot
committed
🗜️ build [skip ci]
1 parent 2da5885 commit 48e5bd0

File tree

3 files changed

+7
-9
lines changed

3 files changed

+7
-9
lines changed

lib/marked.esm.js

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -2638,10 +2638,10 @@ marked$1.use = function(...args) {
26382638
// ==-- Parse WalkTokens extensions --== //
26392639
if (pack.walkTokens) {
26402640
const walkTokens = marked$1.defaults.walkTokens;
2641-
opts.walkTokens = (token) => {
2641+
opts.walkTokens = function(token) {
26422642
pack.walkTokens.call(this, token);
26432643
if (walkTokens) {
2644-
walkTokens(token);
2644+
walkTokens.call(this, token);
26452645
}
26462646
};
26472647
}
@@ -2660,7 +2660,7 @@ marked$1.use = function(...args) {
26602660

26612661
marked$1.walkTokens = function(tokens, callback) {
26622662
for (const token of tokens) {
2663-
callback(token);
2663+
callback.call(marked$1, token);
26642664
switch (token.type) {
26652665
case 'table': {
26662666
for (const cell of token.header) {

lib/marked.js

Lines changed: 3 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -2696,8 +2696,6 @@
26962696
*/
26972697

26982698
marked.use = function () {
2699-
var _this = this;
2700-
27012699
for (var _len = arguments.length, args = new Array(_len), _key = 0; _key < _len; _key++) {
27022700
args[_key] = arguments[_key];
27032701
}
@@ -2844,10 +2842,10 @@
28442842
var walkTokens = marked.defaults.walkTokens;
28452843

28462844
opts.walkTokens = function (token) {
2847-
pack.walkTokens.call(_this, token);
2845+
pack.walkTokens.call(this, token);
28482846

28492847
if (walkTokens) {
2850-
walkTokens(token);
2848+
walkTokens.call(this, token);
28512849
}
28522850
};
28532851
}
@@ -2867,7 +2865,7 @@
28672865
marked.walkTokens = function (tokens, callback) {
28682866
var _loop3 = function _loop3() {
28692867
var token = _step.value;
2870-
callback(token);
2868+
callback.call(marked, token);
28712869

28722870
switch (token.type) {
28732871
case 'table':

marked.min.js

Lines changed: 1 addition & 1 deletion
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

0 commit comments

Comments
 (0)