Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

fix: [Chat]Fix special symbols causing conversion errors #2452

Merged
merged 1 commit into from
Aug 27, 2024

Conversation

YyumeiZhang
Copy link
Collaborator

中文模板 / Chinese Template

What kind of change does this PR introduce? (check at least one)

  • Bugfix
  • Feature
  • Code style update
  • Refactor
  • Test Case
  • TypeScript definition update
  • Document improve
  • CI/CD improve
  • Branch sync
  • Other, please describe:

PR description

Fixes #

修改前:
使用 MarkdownRender 组件时候,使用的模式是 mdx 模式 (format="mdx", 默认),在渲染文件类型时候,用了 JSX。

问题:
mdx默认是下,<, { 等特殊符号会认为是 jsx 代码的一部分,不转义会导致解析出现 SyntaxError

修改后:
不通过MarkdownRender 渲染文件,使用 md 模式 (format="md", 默认)。

Changelog

🇨🇳 Chinese

  • Fix: 修复 Chat 组件内容显示部分解析未转义字符时候的 SyntaxError

🇺🇸 English

  • Fix: Fixed SyntaxError when parsing unescaped characters in Chat component message box

Checklist

  • Test or no need
  • Document or no need
  • Changelog or no need

Other

  • Skip Changelog

Additional information

Copy link

This pull request is automatically built and testable in CodeSandbox.

To see build info of the built libraries, click here or the icon next to each commit SHA.

Latest deployment of this branch, based on commit c699ebb:

Sandbox Source
pr-story Configuration

@DaiQiangReal DaiQiangReal merged commit 346feb1 into main Aug 27, 2024
9 of 10 checks passed
@DaiQiangReal DaiQiangReal deleted the fix/chat-markdownRender branch August 27, 2024 04:13
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants