mirror of
https://gitlab.freedesktop.org/NetworkManager/NetworkManager.git
synced 2026-02-03 16:00:34 +01:00
docs: simplify generating paragraphs in "generate-docs-nm-settings-docs-gir.py"
This commit is contained in:
parent
5d58792848
commit
8c17077289
1 changed files with 4 additions and 4 deletions
|
|
@ -203,7 +203,6 @@ def settings_sort_key(x):
|
|||
|
||||
def create_desc_docbook(desc_docbook, description):
|
||||
lines = re.split("\n", description)
|
||||
in_par = True
|
||||
|
||||
paragraph = ET.SubElement(
|
||||
desc_docbook,
|
||||
|
|
@ -211,10 +210,11 @@ def create_desc_docbook(desc_docbook, description):
|
|||
)
|
||||
|
||||
for l in lines:
|
||||
if l and in_par:
|
||||
paragraph.text = l
|
||||
else:
|
||||
if not l:
|
||||
# A blank line. This starts a new paragraph
|
||||
paragraph = ET.SubElement(desc_docbook, "para")
|
||||
continue
|
||||
paragraph.text = l
|
||||
|
||||
|
||||
def main(gir_path_str, output_path_str):
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue