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

doc: netlink: Fix generated .rst for multi-line docs

Fix the newline replacement in ynl-gen-rst.py to put spaces between
concatenated lines. This fixes the broken doc string formatting.

See the dpll docs for an example of broken concatenation:

https://docs.kernel.org/6.9/networking/netlink_spec/dpll.html#lock-statusSigned-off-by: default avatarDonald Hunter <donald.hunter@gmail.com>
Link: https://lore.kernel.org/r/20240528140652.9445-2-donald.hunter@gmail.comSigned-off-by: default avatarJakub Kicinski <kuba@kernel.org>
parent 1e37449f
...@@ -49,7 +49,7 @@ def inline(text: str) -> str: ...@@ -49,7 +49,7 @@ def inline(text: str) -> str:
def sanitize(text: str) -> str: def sanitize(text: str) -> str:
"""Remove newlines and multiple spaces""" """Remove newlines and multiple spaces"""
# This is useful for some fields that are spread across multiple lines # This is useful for some fields that are spread across multiple lines
return str(text).replace("\n", "").strip() return str(text).replace("\n", " ").strip()
def rst_fields(key: str, value: str, level: int = 0) -> str: def rst_fields(key: str, value: str, level: int = 0) -> str:
......
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