This commit is contained in:
Виталий Лавшонок
2025-12-25 17:43:06 +03:00
parent 106510e3c9
commit cde4765bd7

View File

@@ -78,7 +78,7 @@ const replaceImages = (
const doc = parser.parseFromString(html, 'text/html');
const latexImageNames = Array.from(
latex.matchAll(/\\includegraphics\{(.+?)\}/g),
latex.matchAll(/\\includegraphics(?:\[[^\]]*\])?\{(.+?)\}/g),
).map((match) => match[1]);
const imgs = doc.querySelectorAll<HTMLImageElement>('img.tex-graphics');