diff --git a/A00_Common/formula_doc_math_model.ts b/A00_Common/formula_doc_math_model.ts index ba6aec420..69f88fd26 100644 --- a/A00_Common/formula_doc_math_model.ts +++ b/A00_Common/formula_doc_math_model.ts @@ -176,7 +176,7 @@ export function toLinear(items: Item[]): string { const go = (list: Item[]): string => list .map((it) => { - if (it.t === "ch") return OPS.has(it.c) ? ` ${it.c} ` : it.c; + if (it.t === "ch") return it.c === "," ? ", " : OPS.has(it.c) ? ` ${it.c} ` : it.c; if (it.t === "frac") return `(${go(it.num)}) / (${go(it.den)})`; if (it.t === "paren") return `(${go(it.body)})`; const body = go(it.body).trim();