feat: add priorities for replacers

Signed-off-by: Tilman Vatteroth <git@tilmanvatteroth.de>
This commit is contained in:
Tilman Vatteroth 2023-04-17 14:55:09 +02:00
parent 4a2cfe225c
commit a95b2d7d7d
4 changed files with 86 additions and 4 deletions

View file

@ -4,11 +4,12 @@
* SPDX-License-Identifier: AGPL-3.0-only
*/
import HighlightedCode from '../../../components/common/highlighted-code/highlighted-code'
import type { NodeReplacement } from '../../../components/markdown-renderer/replace-components/component-replacer'
import {
ComponentReplacer,
DO_NOT_REPLACE
DO_NOT_REPLACE,
ReplacerPriority
} from '../../../components/markdown-renderer/replace-components/component-replacer'
import type { NodeReplacement } from '../../../components/markdown-renderer/replace-components/component-replacer'
import type { Element } from 'domhandler'
import React from 'react'
@ -56,4 +57,8 @@ export class HighlightedCodeReplacer extends ComponentReplacer {
reset() {
this.lastLineNumber = 0
}
getPriority(): ReplacerPriority {
return ReplacerPriority.LOWER
}
}