-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
吴昀珠
committed
Feb 2, 2019
1 parent
5f3dce4
commit 6a3eb4f
Showing
20 changed files
with
11,685 additions
and
126 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,19 @@ | ||
|
||
var hljs = require('highlight.js'); | ||
|
||
var markdown = require('markdown-it')({ | ||
preset: 'default', | ||
breaks: true, | ||
html: true, | ||
highlight: function (str, lang) { | ||
if (!(lang && hljs.getLanguage(lang))) { | ||
return ''; | ||
} | ||
|
||
return hljs.highlight(lang, str, true).value; | ||
} | ||
}); | ||
|
||
markdown.use(require('markdown-it-anchor')) | ||
|
||
module.exports = markdown; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file was deleted.
Oops, something went wrong.
This file was deleted.
Oops, something went wrong.
Oops, something went wrong.