【发布时间】:2019-06-21 08:38:55
【问题描述】:
有什么方法可以在 reStructuredText 中换行较长的部分标题?
我的 Linter 一直抱怨超过了最大行长,这让我抓狂。
有问题的部分标题包括:any: 引用,本质上不能将其改写为更短。
我左右搜索了 RST 教程,但没有找到任何语法。
有问题的 RST 解释器是 Python 3.6 上的 Sphinx v1.8.5。
【问题讨论】:
标签: python-sphinx restructuredtext
有什么方法可以在 reStructuredText 中换行较长的部分标题?
我的 Linter 一直抱怨超过了最大行长,这让我抓狂。
有问题的部分标题包括:any: 引用,本质上不能将其改写为更短。
我左右搜索了 RST 教程,但没有找到任何语法。
有问题的 RST 解释器是 Python 3.6 上的 Sphinx v1.8.5。
【问题讨论】:
标签: python-sphinx restructuredtext
无法在 RestructuredText 中对节标题进行换行。
不过,您或许可以使用RestructuredText Substitutions 来完成您想要的。
例如
====================================
This is a |subst| long section title
====================================
.. |subst| replace:: (Insert this very long text,
which can even be line-wrapped)
【讨论】: