Hello airbnb

This commit is contained in:
masnn committed 2020-04-15 15:08:05 +08:00
1 parent f9468536de
commit 8c195661d7
78 files changed
+2032 -1471

No files matched your search

+7 -7
View File
@@ -1,19 +1,19 @@
const
hljs = require('highlight.js'),
MarkdownIt = require('markdown-it'),
katex = require('markdown-it-katex');
const hljs = require('highlight.js');
const MarkdownIt = require('markdown-it');
const katex = require('markdown-it-katex');
class Markdown extends MarkdownIt {
constructor() {
super({
linkify: true,
highlight: function (str, lang) {
if (lang && hljs.getLanguage(lang))
highlight(str, lang) {
if (lang && hljs.getLanguage(lang)) {
try {
return hljs.highlight(lang, str).value;
} catch (__) { } // eslint-disable-line no-empty
}
return '';
}
},
});
this.linkify.tlds('.py', false);
this.use(katex);