mirror of
https://github.com/danny-avila/LibreChat.git
synced 2026-11-17 13:33:45 +00:00
`markdownToHtml` (#15087) imported `preprocessLaTeX` from `client/src/utils/latex.ts`, but #15181 replaced that preprocessing pass with the currency-safe `singleDollarMath` micromark construct and removed the function. The symbol exists nowhere in the repo, so `dev` fails `tsc --noEmit` with TS2305 and the Vite build with `[MISSING_EXPORT] "preprocessLaTeX" is not exported by "src/utils/latex.ts"`, which reds out the client typecheck, the build verification, and every job downstream of the client build on `dev` and on every open pull request. Register `singleDollarMath` in the extension list when `mode.latex` is set instead. That is exactly what the message renderers do — `markdownConfig.ts` adds `remarkSingleDollarMath` only when `latexParsing` is on, and that plugin does nothing but push `singleDollarMath` into `micromarkExtensions` — so clipboard HTML keeps mirroring the rendered message, which is the parity this helper is built around. `markdownToHtml` parses with `fromMarkdown` directly rather than through unified, so the extension array is the equivalent seam. Both specs already pinned the intended behavior and pass unchanged: `$E=mc^2$` becomes inline math under `latex: true`, `$5 to $10` stays currency. Their titles said "preprocesses", which no longer names a mechanism that exists; they now say "parses". |
||
|---|---|---|
| .. | ||
| public | ||
| scripts | ||
| src | ||
| sw | ||
| test | ||
| babel.config.cjs | ||
| check_updates.sh | ||
| index.html | ||
| jest.config.cjs | ||
| jest.resolver.cjs | ||
| nginx.conf | ||
| package.json | ||
| postcss.config.cjs | ||
| tailwind.config.cjs | ||
| tsconfig.json | ||
| vite.config.ts | ||