Merge pull request #1170 from vsemozhetbyt/patch-2
Fix nits in code example in USING_ADVANCED.md
This commit is contained in:
commit
3400fd83f9
@ -19,9 +19,9 @@ var myMarked = require('marked');
|
||||
// Set options
|
||||
// `highlight` example uses `highlight.js`
|
||||
myMarked.setOptions({
|
||||
renderer: new marked.Renderer(),
|
||||
renderer: new myMarked.Renderer(),
|
||||
highlight: function(code) {
|
||||
return require('highlight.js').highlightAuto(code).value;
|
||||
return require('highlight.js').highlightAuto(code).value;
|
||||
},
|
||||
pedantic: false,
|
||||
gfm: true,
|
||||
@ -68,4 +68,4 @@ myMarked.setOptions({
|
||||
console.log(myMarked(markdownString));
|
||||
```
|
||||
|
||||
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 lnaguage to use for the `code` and `callback` is the `function` the asynchronous highlighter will call once complete.
|
||||
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 lnaguage to use for the `code` and `callback` is the `function` the asynchronous highlighter will call once complete.
|
||||
|
Loading…
x
Reference in New Issue
Block a user