【问题标题】:reStructuredText long section titlereStructuredText 长节标题
【发布时间】:2019-06-21 08:38:55
【问题描述】:

有什么方法可以在 reStructuredText 中换行较长的部分标题?

我的 Linter 一直抱怨超过了最大行长,这让我抓狂。

有问题的部分标题包括:any: 引用,本质上不能将其改写为更短。

我左右搜索了 RST 教程,但没有找到任何语法。

有问题的 RST 解释器是 Python 3.6 上的 Sphinx v1.8.5。

【问题讨论】:

    标签: python-sphinx restructuredtext


    【解决方案1】:

    无法在 RestructuredText 中对节标题进行换行。

    不过,您或许可以使用RestructuredText Substitutions 来完成您想要的。

    例如

    ====================================
    This is a |subst| long section title
    ====================================
    
    .. |subst| replace:: (Insert this very long text,
                         which can even be line-wrapped)
    

    【讨论】:

      猜你喜欢
      • 1970-01-01
      • 2011-01-22
      • 1970-01-01
      • 1970-01-01
      • 2016-01-13
      • 2013-12-17
      • 2013-10-04
      • 1970-01-01
      • 2023-03-27
      相关资源
      最近更新 更多