Skip to content

Commit

Permalink
fix: criticmarkup postprocessor conflicting with other plugins
Browse files Browse the repository at this point in the history
  • Loading branch information
Fevol committed Mar 11, 2023
1 parent 4b292f6 commit dbcacf8
Showing 1 changed file with 2 additions and 3 deletions.
5 changes: 2 additions & 3 deletions src/main.ts
Original file line number Diff line number Diff line change
Expand Up @@ -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();
}

Expand Down Expand Up @@ -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();
}


Expand Down

0 comments on commit dbcacf8

Please sign in to comment.