diff --git a/packages/client/src/components/MkFormulaCore.vue b/packages/client/src/components/MkFormulaCore.vue index 2db4c7d00d..507740d106 100644 --- a/packages/client/src/components/MkFormulaCore.vue +++ b/packages/client/src/components/MkFormulaCore.vue @@ -20,12 +20,10 @@ export default defineComponent({ }, computed: { compiledFormula(): any { - const katexString = katex.renderToString(this.formula, { + return katex.renderToString(this.formula, { throwOnError: false, + displayMode: this.block, } as any); - return this.block - ? `
${katexString}
` - : katexString; }, }, });