`RDoc::Parser::ChangeLog` doesn't handle keep-a-changelog style CHANGELOG correctly
维护者通常 1 天内回复
还没有人认领这个 Issue。
评估
- 难度
- 4/5
- 预计耗时
- 3-5 天
- 新手友好度
- 35/100
- Issue 类型
- 功能
- 描述清晰度
- 基本清楚
- 活跃度
- 停滞
- 技术栈
- markdown, ruby
调研方向
从 RDoc::Parser::ChangeLog 开始,使用提供的 CHANGELOG.md keep-a-changelog 片段复现 rdoc 命令的行为。将当前的 GNU 风格解析与预期的 Markdown 链接进行比较,并确定应由一个 parser 还是单独的 parser 支持这两种风格。当 v3.0.0 之类的链接能够正确渲染,并且已确定将 changelogs 纳入生成文档的预期方式时,即视为完成。
由索引模型根据 Issue 内容生成。
描述
Background
This is not a "bug", because it says
This parser is meant to parse the MRI ChangeLog, but can be used to parse any # {GNU style ChangeLog}[http://www.gnu.org/prep/standards/html_node/Style-of-Change-Logs.html].
However, when we run rdoc command, it automatically parses CHANGELOG.md file and outputs some wrong results. This is done by default so it's not a desired behavior.
Problem
When parsing a markdown snippet like below:
## [3.0.0] 2023-10-11
### IMPORTANT
**This release contains an important bug fix that can cause data corruption.**
**If you're using Ruby 3, it's highly recommended to upgrade to [v3.0.0](https://rubygems.org/gems/alba/versions/3.0.0)**
**If you're using Ruby 2, please upgrade to [v2.4.2](https://rubygems.org/gems/alba/versions/2.4.2) that contains bug fix only as soon as possible.**
it should create a link for v3.0.0 since it's a valid markdown syntax (GitHub renders it as a link, for example, see https://github.com/okuramasafumi/alba/blob/main/CHANGELOG.md#300-2023-10-11).
However, the resulted HTML is:
<h2 id="label-5B3.0.0-5D+2023-10-11">[3.0.0] 2023-10-11<span><a href="#label-5B3.0.0-5D+2023-10-11">¶</a> <a href="#top">↑</a></span></h2>
<h3 id="label-IMPORTANT">IMPORTANT<span><a href="#label-IMPORTANT">¶</a> <a href="#top">↑</a></span></h3>
<p><strong>This release contains an important bug fix that can cause data corruption.</strong> <strong>If you’re using Ruby 3, it’s highly recommended to upgrade to {v3.0.0}[https://rubygems.org/gems/alba/versions/3.0.0]</strong> <strong>If you’re using Ruby 2, please upgrade to {v2.4.2}[https://rubygems.org/gems/alba/versions/2.4.2] that contains bug fix only as soon as possible.</strong></p>
The link parts are not rendered correctly.
Solution
The comment in this parser says it's for GNU style changelog only, but I believe most projects use keep a changelog style. They don't look compatible.
So we have two ways. One is to improve the current changelog parser so that it can parse both styles. Another is to create another parser for keep-a-changelog style specific.
We can also discuss if including changelog into a resulted documents is desired or not. YARD doesn't include it, so maybe nobody wants it.
- 主要语言
- Ruby
- 星标
- 928
- 派生
- 471
- 平均合并
- 2 天 4 分钟
- 30 天内合并 PR
- 13
环境准备
- 没有 Dockerfile 或 Docker Compose 文件
- 没有 Pull Request 模板
- 阅读贡献指南
从这里开始
- 先读完整个 Issue,再读项目的贡献指南。
- 在 Issue 下留言说明你要接手 —— 这能避免两个人做同样的事。
- Fork 仓库,在一个分支上完成修改。
- 提交 Pull Request,并在描述里引用这个 Issue 编号。
ruby/rdoc 的其他 Issue
-
难度 2/5 1-3 小时 新手友好度 72/100
维护者通常 1 天内回复
-
RDoc 8.0.0 gem omits `doc/rdoc/example.rb`, which is referenced by the packaged markup documentation可能已有人在做 @OskarEichler 于 66 天前认领。 未关闭
难度 2/5 1-3 小时 新手友好度 78/100
维护者通常 1 天内回复
-
难度 2/5 1-3 小时 新手友好度 85/100
维护者通常 1 天内回复
-
markdown html excerpt includes link parts可能已有人在做 @anyingiit 于 12 天前认领。 未关闭
难度 3/5 1-2 天 新手友好度 66/100
维护者通常 1 天内回复
-
Regexp generated from unescaped input in #expand_class可能已有人在做 @jaynetics 于 24 天前认领。 未关闭
难度 1/5 1 小时以内 新手友好度 25/100
维护者通常 1 天内回复
相似的 Issue
-
resource: surah-info
难度 2/5 1-3 小时 新手友好度 68/100
TarteelAI/quranic-universal-library#996 ·
维护者通常 1 天内回复
-
Missing ar translation: components/common/CommunitySolution.tsx:communitySolution.authorsSolution未关闭
难度 1/5 1 小时以内 新手友好度 68/100
维护者通常 1 天内回复
-
难度 2/5 1-3 小时 新手友好度 72/100
swombat/souls-house#770 ·
维护者通常 1 天内回复
-
some_triage_time crashes with Fbe::Error on inaccessible repository because repo_id_by_name wraps NotFound and Forbidden可能已有人在做 @opusstudiohq-max 今天认领。 未关闭
难度 2/5 1-3 小时 新手友好度 77/100
zerocracy/judges-action#3100 ·
维护者通常 2 天内回复
-
难度 2/5 1-3 小时 新手友好度 66/100
riverqueue/river#1576 ·
维护者通常 1 天内回复