mirror of
https://github.com/gedoor/legado.git
synced 2025-01-09 04:17:45 +08:00
设置代码块默认语言为txt
This commit is contained in:
parent
480c0eeae0
commit
328f01d0bf
@ -23,7 +23,7 @@ require(['marked', 'markedHighlight', 'highlight'], (marked, mdhl, hljs) => {
|
||||
mdhl.markedHighlight({
|
||||
langPrefix: 'theme-vs2015-min hljs language-',
|
||||
highlight(code, lang) {
|
||||
const language = hljs.getLanguage(lang) ? lang : 'plaintext';
|
||||
const language = hljs.getLanguage(lang) ? lang : 'txt';
|
||||
const result = hljs.highlight(code, {language});
|
||||
return result.value;
|
||||
},
|
||||
|
Loading…
Reference in New Issue
Block a user