From 0fcba15d57430e8ebfd2091463e12dfa9882cbef Mon Sep 17 00:00:00 2001 From: pukkandan Date: Mon, 20 Dec 2021 18:43:33 +0530 Subject: [PATCH] [docs] Fix bug in regex escape in python 3.6 Bug in ec2e44fc5752ca15fb7ce2e31994453226507f8b Closes #2060 --- devscripts/prepare_manpage.py | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/devscripts/prepare_manpage.py b/devscripts/prepare_manpage.py index b4446a3688..069d99eeb4 100644 --- a/devscripts/prepare_manpage.py +++ b/devscripts/prepare_manpage.py @@ -53,7 +53,8 @@ def filter_excluded_sections(readme): def move_sections(readme): MOVE_TAG_TEMPLATE = '' - sections = re.findall(rf'(?m)^{re.escape(MOVE_TAG_TEMPLATE) % "(.+)"}$', readme) + sections = re.findall(r'(?m)^%s$' % ( + re.escape(MOVE_TAG_TEMPLATE).replace(r'\%', '%') % '(.+)'), readme) for section_name in sections: move_tag = MOVE_TAG_TEMPLATE % section_name