fix: Use more strict speakerdeck id regex

Signed-off-by: Tilman Vatteroth <git@tilmanvatteroth.de>
This commit is contained in:
Tilman Vatteroth 2022-08-26 12:41:47 +02:00
parent 8274fe0dad
commit 9996df1abd

View file

@ -8,7 +8,7 @@ import markdownItRegex from 'markdown-it-regex'
import type MarkdownIt from 'markdown-it/lib' import type MarkdownIt from 'markdown-it/lib'
import type { RegexOptions } from '../../../../external-types/markdown-it-regex/interface' import type { RegexOptions } from '../../../../external-types/markdown-it-regex/interface'
export const legacySpeakerdeckRegex = /^{%speakerdeck (\w+\/[\w-]+) ?%}$/ export const legacySpeakerdeckRegex = /^{%speakerdeck\s+(\w+\/[\w-]+)\s*%}$/
/** /**
* Configure the given {@link MarkdownIt} to render legacy hedgedoc 1 speakerdeck shortcodes as HTML links. * Configure the given {@link MarkdownIt} to render legacy hedgedoc 1 speakerdeck shortcodes as HTML links.