From 2d11e12685ce76ee1616f9967a9205261fcf1238 Mon Sep 17 00:00:00 2001 From: Witold Filipczyk Date: Thu, 4 Apr 2024 15:42:21 +0200 Subject: [PATCH] [asciidoc] Fix syntax --- doc/tools/asciidoc/asciidoc.py | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) diff --git a/doc/tools/asciidoc/asciidoc.py b/doc/tools/asciidoc/asciidoc.py index f1e08fac..f7d79c43 100755 --- a/doc/tools/asciidoc/asciidoc.py +++ b/doc/tools/asciidoc/asciidoc.py @@ -467,7 +467,7 @@ def load_sections(sections, fname, dir=None, namepat=NAME_RE): if not os.path.isfile(fname): return lines = open(fname).readlines() - reo = re.compile(r'^\[(?P
'+namepat+')\]\s*$') + reo = re.compile(r'^\[(?P
'+namepat+r')\]\s*$') section,contents = '',[] for line in lines: if line and line[0] == '#': # Skip comment lines. @@ -1172,9 +1172,9 @@ class Document: return s = s.strip() mo = re.match(r'^(?P[^<>\s]+)' - '(\s+(?P[^<>\s]+))?' - '(\s+(?P[^<>\s]+))?' - '(\s+<(?P\S+)>)?$',s) + r'(\s+(?P[^<>\s]+))?' + r'(\s+(?P[^<>\s]+))?' + r'(\s+<(?P\S+)>)?$',s) if not mo: error('malformed author line') return @@ -1239,7 +1239,7 @@ class Header: if s: # Match RCS/CVS $Id$ marker format. mo = re.match(r'^\$Id: \S+ (?P\S+)' - ' (?P\S+) \S+ \S+ \S+ \$$',s) + r' (?P\S+) \S+ \S+ \S+ \$$',s) if not mo: # Match AsciiDoc revision,date format. mo = re.match(r'^\D*(?P.*?),(?P.+)$',s) @@ -2697,7 +2697,7 @@ class Tables(AbstractBlocks): + r'(\d*|' + re.escape(b.fillchar) + r'*)' \ + r')+' \ + re.escape(b.fillchar) + r'+' \ - + '([\d\.]*)$' + + r'([\d\.]*)$' delimiters.append(b.delimiter) if not b.headrow: b.headrow = b.bodyrow