Skip to content

Commit

Permalink
Updates marked 4.2.12 -> 4.3.0 & removes async returnValue hack
Browse files Browse the repository at this point in the history
  • Loading branch information
webketje committed Jul 18, 2023
1 parent 047b57f commit 77a01f8
Show file tree
Hide file tree
Showing 3 changed files with 1,197 additions and 26 deletions.
7 changes: 1 addition & 6 deletions index.js
Original file line number Diff line number Diff line change
Expand Up @@ -13,15 +13,10 @@ transformer.render = function (string, options) {
// Marked doesn't really support async rendering, but this enables async walkTokens extensions,
// see https://marked.js.org/using_pro#async
transformer.renderAsync = function (string, options) {
const rendered = marked(string, {
return marked(string, {
...options,
async: true,
})
if (rendered instanceof Promise) {
return rendered
}

return Promise.resolve(rendered)
}

module.exports = transformer
Loading

0 comments on commit 77a01f8

Please sign in to comment.