From dbcacf882f37b1f6a37ecc3d461a9de749d3925b Mon Sep 17 00:00:00 2001 From: Fevol Date: Sat, 11 Mar 2023 20:25:56 +0100 Subject: [PATCH] fix: criticmarkup postprocessor conflicting with other plugins --- src/main.ts | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) diff --git a/src/main.ts b/src/main.ts index b0ffdc1..5b90eb7 100644 --- a/src/main.ts +++ b/src/main.ts @@ -88,7 +88,7 @@ export default class CommentatorPlugin extends Plugin { this.registerEditorExtension(this.editorExtensions); if (this.settings.post_processor) { - this.postProcessor = this.registerMarkdownPostProcessor((el, ctx) => postProcess(el, ctx, this.settings)); + this.postProcessor = this.registerMarkdownPostProcessor((el, ctx) => postProcess(el, ctx, this.settings), -99999); postProcessorUpdate(); } @@ -135,10 +135,9 @@ export default class CommentatorPlugin extends Plugin { if (this.changed_settings.post_processor !== undefined) { if (this.changed_settings.post_processor) - this.postProcessor = this.registerMarkdownPostProcessor((el, ctx) => postProcess(el, ctx, this.settings)); + this.postProcessor = this.registerMarkdownPostProcessor((el, ctx) => postProcess(el, ctx, this.settings), -99999); else MarkdownPreviewRenderer.unregisterPostProcessor(this.postProcessor); - postProcessorUpdate(); }