mirror of
https://github.com/open-webui/open-webui.git
synced 2026-05-06 19:08:59 -05:00
[PR #18064] [CLOSED] feat: Add Footnote Reference Support to Markdown #47706
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/18064
Author: @danielaskdd
Created: 10/5/2025
Status: ❌ Closed
Base:
dev← Head:footnode📝 Commits (4)
643f5aaAdd footnote reference support to markdown renderer2bd7df4Update TipTap bubble and floating menu extensions to v3.0.721d1d21Merge remote-tracking branch 'upstream/dev' into footnodee529b5fMerge branch 'dev' into footnode📊 Changes
6 files changed (+3982 additions, -3137 deletions)
View changed files
📝
package-lock.json(+3914 -3135)📝
package.json(+2 -2)📝
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
This PR is identical to #17924 which is closed by branch refactoring.
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.
Contributor License Agreement
By submitting this pull request, I confirm that I have read and fully agree to the Contributor License Agreement (CLA), and I am providing my contributions under its terms.
🔄 This issue represents a GitHub Pull Request. It cannot be merged through Gitea due to API limitations.