mirror of
https://github.com/hedgedoc/hedgedoc.git
synced 2025-05-20 02:05:21 -04:00
![renovate[bot]](/assets/img/avatar_default.png)
* Update dependency eslint-plugin-import to v2.25.2 Signed-off-by: Renovate Bot <bot@renovateapp.com> Signed-off-by: Tilman Vatteroth <git@tilmanvatteroth.de> * Make type imports more explicit Signed-off-by: Tilman Vatteroth <git@tilmanvatteroth.de> * Enforce use of type imports Signed-off-by: Tilman Vatteroth <git@tilmanvatteroth.de> Co-authored-by: Renovate Bot <bot@renovateapp.com> Co-authored-by: Tilman Vatteroth <git@tilmanvatteroth.de>
17 lines
560 B
TypeScript
17 lines
560 B
TypeScript
/*
|
|
* SPDX-FileCopyrightText: 2021 The HedgeDoc developers (see AUTHORS file)
|
|
*
|
|
* SPDX-License-Identifier: AGPL-3.0-only
|
|
*/
|
|
|
|
import type { 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>`
|
|
}
|
|
}
|