🗜️ build [skip ci]

This commit is contained in:
MarkedJS bot 2020-05-22 15:37:31 +00:00
parent ced3ff1e3f
commit 7b3036f8c0
3 changed files with 31 additions and 27 deletions

View File

@ -2196,20 +2196,22 @@ function marked(src, opt, callback) {
marked.walkTokens(tokens, function(token) {
if (token.type === 'code') {
pending++;
highlight(token.text, token.lang, function(err, code) {
if (err) {
return done(err);
}
if (code != null && code !== token.text) {
token.text = code;
token.escaped = true;
}
setTimeout(() => {
highlight(token.text, token.lang, function(err, code) {
if (err) {
return done(err);
}
if (code != null && code !== token.text) {
token.text = code;
token.escaped = true;
}
pending--;
if (pending === 0) {
done();
}
});
pending--;
if (pending === 0) {
done();
}
});
}, 0);
}
});

View File

@ -2291,22 +2291,24 @@
marked.walkTokens(tokens, function (token) {
if (token.type === 'code') {
pending++;
highlight(token.text, token.lang, function (err, code) {
if (err) {
return done(err);
}
setTimeout(function () {
highlight(token.text, token.lang, function (err, code) {
if (err) {
return done(err);
}
if (code != null && code !== token.text) {
token.text = code;
token.escaped = true;
}
if (code != null && code !== token.text) {
token.text = code;
token.escaped = true;
}
pending--;
pending--;
if (pending === 0) {
done();
}
});
if (pending === 0) {
done();
}
});
}, 0);
}
});

2
marked.min.js vendored

File diff suppressed because one or more lines are too long