chore(docs): fix async highlight example (#2123)

This commit is contained in:
Tony Brix
2021-06-30 22:42:06 -04:00
committed by GitHub
parent c183b12dc2
commit 22ead33a0f
+3 -1
View File
@@ -86,7 +86,9 @@ marked.setOptions({
}
});
console.log(marked(markdownString));
marked(markdownString, (err, html) => {
console.log(html);
});
```
In both examples, `code` is a `string` representing the section of code to pass to the highlighter. In this example, `lang` is a `string` informing the highlighter what programming language to use for the `code` and `callback` is the `function` the asynchronous highlighter will call once complete.