From 7c2d6ae72b20180970f34a2c3179f77bb8075019 Mon Sep 17 00:00:00 2001 From: jonpas Date: Mon, 1 May 2023 17:15:48 +0200 Subject: [PATCH] Fix functions documentation header duplication --- docs/tools/document_functions.py | 19 ++++++++++--------- 1 file changed, 10 insertions(+), 9 deletions(-) diff --git a/docs/tools/document_functions.py b/docs/tools/document_functions.py index dc0e31b37a..cfa573553d 100644 --- a/docs/tools/document_functions.py +++ b/docs/tools/document_functions.py @@ -293,16 +293,17 @@ def document_functions(addons_dir, components): output = os.path.join(wiki_dir, component) + ".md" with open(output, "w", encoding="utf-8") as file: + file.writelines([ + "---\n", + "layout: wiki\n", + "title: {} Functions\n".format(component_name), + "description: List of functions in {} component.\n".format(component_name), + "group: functions\n", + "parent: wiki\n", + "---\n", + ]) + for function in components[component]: - file.writelines([ - "---\n", - "layout: wiki\n", - "title: {} Functions\n".format(component_name), - "description: List of functions in {} component.\n".format(component_name), - "group: functions\n", - "parent: wiki\n", - "---\n", - ]) file.write(function.document(component)) return errors