Commit ebf90041 authored by Donald Hunter's avatar Donald Hunter Committed by Jakub Kicinski

doc: netlink: Don't 'sanitize' op docstrings in generated .rst

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-getSigned-off-by: default avatarDonald Hunter <donald.hunter@gmail.com>
Link: https://lore.kernel.org/r/20240528140652.9445-3-donald.hunter@gmail.comSigned-off-by: default avatarJakub Kicinski <kuba@kernel.org>
parent c697f515
...@@ -479,6 +479,7 @@ operations: ...@@ -479,6 +479,7 @@ operations:
name: pin-get name: pin-get
doc: | doc: |
Get list of pins and its attributes. Get list of pins and its attributes.
- dump request without any attributes given - list all the pins in the - dump request without any attributes given - list all the pins in the
system system
- dump request with target dpll - list all the pins registered with - dump request with target dpll - list all the pins registered with
......
...@@ -178,7 +178,7 @@ def parse_operations(operations: List[Dict[str, Any]], namespace: str) -> str: ...@@ -178,7 +178,7 @@ def parse_operations(operations: List[Dict[str, Any]], namespace: str) -> str:
for operation in operations: for operation in operations:
lines.append(rst_section(namespace, 'operation', operation["name"])) 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(): for key in operation.keys():
if key in preprocessed: if key in preprocessed:
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment