Nested inline code, emoji and mentions disappear inside bold, italic and strikethrough
维护者通常 1 天内回复
还没有人认领这个 Issue。
评估
- 难度
- 2/5
- 预计耗时
- 1-3 小时
- 新手友好度
- 75/100
- Issue 类型
- 缺陷
- 描述清晰度
- 描述清楚
- 活跃度
- 活跃
- 技术栈
- javascript
- 领域
- frontend
调研方向
从 markups 包中的 BoldSpan.js、ItalicSpan.js 和 StrikeSpan.js 开始;阅读每个文件如何映射 AST 子类型,以及在哪里对未处理的子节点返回 null。用 *run yarn build first* 的解析器输出复现,然后补充缺失的 INLINE_CODE、EMOJI 和 MENTION 情况,以及 StrikeSpan.js 中的时间戳,并配上回归测试。完成意味着嵌套内容能渲染,且现有 markup 测试通过;italic/strikethrough 内部的链接和 nested-emphasis 崩溃不在范围内。
由索引模型根据 Issue 内容生成。
描述
Description
Nested inline code, emoji and mentions are silently dropped by the markup renderer inside bold, italic and strikethrough.
For example, this message:
*run `yarn build` first*
renders as "run first", with the inline code missing.
Steps to reproduce
- Use EmbeddedChat develop at commit 1cb7bb38.
- Parse the example above using @rocket.chat/message-parser 0.31.29.
- Render the resulting AST through the markups package.
- Observe that the parser includes an INLINE_CODE child inside BOLD, but the rendered output drops it.
I also reproduced missing inline code, emoji and mentions inside italic and strikethrough using a local rendering harness.
Expected behaviour
Supported nested inline content should remain visible inside the formatting wrapper.
Environment
- EmbeddedChat: develop at 1cb7bb38
- Node.js: 24.0.0
- Yarn: 3.6.4
- @rocket.chat/message-parser: 0.31.29
Additional context
BoldSpan.js, ItalicSpan.js and StrikeSpan.js return null for child types they do not explicitly handle.
I have a local fix with regression tests for inline code, emoji and mentions inside these wrappers, plus timestamps inside strikethrough. Links inside italic/strikethrough and the pre-existing CommonJS nested-emphasis crashes remain outside this fix.
Related PRs #1044 and #1139 overlap with some files but address different behaviour.
Verification so far uses local package rendering, not a live Rocket.Chat server or the real chat UI.
Is this a fix you'd welcome a PR for?
- 主要语言
- JavaScript
- 星标
- 170
- 派生
- 397
- 平均合并
- 12 天 14 小时
- 30 天内合并 PR
- 6
环境准备
- 没有 Dockerfile 或 Docker Compose 文件
- 有 Pull Request 模板
- 没有贡献指南
从这里开始
- 先读完整个 Issue,再读项目的贡献指南。
- 在 Issue 下留言说明你要接手 —— 这能避免两个人做同样的事。
- Fork 仓库,在一个分支上完成修改。
- 提交 Pull Request,并在描述里引用这个 Issue 编号。
RocketChat/EmbeddedChat 的其他 Issue
-
docs: README says Node 22 is required, but .nvmrc pins v24 and preinstall enforces it可能已有人在做 @Veerpratapgupta 于 29 天前认领。 未关闭
难度 2/5 1-3 小时 新手友好度 88/100
RocketChat/EmbeddedChat#1377 · 1 条评论 ·
维护者通常 1 天内回复
-
test: isMessageSequential in layout_editor has no coverage可能重新可做 关联的 PR 已关闭且未合并。 未关闭
难度 2/5 1-3 小时 新手友好度 75/100
RocketChat/EmbeddedChat#1373 ·
维护者通常 1 天内回复
-
Permissions change-detection in useFetchChatData is dead — applyPermissions re-runs on every call可能已有人在做 @yash113gadia 于 166 天前认领。 未关闭
难度 1/5 1 小时以内 新手友好度 85/100
RocketChat/EmbeddedChat#1317 ·
维护者通常 1 天内回复
-
Only the last emoji shortname in a message is converted to unicode可能已有人在做 @yash113gadia 于 166 天前认领。 未关闭
难度 2/5 1-3 小时 新手友好度 84/100
RocketChat/EmbeddedChat#1315 ·
维护者通常 1 天内回复
-
bug: "Last login" shows ambiguous weekday with no date for logins older than today可能已有人在做 @yash113gadia 于 167 天前认领。 未关闭
难度 2/5 1-3 小时 新手友好度 72/100
RocketChat/EmbeddedChat#1313 ·
维护者通常 1 天内回复
查看 RocketChat/EmbeddedChat 的全部 Issue
相似的 Issue
-
难度 2/5 1-3 小时 新手友好度 72/100
-
Bug: Table layout and date column are cut off on mobile screens on the Tournaments -> History page未关闭bug
难度 2/5 1-3 小时 新手友好度 74/100
hexlet-codebattle/codebattle#2375 ·
-
intake mcp-intake needs-human-review priority:high
难度 2/5 1-3 小时 新手友好度 65/100
Ikalus1988/MisakaNet#5041 · 3 条评论 ·
维护者通常 1 天内回复
-
难度 2/5 1-3 小时 新手友好度 72/100
nicobailon/pi-web-access#682 ·
维护者通常 1 天内回复
-
nip27: long hashtag swallows the rest of the content, lone # gives an empty hashtag可能已有人在做 @bardrop 今天认领。 未关闭
难度 2/5 1-3 小时 新手友好度 82/100
nbd-wtf/nostr-tools#578 ·