Skip to content

Conversation

@pyoneerC
Copy link
Contributor

@pyoneerC pyoneerC commented Oct 4, 2025

closes #487
This pull request improves the sanitizeText function in chat-utils.ts to handle unbalanced fenced code blocks in user input, ensuring proper Markdown rendering in the chat UI.

Improvements to text sanitization:

  • Enhanced the sanitizeText function to automatically detect and close unbalanced triple backtick code fences, preventing broken Markdown rendering when users submit incomplete code blocks. This change only affects display and does not modify the stored content.

@dosubot dosubot bot added size:S This PR changes 10-29 lines, ignoring generated files. enhancement New feature or request labels Oct 4, 2025
@matteo8p matteo8p merged commit 6eb1894 into MCPJam:main Oct 13, 2025
1 check failed
@pyoneerC pyoneerC deleted the fences branch December 8, 2025 20:53
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

enhancement New feature or request size:S This PR changes 10-29 lines, ignoring generated files.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Gpt models are returning cutt of codeblocks

2 participants