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