fix (client): set displayMode to true for block math expressions
This commit is contained in:
parent
d0de0d14b2
commit
d57c9dc289
1 changed files with 2 additions and 4 deletions
|
@ -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
|
||||
? `<div style="text-align:center">${katexString}</div>`
|
||||
: katexString;
|
||||
},
|
||||
},
|
||||
});
|
||||
|
|
Loading…
Reference in a new issue