]> git.djapps.eu Git - pkg/ggml/sources/llama.cpp/commit
Fix rtl text rendering (#21382)
authorKabir08 <redacted>
Tue, 7 Apr 2026 09:37:20 +0000 (15:07 +0530)
committerGitHub <redacted>
Tue, 7 Apr 2026 09:37:20 +0000 (11:37 +0200)
commitd1f82e382ddf67f63ee0fd28ae613456cbb23481
treebf8d13038eb10a882e34d81d5572d08502c2d764
parent0988accf824e817d0e3db55c05f5f2954fbfe505
Fix rtl text rendering (#21382)

* Fix Arabic RTL text rendering in web UI

- Add dir='auto' attributes to markdown containers and blocks
- Implement post-processing to add dir='auto' to all text elements
- Replace directional CSS properties with logical properties for proper RTL list alignment
- Ensure bidirectional text support for mixed Arabic/English content

* Clean up commented duplicate function

Remove the commented-out duplicate transformMdastNode function
that was left over from refactoring.

* Fix Arabic RTL text rendering in web UI

- Add dir='auto' attributes to markdown containers and blocks
- Implement post-processing to add dir='auto' to all text elements
- Replace directional CSS properties with logical properties for proper RTL list alignment
- Minor code formatting improvements

This ensures bidirectional text support for mixed Arabic/English content in the llama.cpp web UI.

* Implement rehype plugin for comprehensive RTL text support

- Add rehypeRtlSupport plugin that applies dir='auto' to all elements with children
- Replace DOMParser-based approach with efficient HAST tree processing
- Remove hardcoded element lists for better maintainability
- Ensure proper bidirectional text rendering for mixed RTL/LTR content

* Fix RTL text rendering with rehype plugin and cleanup

* fix: prettier formatting
tools/server/public/bundle.css
tools/server/public/bundle.js
tools/server/public/index.html
tools/server/webui/package-lock.json
tools/server/webui/src/lib/components/app/content/MarkdownContent.svelte
tools/server/webui/src/lib/markdown/rehype-rtl-support.ts [new file with mode: 0644]