mirror of
https://github.com/open-webui/open-webui.git
synced 2026-05-06 19:08:59 -05:00
[PR #17870] [CLOSED] feat: Add Footnote Reference Support to Markdown #63438
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?
📋 Pull Request Information
Original PR: https://github.com/open-webui/open-webui/pull/17870
Author: @danielaskdd
Created: 9/28/2025
Status: ❌ Closed
Base:
dev← Head:main📝 Commits (2)
02fcf4fAdd footnote reference support to markdown renderer3f1dabeMerge branch 'dev'📊 Changes
4 files changed (+66 additions, -0 deletions)
View changed files
📝
src/app.css(+20 -0)📝
src/lib/components/chat/Messages/Markdown.svelte(+2 -0)📝
src/lib/components/chat/Messages/Markdown/MarkdownInlineTokens.svelte(+2 -0)➕
src/lib/utils/marked/footnote-extension.ts(+42 -0)📄 Description
feat: Add Footnote Reference Support to Markdown
Overview
This PR adds support for footnote references in Markdown content using the syntax
[^1],[^note], etc. Footnote references are rendered as superscript text that blends naturally with the surrounding content.Footnote references are very common in RAG-generated content. Therefore, it is essential that Open-WebUI correctly renders these footnotes for improved readability and visual consistency.
Related Discussion : #17867
Feature Added
[^1],[^note]Rendering Behavior
Screenshots
Breaking Changes
n/a
Changes Made
New Extension (
src/lib/utils/marked/footnote-extension.ts)[^identifier]where identifier can be alphanumeric, underscore, or hyphenIntegration Updates
footnoteReftoken typeStyling (
src/app.css)Security
Testing Considerations
Future Enhancements
RAG system( like LightRAG) provides a structured list of referenced documents alongside the LLM-generated response, enabling us to render footnote references as clickable HTTP links that open the original source webpages.
🔄 This issue represents a GitHub Pull Request. It cannot be merged through Gitea due to API limitations.