marked-highlight
Advanced tools
Comparing version 2.0.3 to 2.0.4
@@ -36,2 +36,5 @@ (function (global, factory) { | ||
const code = options.highlight(token.text, lang); | ||
if (code instanceof Promise) { | ||
throw new Error('markedHighlight is not set to async but the highlight function is async. Set the async option to true on markedHighlight to await the async highlight function.'); | ||
} | ||
updateToken(token)(code); | ||
@@ -38,0 +41,0 @@ }, |
{ | ||
"name": "marked-highlight", | ||
"version": "2.0.3", | ||
"version": "2.0.4", | ||
"description": "marked highlight", | ||
@@ -5,0 +5,0 @@ "main": "./lib/index.cjs", |
@@ -30,2 +30,5 @@ export function markedHighlight(options) { | ||
const code = options.highlight(token.text, lang); | ||
if (code instanceof Promise) { | ||
throw new Error('markedHighlight is not set to async but the highlight function is async. Set the async option to true on markedHighlight to await the async highlight function.'); | ||
} | ||
updateToken(token)(code); | ||
@@ -32,0 +35,0 @@ }, |
Sorry, the diff of this file is not supported yet
16382
318