Discussion turns everything after a link into part of the link
维护者通常 1 天内回复
还没有人认领这个 Issue。
评估
- 难度
- 2/5
- 预计耗时
- 1-3 小时
- 新手友好度
- 78/100
- Issue 类型
- 缺陷
- 描述清晰度
- 描述清楚
- 活跃度
- 活跃
- 技术栈
- typescript
- 领域
- frontend
调研方向
链接模式是 class-response.component.ts 中第 51 行附近的 urlMatcher;它的路径分组 (\/.*)? 一直延伸到行尾,且 scheme 是可选的,因此像 "roots.water" 这样的裸词也会匹配。先阅读该 regex 以及将其应用于帖子文本的代码,然后用 issue 中的示例复现。当链接在空白处停止、末尾标点被排除,并且示例句子只链接 "example.com/page" 时,即完成。
由索引模型根据 Issue 内容生成。
描述
When a Discussion post or reply contains a web address followed by more text on the same line, the rest of the line becomes part of the link.
How to reproduce
As a student, post "See example.com/page for the data, I think it is wrong." The whole of "example.com/page for the data, I think it is wrong." is one link, and clicking it opens a page that does not exist.
Cause
The path part of urlMatcher in class-response.component.ts (line 51) is (\/.*)?, which matches everything up to the end of the line. Two words joined by a period without a space, such as "roots.water", also become a link, since a scheme is optional and any 2 to 5 lowercase letters count as a top-level domain.
Possible fix
Limit the path to characters that cannot be whitespace, for example (\/[^\s<]*)?, and drop trailing punctuation from the match.
- 主要语言
- TypeScript
- 星标
- 4
- 派生
- 8
- 平均合并
- 3 天 8 小时
- 30 天内合并 PR
- 12
环境准备
- 提供 Dockerfile 或 Docker Compose 文件
- 有 Pull Request 模板
- 没有贡献指南
从这里开始
- 先读完整个 Issue,再读项目的贡献指南。
- 在 Issue 下留言说明你要接手 —— 这能避免两个人做同样的事。
- Fork 仓库,在一个分支上完成修改。
- 提交 Pull Request,并在描述里引用这个 Issue 编号。
WISE-Community/WISE-Client 的其他 Issue
-
难度 2/5 1-3 小时 新手友好度 72/100
WISE-Community/WISE-Client#2403 ·
维护者通常 1 天内回复
-
难度 2/5 1-3 小时 新手友好度 78/100
WISE-Community/WISE-Client#2401 ·
维护者通常 1 天内回复
-
难度 2/5 1-3 小时 新手友好度 72/100
WISE-Community/WISE-Client#2376 ·
维护者通常 1 天内回复
-
bug
难度 2/5 1-3 小时 新手友好度 72/100
WISE-Community/WISE-Client#2354 ·
维护者通常 1 天内回复
-
难度 2/5 1-3 小时 新手友好度 72/100
WISE-Community/WISE-Client#2350 ·
维护者通常 1 天内回复
查看 WISE-Community/WISE-Client 的全部 Issue
相似的 Issue
-
Add: GTrekker未关闭check:passed streams:add
难度 1/5 1 小时以内 新手友好度 72/100
维护者通常 1 天内回复
-
area: ui Bug Payload OSS
难度 1/5 1 小时以内 新手友好度 88/100
payloadcms/payload#19839 ·
维护者通常 1 天内回复
-
难度 2/5 1-3 小时 新手友好度 85/100
维护者通常 1 天内回复
-
external
难度 2/5 1-3 小时 新手友好度 72/100
ClickHouse/ClickStack#3761 ·
维护者通常 1 天内回复
-
fix(auth): add the email OTP verification step to Pollar login可能已有人在做 @akansnoro 今天认领。 未关闭Stellar Wave
难度 2/5 1-3 小时 新手友好度 74/100
safetrustcr/dApp-SafeTrust#584 · 10 条评论 ·
维护者通常 1 天内回复