[PR #7919] [MERGED] fix: enhance Markdown text cleaning for TTS compatibility #37765

Closed
opened 2026-04-25 11:05:16 -05:00 by GiteaMirror · 0 comments
Owner

📋 Pull Request Information

Original PR: https://github.com/open-webui/open-webui/pull/7919
Author: @denispol
Created: 12/17/2024
Status: Merged
Merged: 12/17/2024
Merged by: @tjbck

Base: devHead: main


📝 Commits (2)

  • d87584e refactor(utils): enhance Markdown text cleaning for TTS compatibility
  • e6add28 Update index.ts

📊 Changes

1 file changed (+25 additions, -1 deletions)

View changed files

📝 src/lib/utils/index.ts (+25 -1)

📄 Description

Enhanced Markdown formatting removal

Discussion #7925

Changes

  • Expanded the removeFormattings function to handle more Markdown syntax
  • Added preservation of text within bold and italic markers

Context

Azure AI Speech Services would not process text enclosed with asterisks (i.e. bold, italic...), issue #5560

Tests

Please check the fiddle I made to test the changes (markdown formatting stripping and cleanup)


🔄 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/7919 **Author:** [@denispol](https://github.com/denispol) **Created:** 12/17/2024 **Status:** ✅ Merged **Merged:** 12/17/2024 **Merged by:** [@tjbck](https://github.com/tjbck) **Base:** `dev` ← **Head:** `main` --- ### 📝 Commits (2) - [`d87584e`](https://github.com/open-webui/open-webui/commit/d87584e7ad21760ae540c76687016a49c78435c7) refactor(utils): enhance Markdown text cleaning for TTS compatibility - [`e6add28`](https://github.com/open-webui/open-webui/commit/e6add2869bc0da0836d6337462e19a2f9a1555e9) Update index.ts ### 📊 Changes **1 file changed** (+25 additions, -1 deletions) <details> <summary>View changed files</summary> 📝 `src/lib/utils/index.ts` (+25 -1) </details> ### 📄 Description # Enhanced Markdown formatting removal Discussion #7925 ## Changes - Expanded the `removeFormattings` function to handle more Markdown syntax - Added preservation of text within bold and italic markers ## Context Azure AI Speech Services would not process text enclosed with asterisks (i.e. bold, italic...), issue #5560 ## Tests Please check the [fiddle](https://codepen.io/denispol/full/gbYgZvj) I made to test the changes (markdown formatting stripping and cleanup) --- <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-04-25 11:05:16 -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#37765