From 729144eca3f244549d4536d3971f014681671099 Mon Sep 17 00:00:00 2001 From: Tilman Vatteroth Date: Thu, 25 Jun 2020 19:18:12 +0200 Subject: [PATCH] Add spaces to highlighted code regex Signed-off-by: Tilman Vatteroth --- .../markdown-renderer/markdown-it-plugins/highlighted-code.ts | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/components/editor/markdown-renderer/markdown-it-plugins/highlighted-code.ts b/src/components/editor/markdown-renderer/markdown-it-plugins/highlighted-code.ts index 1c26c7a4f..b42e0d3d8 100644 --- a/src/components/editor/markdown-renderer/markdown-it-plugins/highlighted-code.ts +++ b/src/components/editor/markdown-renderer/markdown-it-plugins/highlighted-code.ts @@ -1,6 +1,6 @@ import MarkdownIt from 'markdown-it/lib' -const highlightRegex = /^(\w*)(=(\d*|\+))?(!?)$/ +const highlightRegex = /^ *(\w*)(=(\d*|\+))?(!?)$/ export const highlightedCode: MarkdownIt.PluginSimple = (md: MarkdownIt) => { md.core.ruler.push('highlighted-code', (state) => {