Skip to content

Commit b2b0acc

Browse files
committed
style(scripts/website): directly call "markdown.use"
1 parent a848de0 commit b2b0acc

File tree

1 file changed

+2
-3
lines changed

1 file changed

+2
-3
lines changed

scripts/website.js

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -31,7 +31,7 @@ require('acquit-ignore')();
3131
const { marked: markdown } = require('marked');
3232
const highlight = require('highlight.js');
3333
const { promisify } = require("util");
34-
const renderer = {
34+
markdown.use({
3535
heading: function(text, level, raw, slugger) {
3636
const slug = slugger.slug(raw);
3737
return `<h${level} id="${slug}">
@@ -40,7 +40,7 @@ const renderer = {
4040
</a>
4141
</h${level}>\n`;
4242
}
43-
};
43+
});
4444
markdown.setOptions({
4545
highlight: function(code, language) {
4646
if (!language) {
@@ -52,7 +52,6 @@ markdown.setOptions({
5252
return highlight.highlight(code, { language }).value;
5353
}
5454
});
55-
markdown.use({ renderer });
5655

5756
const testPath = path.resolve(cwd, 'test')
5857

0 commit comments

Comments
 (0)