diff options
author | George Edward Bulmer <gebulmer@googlemail.com> | 2017-12-11 23:06:52 +0000 |
---|---|---|
committer | George Edward Bulmer <gebulmer@googlemail.com> | 2017-12-11 23:06:52 +0000 |
commit | f74832328f23fa71e73067e086887bb14cf0ae65 (patch) | |
tree | 6922bcda9a7080e07e9a758a591f17c3828834f0 /scripts/asciidoc2html.py | |
parent | 747a9bc5b6dfc566c02e4616e5a3002dbe42a95f (diff) | |
download | qutebrowser-f74832328f23fa71e73067e086887bb14cf0ae65.tar.gz qutebrowser-f74832328f23fa71e73067e086887bb14cf0ae65.zip |
Modify re.match usage in scripts directory.
Diffstat (limited to 'scripts/asciidoc2html.py')
-rwxr-xr-x | scripts/asciidoc2html.py | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/scripts/asciidoc2html.py b/scripts/asciidoc2html.py index ce29becc0..bd51b27ef 100755 --- a/scripts/asciidoc2html.py +++ b/scripts/asciidoc2html.py @@ -154,17 +154,17 @@ class AsciiDoc: hidden = False elif line == "The Compiler <mail@qutebrowser.org>\n": continue - elif re.match(r'^:\w+:.*', line): + elif re.fullmatch(r':\w+:.*', line): # asciidoc field continue if not found_title: - if re.match(r'^=+$', line): + if re.fullmatch(r'=+', line): line = line.replace('=', '-') found_title = True title = last_line.rstrip('\n') + " | qutebrowser\n" title += "=" * (len(title) - 1) - elif re.match(r'^= .+', line): + elif re.fullmatch(r'= .+', line): line = '==' + line[1:] found_title = True title = last_line.rstrip('\n') + " | qutebrowser\n" |