doc: netlink: Don't 'sanitize' op docstrings in generated .rst
authorDonald Hunter <donald.hunter@gmail.com>
Tue, 28 May 2024 14:06:50 +0000 (15:06 +0100)
committerJakub Kicinski <kuba@kernel.org>
Thu, 30 May 2024 01:10:25 +0000 (18:10 -0700)
The doc strings for do/dump ops are emitted as toplevel .rst constructs
so they can be multi-line. Pass multi-line text straight through to the
.rst to retain any simple formatting from the .yaml

This fixes e.g. list formatting for the pin-get docs in dpll.yaml:

https://docs.kernel.org/6.9/networking/netlink_spec/dpll.html#pin-get

Signed-off-by: Donald Hunter <donald.hunter@gmail.com>
Link: https://lore.kernel.org/r/20240528140652.9445-3-donald.hunter@gmail.com
Signed-off-by: Jakub Kicinski <kuba@kernel.org>
Documentation/netlink/specs/dpll.yaml
tools/net/ynl/ynl-gen-rst.py

index 95b0eb1486bf7edd30eefaef0b4a61e6f2482d7b..94132d30e0e03506bb287918a9a6a2ac3b682a94 100644 (file)
@@ -479,6 +479,7 @@ operations:
       name: pin-get
       doc: |
         Get list of pins and its attributes.
+
         - dump request without any attributes given - list all the pins in the
           system
         - dump request with target dpll - list all the pins registered with
index 5c7465d6befa022f3c281b17737e942e764ed0f1..1096a71d7867a4c1929c45bcc787e3479e32cee0 100755 (executable)
@@ -178,7 +178,7 @@ def parse_operations(operations: List[Dict[str, Any]], namespace: str) -> str:
 
     for operation in operations:
         lines.append(rst_section(namespace, 'operation', operation["name"]))
-        lines.append(rst_paragraph(sanitize(operation["doc"])) + "\n")
+        lines.append(rst_paragraph(operation["doc"]) + "\n")
 
         for key in operation.keys():
             if key in preprocessed: