FIX: LaTeX rendering not working if % is put at the end of the preamble

This commit is contained in:
Enrico Sintoni
2025-01-24 18:54:08 +01:00
parent ef890d51e3
commit aae588249a

View File

@@ -69,7 +69,7 @@ export async function tex2dataURL(
try {
const node = html.convert(
preamble ? `${preamble}${tex}` : tex,
preamble ? `${preamble}\n${tex}` : tex,
{ display: true, scale }
);
const svg = new DOMParser().parseFromString(adaptor.innerHTML(node), "image/svg+xml").firstChild as SVGSVGElement;