fix: markdown preview fails to load lang files for code blocks (#1162)
This commit is contained in:
parent
3183014b25
commit
f154f9cae5
@ -223,6 +223,17 @@ import Prism from 'prismjs'
|
|||||||
// Platform detection
|
// Platform detection
|
||||||
const CtrlKey = /Mac/.test(navigator.platform) ? 'Cmd' : 'Ctrl'
|
const CtrlKey = /Mac/.test(navigator.platform) ? 'Cmd' : 'Ctrl'
|
||||||
|
|
||||||
|
// Prism Config
|
||||||
|
Prism.plugins.autoloader.languages_path = '/js/prism/'
|
||||||
|
Prism.plugins.NormalizeWhitespace.setDefaults({
|
||||||
|
'remove-trailing': true,
|
||||||
|
'remove-indent': true,
|
||||||
|
'left-trim': true,
|
||||||
|
'right-trim': true,
|
||||||
|
'remove-initial-line-feed': true,
|
||||||
|
'tabs-to-spaces': 2
|
||||||
|
})
|
||||||
|
|
||||||
// Markdown Instance
|
// Markdown Instance
|
||||||
const md = new MarkdownIt({
|
const md = new MarkdownIt({
|
||||||
html: true,
|
html: true,
|
||||||
|
Loading…
Reference in New Issue
Block a user