From: Donald Hunter <donald.hunter@gmail.com>
To: netdev@vger.kernel.org, Jakub Kicinski <kuba@kernel.org>,
"David S. Miller" <davem@davemloft.net>,
Eric Dumazet <edumazet@google.com>,
Paolo Abeni <pabeni@redhat.com>, Jiri Pirko <jiri@resnulli.us>,
Breno Leitao <leitao@debian.org>,
Arkadiusz Kubalewski <arkadiusz.kubalewski@intel.com>,
Vadim Fedorenko <vadim.fedorenko@linux.dev>
Cc: donald.hunter@redhat.com, Donald Hunter <donald.hunter@gmail.com>
Subject: [PATCH net-next v1 2/4] doc: netlink: Don't 'sanitize' op docstrings in generated .rst
Date: Tue, 28 May 2024 15:06:50 +0100 [thread overview]
Message-ID: <20240528140652.9445-3-donald.hunter@gmail.com> (raw)
In-Reply-To: <20240528140652.9445-1-donald.hunter@gmail.com>
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>
---
Documentation/netlink/specs/dpll.yaml | 1 +
tools/net/ynl/ynl-gen-rst.py | 2 +-
2 files changed, 2 insertions(+), 1 deletion(-)
diff --git a/Documentation/netlink/specs/dpll.yaml b/Documentation/netlink/specs/dpll.yaml
index 95b0eb1486bf..94132d30e0e0 100644
--- a/Documentation/netlink/specs/dpll.yaml
+++ b/Documentation/netlink/specs/dpll.yaml
@@ -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
diff --git a/tools/net/ynl/ynl-gen-rst.py b/tools/net/ynl/ynl-gen-rst.py
index 5c7465d6befa..1096a71d7867 100755
--- a/tools/net/ynl/ynl-gen-rst.py
+++ b/tools/net/ynl/ynl-gen-rst.py
@@ -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:
--
2.44.0
next prev parent reply other threads:[~2024-05-28 14:07 UTC|newest]
Thread overview: 12+ messages / expand[flat|nested] mbox.gz Atom feed top
2024-05-28 14:06 [PATCH net-next v1 0/4] doc: netlink: Fixes for ynl doc generator Donald Hunter
2024-05-28 14:06 ` [PATCH net-next v1 1/4] doc: netlink: Fix generated .rst for multi-line docs Donald Hunter
2024-05-28 14:35 ` Breno Leitao
2024-05-28 14:06 ` Donald Hunter [this message]
2024-05-30 1:04 ` [PATCH net-next v1 2/4] doc: netlink: Don't 'sanitize' op docstrings in generated .rst Jakub Kicinski
2024-05-28 14:06 ` [PATCH net-next v1 3/4] doc: netlink: Fix formatting of op flags " Donald Hunter
2024-05-28 14:27 ` Breno Leitao
2024-05-28 14:06 ` [PATCH net-next v1 4/4] doc: netlink: Fix op pre and post fields " Donald Hunter
2024-05-28 14:25 ` Breno Leitao
2024-05-30 1:10 ` Jakub Kicinski
2024-05-30 10:42 ` Donald Hunter
2024-05-30 2:00 ` [PATCH net-next v1 0/4] doc: netlink: Fixes for ynl doc generator patchwork-bot+netdevbpf
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20240528140652.9445-3-donald.hunter@gmail.com \
--to=donald.hunter@gmail.com \
--cc=arkadiusz.kubalewski@intel.com \
--cc=davem@davemloft.net \
--cc=donald.hunter@redhat.com \
--cc=edumazet@google.com \
--cc=jiri@resnulli.us \
--cc=kuba@kernel.org \
--cc=leitao@debian.org \
--cc=netdev@vger.kernel.org \
--cc=pabeni@redhat.com \
--cc=vadim.fedorenko@linux.dev \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).