Incorrect handling of tabs in link resources compared to spaces, newlines
评估
- 难度
- 2/5
- 预计耗时
- 1-3 小时
- 新手友好度
- 45/100
- Issue 类型
- 缺陷
- 描述清晰度
- 基本清楚
- 活跃度
- 停滞
- 技术栈
- javascript
- 领域
- tooling
调研方向
从 lib/inlines.js 大约第 651 行开始,使用链接的 dingus permalink 重现制表符和空格的情况。比较链接目标和标题附近的处理方式,然后验证在列出的每种情况下制表符和空格的行为是否相同。
由索引模型根据 Issue 内容生成。
描述
- Spec currently defines whitespace can exist, and in some cases must exist around the destination and title, in the parens: https://spec.commonmark.org/0.29/#inline-link
- I clarified the wording recently in https://github.com/commonmark/commonmark-spec/pull/618
- But
whitespacewas used since the start: https://github.com/commonmark/commonmark-spec/blame/858a28941d0dd17c24b7240f21372652111bd38b/spec.txt#L7495
The bug probably stems from here: https://github.com/commonmark/commonmark.js/blob/8c698a295f7cea58597769ccfaab2219add45e44/lib/inlines.js#L651, which seems to include spaces and newlines but not tabs.
This bug can be reproduced with the following permalink to the dingus: https://spec.commonmark.org/dingus/?text=tab%3A%20%5Bx%5D(%09y)%0Aspace%3A%20%5Bx%5D(%20y)%0A%0Atab%3A%20%5Bx%5D(y%09)%0Aspace%3A%20%5Bx%5D(y%20)%0A%0Atab%3A%20%5Bx%5D(%09%3Cy%3E)%0Aspace%3A%20%5Bx%5D(%20%3Cy%3E)%0A%0Atab%3A%20%5Bx%5D(y%09%22z%22)%0Aspace%3A%20%5Bx%5D(y%20%22z%22)%0A.
The expected behavior is that tabs and spaces behave the same.
- 主要语言
- JavaScript
- 星标
- 1.6k
- 派生
- 234
- 平均合并
- 1 天 27 分钟
- 30 天内合并 PR
- 1
环境准备
- 没有 Dockerfile 或 Docker Compose 文件
- 没有 Pull Request 模板
- 阅读贡献指南
从这里开始
- 先读完整个 Issue,再读项目的贡献指南。
- 在 Issue 下留言说明你要接手 —— 这能避免两个人做同样的事。
- Fork 仓库,在一个分支上完成修改。
- 提交 Pull Request,并在描述里引用这个 Issue 编号。
commonmark/commonmark.js 的其他 Issue
-
White space handling looks inconsistent between HTML block element vs HTML inline element可能已有人在做 @mamicicekel 于 19 天前认领。 未关闭
难度 3/5 1-2 天 新手友好度 35/100
commonmark/commonmark.js#303 · 2 条评论 ·
-
难度 4/5 3-5 天 新手友好度 35/100
commonmark/commonmark.js#287 · 1 个 reaction ·
-
难度 3/5 1-2 天 新手友好度 20/100
commonmark/commonmark.js#275 ·
-
难度 5/5 一周以上 新手友好度 25/100
commonmark/commonmark.js#267 · 3 条评论 ·
-
难度 3/5 1-2 天 新手友好度 42/100
commonmark/commonmark.js#264 · 1 个 reaction ·
查看 commonmark/commonmark.js 的全部 Issue
相似的 Issue
-
难度 2/5 1-3 小时 新手友好度 78/100
Yomguithereal/mnemonist#247 ·
-
难度 2/5 1-3 小时 新手友好度 72/100
up-for-grabs/up-for-grabs.net#6330 ·
维护者通常 1 天内回复
-
难度 1/5 1-3 小时 新手友好度 72/100
TheOdinProject/curriculum#31490 ·
维护者通常 1 天内回复
-
bug require-triage
难度 2/5 1-3 小时 新手友好度 72/100
expressjs/expressjs.com#2549 · 1 个 reaction ·
维护者通常 1 天内回复
-
Docs: no path for someone who just wants to try Indiekit可能已有人在做 @rmdes 今天认领。 未关闭
难度 2/5 1-3 小时 新手友好度 72/100
getindiekit/indiekit#1028 ·
维护者通常 1 天内回复