summaryrefslogtreecommitdiff
path: root/Help
diff options
context:
space:
mode:
authorBrad King <brad.king@kitware.com>2023-03-14 13:39:44 +0000
committerKitware Robot <kwrobot@kitware.com>2023-03-14 09:39:52 -0400
commit08d31c227b3245155ee9bfbd93119a2c2c860478 (patch)
treeccd8154db0ea6a0b96434279c293aad296a813ca /Help
parent17587c19f767cf713ac3338e83697037b1869ac4 (diff)
parent39ecaa5da1f1e42cb62d4ce3d6870409cdefec07 (diff)
downloadcmake-08d31c227b3245155ee9bfbd93119a2c2c860478.tar.gz
Merge topic 'smart-wrap-signatures'
39ecaa5da1 Utilities/Sphinx: Improve word wrap of signatures Acked-by: Kitware Robot <kwrobot@kitware.com> Merge-request: !8317
Diffstat (limited to 'Help')
-rw-r--r--Help/dev/documentation.rst17
1 files changed, 17 insertions, 0 deletions
diff --git a/Help/dev/documentation.rst b/Help/dev/documentation.rst
index 1dd23c6143..b7a77c9b21 100644
--- a/Help/dev/documentation.rst
+++ b/Help/dev/documentation.rst
@@ -305,6 +305,23 @@ The ``signature`` directive generates a hyperlink target for each signature:
headers, the targets do not work with Sphinx ``:ref:`` syntax, however
they can be globally referenced using e.g. ``:command:`string(APPEND)```.
+Although whitespace in the signature is not preserved, by default, line breaks
+are suppressed inside of square- or angle-brackets. This behavior can be
+controlled using the ``:break:`` option; note, however, that there is no way
+to *force* a line break. The default value is 'smart'. Allowable values are:
+
+ ``all``
+ Allow line breaks at any whitespace.
+
+ ``smart`` (default)
+ Allow line breaks at whitespace, except between matched square- or
+ angle-brackets. For example, if a signature contains the text
+ ``<input>... [OUTPUT_VARIABLE <out-var>]``, a line break would be allowed
+ after ``<input>...`` but not between ``OUTPUT_VARIABLE`` and ``<out-var>``.
+
+ ``verbatim``
+ Allow line breaks only where the source document contains a newline.
+
The directive treats its content as the documentation of the signature(s).
Indent the signature documentation accordingly.