Skip to content

fix(ui): 修复无语言 fenced code 的块级样式 - #98

Open
treasuresyq wants to merge 1 commit into
helsome:mainfrom
treasuresyq:fix/issue-28-untyped-fenced-code
Open

fix(ui): 修复无语言 fenced code 的块级样式#98
treasuresyq wants to merge 1 commit into
helsome:mainfrom
treasuresyq:fix/issue-28-untyped-fenced-code

Conversation

@treasuresyq

Copy link
Copy Markdown

Related to #28. 使用 pre 上下文区分块级代码与行内代码,避免无 language-* 标记的 fenced block 被渲染成行内样式,并补充回归测试。

改动说明

language-* 标记的 fenced code block 之前无法通过 className 判断为块级代码,会被错误地应用行内代码样式。

本次修改通过 pre 上下文区分块级代码与行内代码,使无语言标记的 fenced block 始终使用块级样式,并补充对应的回归测试。

关联 Issue

Related to #28

测试报告(正式审核前必填)

环境

  • Bun:1.4.2
  • OS:Windows NT 10.0.26200.0

实际执行命令与结果

bun test packages/ui/src/components/chat/MarkdownContent.test.tsx
→ 6 passed / 0 failed

bun run typecheck
→ @finagent/core、@finagent/i18n、@finagent/shared、@finagent/ui、@finagent/electron 全部 exit 0

已知失败 / Baseline(如有)

无。

  • 已提供实际测试命令与 pass/fail 结果
  • 已说明测试环境
  • 如果存在已知 baseline / 环境失败,已提供 main 对照或说明
  • 核心改动已有对应 focused test / smoke / integration 验证

UI 截图(仅可见 UI 变化时必填)

  • 本 PR 无可见 UI 变化(无需截图)
  • 本 PR 有可见 UI 变化,已提供修改后的 UI 截图
  • 已提供 Before / After 对比截图(适用时)

Before(适用时)

before

After(适用时)

after

Scope / 后续

本 PR 聚焦修复无 language-* 标记的 fenced code block 被误用行内样式的问题,不包含其他 Markdown 渲染调整。

Related to helsome#28. 使用 pre 上下文区分块级代码与行内代码,避免无 language-* 标记的 fenced block 被渲染成行内样式,并补充回归测试。
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.

1 participant