From cb00d2c5669254c40492198f3902f1b4d0ac79fd Mon Sep 17 00:00:00 2001 From: Richard van der Hoff <1389908+richvdh@users.noreply.github.com> Date: Thu, 8 May 2025 10:28:01 +0100 Subject: [PATCH] Apply suggestions from code review --- scripts/dump-openapi.py | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/scripts/dump-openapi.py b/scripts/dump-openapi.py index c064c2bd..49ad9147 100755 --- a/scripts/dump-openapi.py +++ b/scripts/dump-openapi.py @@ -45,7 +45,8 @@ api_dir = os.path.join(os.path.dirname(scripts_dir), "data", "api") # # With: # -# * : any word character and `-` and `/`. +# * : any word character and `-` and `/`. `re.ASCII` is used to only match +# ASCII characters in the name. # * : any character except `}`, must not start or end with a # whitespace. shortcode_regex = re.compile(r"""\{\{\% # {{% @@ -83,6 +84,8 @@ def replace_shortcode(shortcode): * boxes/note, boxes/rationale, boxes/warning * added-in, changed-in + + All closing tags (`{{ /shortcode }}`) are replaced with the empty string. """ if shortcode['name'].startswith("/"):