[PR #17250] [CLOSED] UPD: Unified_use_hightlight.js #63227

Closed
opened 2026-05-06 07:51:12 -05:00 by GiteaMirror · 0 comments
Owner

📋 Pull Request Information

Original PR: https://github.com/open-webui/open-webui/pull/17250
Author: @rgaricano
Created: 9/6/2025
Status: Closed

Base: devHead: UPD-Unified_use_hightlight.js


📝 Commits (10+)

  • c0e1539 Create HighlightJSExtension.js
  • 1ef1bff UPD-Unified_use_hightlight.js
  • 1db2523 UPD-Unified_use_hightlight.js
  • bd9761e UPD-Unified_use_hightlight.js
  • 0c87fbc Update package.json
  • d7f1c75 Update CodeEditor.svelte
  • 8a2dfae Update HighlightJSExtension.js
  • ad577c1 Update package-lock.json
  • 48888c1 Update RichTextInput.svelte
  • 71eaa2b refac/enh: commands ui

📊 Changes

8 files changed (+544 additions, -596 deletions)

View changed files

📝 package-lock.json (+351 -547)
📝 package.json (+0 -5)
📝 src/lib/components/chat/Messages/CodeBlock.svelte (+1 -1)
📝 src/lib/components/common/CodeEditor.svelte (+9 -39)
src/lib/components/common/HighlightJSExtension.js (+81 -0)
📝 src/lib/components/common/RichTextInput.svelte (+35 -3)
src/lib/utils/highlightLanguageLoader.js (+66 -0)
📝 src/lib/utils/index.ts (+1 -1)

📄 Description

UPD: Unifying the duplicate highlight.js usage to reduce bundle size.

Changelog Entry

Description

  • To solve the bundle duplication problem where both CodeMirror's native language packages and highlight.js were being included separately.

Changed

  • Configure CodeMirror without language-specific packages.
  • Created custom CodeMirror HighlightJSExtension.js, to use highlight.js as the highlighter for CodeMirror's syntax highlighting.
  • Removed unused libs due to changes from package.json & package-lock.json:
    • "codemirror-lang-elixir": "^4.0.0"
    • "codemirror-lang-hcl": "^0.1.0"

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.

## 📋 Pull Request Information **Original PR:** https://github.com/open-webui/open-webui/pull/17250 **Author:** [@rgaricano](https://github.com/rgaricano) **Created:** 9/6/2025 **Status:** ❌ Closed **Base:** `dev` ← **Head:** `UPD-Unified_use_hightlight.js` --- ### 📝 Commits (10+) - [`c0e1539`](https://github.com/open-webui/open-webui/commit/c0e1539ffdd82e887fd25e50acd27b1191d0f0c6) Create HighlightJSExtension.js - [`1ef1bff`](https://github.com/open-webui/open-webui/commit/1ef1bff6941059bc13e7a36907f44e717ff66f58) UPD-Unified_use_hightlight.js - [`1db2523`](https://github.com/open-webui/open-webui/commit/1db25239f638d5d8833737466c1b1bde65c32890) UPD-Unified_use_hightlight.js - [`bd9761e`](https://github.com/open-webui/open-webui/commit/bd9761ef3d5ee0c56ad21b71ea632ec60005ca35) UPD-Unified_use_hightlight.js - [`0c87fbc`](https://github.com/open-webui/open-webui/commit/0c87fbc7c93dfff8f2f9d703ea0e6e5c515e7de8) Update package.json - [`d7f1c75`](https://github.com/open-webui/open-webui/commit/d7f1c75f2cee62f307ab9c4f8e920f54eda2ce25) Update CodeEditor.svelte - [`8a2dfae`](https://github.com/open-webui/open-webui/commit/8a2dfae503c0f3036f5be65a8a8f2d4063a48384) Update HighlightJSExtension.js - [`ad577c1`](https://github.com/open-webui/open-webui/commit/ad577c1c46c8c4bd8b773cd930ca9c33079bff90) Update package-lock.json - [`48888c1`](https://github.com/open-webui/open-webui/commit/48888c1e9c46a3cee5d0987f4c15b83289038a99) Update RichTextInput.svelte - [`71eaa2b`](https://github.com/open-webui/open-webui/commit/71eaa2ba69a61b9977fc50ccb7565ea4d87971bd) refac/enh: commands ui ### 📊 Changes **8 files changed** (+544 additions, -596 deletions) <details> <summary>View changed files</summary> 📝 `package-lock.json` (+351 -547) 📝 `package.json` (+0 -5) 📝 `src/lib/components/chat/Messages/CodeBlock.svelte` (+1 -1) 📝 `src/lib/components/common/CodeEditor.svelte` (+9 -39) ➕ `src/lib/components/common/HighlightJSExtension.js` (+81 -0) 📝 `src/lib/components/common/RichTextInput.svelte` (+35 -3) ➕ `src/lib/utils/highlightLanguageLoader.js` (+66 -0) 📝 `src/lib/utils/index.ts` (+1 -1) </details> ### 📄 Description ### UPD: Unifying the duplicate highlight.js usage to reduce bundle size. # Changelog Entry ### Description - To solve the bundle duplication problem where both CodeMirror's native language packages and highlight.js were being included separately. ### Changed - Configure CodeMirror without language-specific packages. - Created custom CodeMirror HighlightJSExtension.js, to use highlight.js as the highlighter for CodeMirror's syntax highlighting. - Removed unused libs due to changes from package.json & package-lock.json: - "codemirror-lang-elixir": "^4.0.0" - "codemirror-lang-hcl": "^0.1.0" _____ ### Contributor License Agreement By submitting this pull request, I confirm that I have read and fully agree to the [Contributor License Agreement (CLA)](/CONTRIBUTOR_LICENSE_AGREEMENT), and I am providing my contributions under its terms. --- <sub>🔄 This issue represents a GitHub Pull Request. It cannot be merged through Gitea due to API limitations.</sub>
GiteaMirror added the pull-request label 2026-05-06 07:51:12 -05:00
Sign in to join this conversation.
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: github-starred/open-webui#63227