FIX[Editor]: More simplifications and fixes

This commit is contained in:
Nicolás Hatcher
2024-10-14 21:00:40 +02:00
committed by Nicolás Hatcher Andrés
parent 9805d0c518
commit 730a815729
5 changed files with 16 additions and 61 deletions

View File

@@ -102,7 +102,6 @@ export function getColor(index: number, alpha = 1): string {
function getFormulaHTML(
model: Model,
text: string,
referenceRange: string,
): { html: JSX.Element[]; activeRanges: ActiveRange[] } {
let html: JSX.Element[] = [];
const activeRanges: ActiveRange[] = [];
@@ -180,10 +179,6 @@ function getFormulaHTML(
html.push(<span key={index}>{formula.slice(start, end)}</span>);
}
}
// If there is a reference range add it at the end
if (referenceRange !== "") {
html.push(<span key="reference">{referenceRange}</span>);
}
html = [<span key="equals">=</span>].concat(html);
} else {
html = [<span key="single">{text}</span>];