fix: Use more strict gist id regex

Signed-off-by: Tilman Vatteroth <git@tilmanvatteroth.de>
This commit is contained in:
Tilman Vatteroth 2022-08-26 12:41:19 +02:00
parent 56744db3a2
commit db93b33eb3

View file

@ -7,7 +7,7 @@
import type { RegexOptions } from '../../../../external-types/markdown-it-regex/interface' import type { RegexOptions } from '../../../../external-types/markdown-it-regex/interface'
import { GistMarkdownExtension } from './gist-markdown-extension' import { GistMarkdownExtension } from './gist-markdown-extension'
const finalRegex = /^{%gist (\w+\/\w+) ?%}$/ const finalRegex = /^{%gist\s+(\w+\/\w+)\s*%}$/
/** /**
* Replacer for legacy hedgedoc 1 gist shortcodes. * Replacer for legacy hedgedoc 1 gist shortcodes.