3
votes

Is there any way to linewrap a long section title in reStructuredText?

My Linter keeps complaining about exceeding the maximum line length, which drives me crazy.

The section title in question includes :any: references, that can by nature not be reworded to be shorter.

I have searched RST tutorials left and right, but found no syntax whatsoever for this.

RST interpreter in question is Sphinx v1.8.5 on Python 3.6.

1

1 Answers

3
votes

There is no way to linewrap a section title in RestructuredText.

However you can probably use RestructuredText Substitutions to accomplish what you want.

e.g.

====================================
This is a |subst| long section title
====================================

.. |subst| replace:: (Insert this very long text,
                     which can even be line-wrapped)