Browse Source

[docs] Fix bug in regex escape in python 3.6
Bug in ec2e44fc5752ca15fb7ce2e31994453226507f8b
Closes #2060

pukkandan 3 years ago
parent
commit
0fcba15d57
1 changed files with 2 additions and 1 deletions
  1. 2 1
      devscripts/prepare_manpage.py

+ 2 - 1
devscripts/prepare_manpage.py

@@ -53,7 +53,8 @@ def filter_excluded_sections(readme):
 
 def move_sections(readme):
     MOVE_TAG_TEMPLATE = '<!-- MANPAGE: MOVE "%s" SECTION HERE -->'
-    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