mirror of
https://github.com/open-webui/open-webui.git
synced 2026-05-06 10:58:17 -05:00
[GH-ISSUE #23679] feat: Render Markdown in RAG citations from knowledge base #58711
Reference in New Issue
Block a user
Delete Branch "%!s()"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
Originally created by @mingos25 on GitHub (Apr 13, 2026).
Original GitHub issue: https://github.com/open-webui/open-webui/issues/23679
Check Existing Issues
Verify Feature Scope
Problem Description
Currently, citations from Markdown documents in the knowledge base display raw text instead of rendered Markdown. This affects formatting like bold, italics, code blocks, lists, and tables, making technical documentation hard to read in responses. Markdown rendering works correctly in the File Inspector, but not in RAG citations. (See related discussion: https://github.com/open-webui/open-webui/discussions/16069)
Desired Solution you'd like
Citations should parse and render Markdown syntax consistently across the UI, matching the File Inspector:
code→ codeSteps to Reproduce:
Alternatives Considered
No response
Additional Context
I implemented a local fix by modifying two components:
1.
src/lib/components/chat/Messages/Citations/CitationModal.svelte:hasMarkdownSyntax()function to detect common markdown patterns (headers, tables, lists, blockquotes, bold/italic, links, code blocks)prose-table,prose-th,prose-td) for proper border rendering and dark mode support2.
src/lib/components/chat/Messages/Markdown.svelte:gfm: trueandtables: trueto marked parser options@tjbck commented on GitHub (Apr 17, 2026):
Already implemented, enabled by default.