mirror of
https://github.com/hedgedoc/hedgedoc.git
synced 2025-05-14 07:04:45 -04:00
11 lines
424 B
TypeScript
11 lines
424 B
TypeScript
import { RegexOptions } from '../../../external-types/markdown-it-regex/interface'
|
|
|
|
export const replaceLegacyVimeoShortCode: RegexOptions = {
|
|
name: 'legacy-vimeo-short-code',
|
|
regex: /^{%vimeo ([\d]{6,11}) ?%}$/,
|
|
replace: (match) => {
|
|
// ESLint wants to collapse this tag, but then the tag won't be valid html anymore.
|
|
// noinspection CheckTagEmptyBody
|
|
return `<app-vimeo id="${match}"></app-vimeo>`
|
|
}
|
|
}
|