Preserve indentation in multi-line list entry
未关闭
还没有人认领这个 Issue。
- 主要语言
- Python
- 星标
- 22
- 派生
- 13
- 平均合并
- 4 小时 3 分钟
- 30 天内合并 PR
- 5
描述
I would like to put this in a NEWS entry:
The following `threading` methods are now deprecated and should be replaced:
- `threading.activeCount` => :func:`threading.active_count`
- `threading.Condition.notifyAll` =>
:meth:`threading.Condition.notify_all`
But when blurb generates the NEWS file, it produces:
- bpo-43723: The following `threading` methods are now deprecated and should
be replaced:
- `threading.activeCount` => :func:`threading.active_count`
- `threading.Condition.notifyAll` =>
:meth:`threading.Condition.notify_all`
Which is invalid rst, because the second line of the list is not indented enough.
It's because blurb uses textwrap.wrap to reflow the text, and that function eats any leading space in the line. Fixing this might require doing something more RST-aware.
贡献指南
这个仓库没有索引到贡献指南
从这里开始
- 先读完整个 Issue,再读项目的贡献指南。
- 在 Issue 下留言说明你要接手 —— 这能避免两个人做同样的事。
- Fork 仓库,在一个分支上完成修改。
- 提交 Pull Request,并在描述里引用这个 Issue 编号。
调研方向
首先定位 blurb 对 Python's textwrap.wrap 的使用位置,并使用此处显示的 NEWS 条目重现该问题。跟踪多行列表项是如何重新换行的,然后验证生成的输出是否保留了有效 reStructuredText 所需的缩进。
由索引模型根据 Issue 内容生成。
评估
- 技术栈
- python
- 领域
- cli
- Issue 类型
- 缺陷
- 难度
- 3/5
- 预计耗时
- 1-2 天
- 活跃度
- 停滞
- 描述清晰度
- 基本清楚
- 新手友好度
- 45/100