]> git.djapps.eu Git - pkg/ggml/sources/llama.cpp/commit
feat(webui): improve LaTeX rendering with currency detection (#16508)
authorSascha Rogmann <redacted>
Sun, 2 Nov 2025 23:41:08 +0000 (00:41 +0100)
committerGitHub <redacted>
Sun, 2 Nov 2025 23:41:08 +0000 (00:41 +0100)
commitbcfa87622ae46be6345a8e3dfdbdc5ba5414042b
treef66145edf1c4055b706f93b2d4380291e866281c
parenta2054e3a8ff0da3978a4acc18c349ff58554d336
feat(webui): improve LaTeX rendering with currency detection (#16508)

* webui : Revised LaTeX formula recognition

* webui : Further examples containg amounts

* webui : vitest for maskInlineLaTeX

* webui: Moved preprocessLaTeX to lib/utils

* webui: LaTeX in table-cells

* chore: update webui build output (use theirs)

* webui: backslash in LaTeX-preprocessing

* chore: update webui build output

* webui: look-behind backslash-check

* chore: update webui build output

* Apply suggestions from code review

Code maintenance (variable names, code formatting, string handling)

Co-authored-by: Aleksander Grygier <redacted>
* webui: Moved constants to lib/constants.

* webui: package woff2 inside base64 data

* webui: LaTeX-line-break in display formula

* chore: update webui build output

* webui: Bugfix (font embedding)

* webui: Bugfix (font embedding)

* webui: vite embeds assets

* webui: don't suppress 404 (fonts)

* refactor: KaTeX integration with SCSS

Moves KaTeX styling to SCSS for better customization and font embedding.

This change includes:
- Adding `sass` as a dev dependency.
- Introducing a custom SCSS file to override KaTeX variables and disable TTF/WOFF fonts, relying solely on WOFF2 for embedding.
- Adjusting the Vite configuration to resolve `katex-fonts` alias and inject SCSS variables.

* fix: LaTeX processing within blockquotes

* webui: update webui build output

---------

Co-authored-by: Aleksander Grygier <redacted>
tools/server/public/index.html.gz
tools/server/webui/package-lock.json
tools/server/webui/package.json
tools/server/webui/src/lib/components/app/misc/MarkdownContent.svelte
tools/server/webui/src/lib/constants/latex-protection.ts [new file with mode: 0644]
tools/server/webui/src/lib/utils/latex-protection.test.ts [new file with mode: 0644]
tools/server/webui/src/lib/utils/latex-protection.ts [new file with mode: 0644]
tools/server/webui/src/stories/fixtures/math-formulas.ts
tools/server/webui/src/styles/katex-custom.scss [new file with mode: 0644]
tools/server/webui/svelte.config.js
tools/server/webui/vite.config.ts