Add spaces to highlighted code regex

Signed-off-by: Tilman Vatteroth <tilman.vatteroth@tu-dortmund.de>
This commit is contained in:
Tilman Vatteroth 2020-06-25 19:18:12 +02:00 committed by mrdrogdrog
parent 312c86e702
commit 729144eca3

View file

@ -1,6 +1,6 @@
import MarkdownIt from 'markdown-it/lib' import MarkdownIt from 'markdown-it/lib'
const highlightRegex = /^(\w*)(=(\d*|\+))?(!?)$/ const highlightRegex = /^ *(\w*)(=(\d*|\+))?(!?)$/
export const highlightedCode: MarkdownIt.PluginSimple = (md: MarkdownIt) => { export const highlightedCode: MarkdownIt.PluginSimple = (md: MarkdownIt) => {
md.core.ruler.push('highlighted-code', (state) => { md.core.ruler.push('highlighted-code', (state) => {