fix: Allow extending code-block-lowlight (#1917)

Use the extension name when initializing the
LowlightPlugin. In this way, several extensions
can make use of the same plugin

Co-authored-by: Enrique Alcantara <ealcantara@gitlab.com>
This commit is contained in:
Enrique Alcántara
2021-09-21 03:26:11 -04:00
committed by GitHub
parent 071acd643b
commit 54be0e570e
2 changed files with 81 additions and 1 deletions

View File

@@ -16,7 +16,7 @@ export const CodeBlockLowlight = CodeBlock.extend<CodeBlockLowlightOptions>({
return [
...this.parent?.() || [],
LowlightPlugin({
name: 'codeBlock',
name: this.name,
lowlight: this.options.lowlight,
}),
]