why does this HTML block start and end on the same line?
还没有人认领这个 Issue。
评估
调研方向
使用 issue 中所示的 cmark 命令和输入重现该行为,然后将结果与链接的 spec.txt 位置中的 HTML 块规则进行比较。跟踪 HTML 块解析路径,以确定同一行关闭是有意为之还是一个 bug,并添加回归覆盖,以展示“1”和“2”之间的预期边界。
由索引模型根据 Issue 内容生成。
描述
Why is the HTML block (spec 4.6) closed on the same line when
https://github.com/commonmark/commonmark-spec/blob/d5706b9553d4665ca730524323d484880440186c/spec.txt#L2368 says that
[An HTML block] ends with the first subsequent line that meets a matching end condition. (emphasis mine)
cmark << EOF
<!-- comment --> 0
1
-->
2
EOF
<!-- raw HTML omitted -->
<p>1
-->
2
EOF</p>
I think cmark parses the comment as an HTML block. It couldn't be a raw HTML comment (spec 6.6) otherwise "0" would surface inside a <p>. So it seems that, contrary to the specification, the HTML block ends on the same line where it starts, instead of ending between "1" and "2".
- 主要语言
- C
- 星标
- 2k
- 派生
- 700
- 平均合并
- 3 天 9 小时
- 30 天内合并 PR
- 5
环境准备
这个项目没有提供开发容器、Dockerfile 或贡献指南,环境需要你自己搭建:先看它的 README,通用步骤见我们的新手贡献指南。
从这里开始
- 先读完整个 Issue,再读项目的贡献指南。
- 在 Issue 下留言说明你要接手 —— 这能避免两个人做同样的事。
- Fork 仓库,在一个分支上完成修改。
- 提交 Pull Request,并在描述里引用这个 Issue 编号。
commonmark/cmark 的其他 Issue
-
Incorrect `parser->offset` advancement for closing fenced code blocks in `parse_code_block_prefix`可能已有人在做 @cpruijsen 于 31 天前认领。 未关闭
难度 2/5 1-3 小时 新手友好度 76/100
commonmark/cmark#590 · 3 条评论 ·
-
API documentation is missing an explanation of CMARK_NODE_CUSTOM_BLOCK and CMARK_NODE_CUSTOM_INLINE未关闭
难度 2/5 1-3 小时 新手友好度 68/100
commonmark/cmark#441 · 2 条评论 ·
-
难度 4/5 3-5 天 新手友好度 52/100
commonmark/cmark#626 · 4 条评论 ·
-
难度 4/5 3-5 天 新手友好度 35/100
commonmark/cmark#624 ·
-
Single-space blank line evicts a list-item continuation可能重新可做 关联的 PR 已关闭且未合并。 未关闭
难度 3/5 1-2 天 新手友好度 65/100
commonmark/cmark#618 ·
相似的 Issue
-
bug
难度 2/5 1-3 小时 新手友好度 68/100
维护者通常 2 天内回复
-
bug
难度 2/5 1-3 小时 新手友好度 62/100
ChrisTitusTech/dwm-titus#397 ·
维护者通常 1 天内回复
-
good first issue help wanted language:fr translation
难度 1/5 1-3 小时 新手友好度 85/100
mrvi0/cli-cheatsheet#160 ·
-
Test modules use volatile int for cross-thread flags instead of atomics可能已有人在做 @rahimuddin140 今天认领。 未关闭
难度 2/5 1-3 小时 新手友好度 72/100
valkey-io/valkey#4899 · 1 条评论 ·
维护者通常 2 天内回复
-
Profiler (Remotery) leaks a socket for every connection that fails the WebSocket handshake可能已有人在做 @rthery 今天认领。 未关闭triage
难度 2/5 1-3 小时 新手友好度 72/100
维护者通常 1 天内回复