freeCodeCamp / freeCodeCamp/devdocs

Fix header formatting in Sphinx-based docs

未关闭
#1,154 1 条评论 0 个 reaction 已指派 0 人 在 GitHub 查看
docs/improvement
主要语言
Ruby
星标
39.5k
派生
2.6k
平均合并
4 天 32 分钟
30 天内合并 PR
13

描述

The Sphinx `clean_html` filter removes all formatting from `

` elements:

https://github.com/freeCodeCamp/devdocs/blob/58a0120697a701f2cb9ca87061ec7ef6fde3b013/lib/docs/filters/sphinx/clean_html.rb#L64

However, this is not entirely desirable since the formatting makes things look better. For example, the [header for `BaseException`](http://devdocs.localhost/python~3.8/library/exceptions#BaseException) ([original](https://docs.python.org/3.8/library/exceptions.html#BaseException)) is transformed from this:

> *exception* **`BaseException`**

to this:
> `exception BaseException`

cc @Thibaut since you might have a reason for implementing this this way. (no worries if you don’t reply though)

贡献指南

打开贡献指南

评估

这个 Issue 还没有评估数据。

把新 issue 发到你的邮箱

精选适合新手参与的 GitHub issue 摘要。