mirror of
https://github.com/markedjs/marked.git
synced 2026-11-30 16:48:05 +01:00
chore(docs): fix async highlight example (#2123)
This commit is contained in:
@@ -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.
|
||||
|
||||
Reference in New Issue
Block a user