hedgedoc/src/components/markdown-renderer/markdown-extension/iframe-capsule/iframe-capsule-markdown-extension.ts
Tilman Vatteroth afe35ca164 fix(markdown extensions): Rename tag name allow list method name
Signed-off-by: Tilman Vatteroth <git@tilmanvatteroth.de>
2022-10-09 22:51:41 +02:00

22 lines
646 B
TypeScript

/*
* SPDX-FileCopyrightText: 2022 The HedgeDoc developers (see AUTHORS file)
*
* SPDX-License-Identifier: AGPL-3.0-only
*/
import { MarkdownExtension } from '../markdown-extension'
import type { ComponentReplacer } from '../../replace-components/component-replacer'
import { IframeCapsuleReplacer } from './iframe-capsule-replacer'
/**
* Adds a replacer that capsules iframes in a click shield.
*/
export class IframeCapsuleMarkdownExtension extends MarkdownExtension {
public buildReplacers(): ComponentReplacer[] {
return [new IframeCapsuleReplacer()]
}
public buildTagNameAllowList(): string[] {
return ['iframe']
}
}