mirror of
https://github.com/hedgedoc/hedgedoc.git
synced 2024-11-25 03:06:31 -05:00
fix: exclude first headline extraction from simple renderer
Signed-off-by: Tilman Vatteroth <git@tilmanvatteroth.de>
This commit is contained in:
parent
cfdf69869c
commit
f62c9489ce
1 changed files with 4 additions and 0 deletions
|
@ -5,6 +5,7 @@
|
|||
*/
|
||||
import type { MarkdownRendererExtensionOptions } from '../../../../extensions/base/app-extension'
|
||||
import { AppExtension } from '../../../../extensions/base/app-extension'
|
||||
import { RendererType } from '../../../render-page/window-post-message-communicator/rendering-message'
|
||||
import type { MarkdownRendererExtension } from '../base/markdown-renderer-extension'
|
||||
import { ExtractFirstHeadlineEditorExtension } from './extract-first-headline-editor-extension'
|
||||
import { ExtractFirstHeadlineMarkdownExtension } from './extract-first-headline-markdown-extension'
|
||||
|
@ -14,6 +15,9 @@ import { ExtractFirstHeadlineMarkdownExtension } from './extract-first-headline-
|
|||
*/
|
||||
export class ExtractFirstHeadlineAppExtension extends AppExtension {
|
||||
buildMarkdownRendererExtensions(options: MarkdownRendererExtensionOptions): MarkdownRendererExtension[] {
|
||||
if (options.rendererType === RendererType.SIMPLE) {
|
||||
return []
|
||||
}
|
||||
return [new ExtractFirstHeadlineMarkdownExtension(options.eventEmitter)]
|
||||
}
|
||||
|
||||
|
|
Loading…
Reference in a new issue