diff options
| author | Noah Lev <camelidcamel@gmail.com> | 2022-08-11 11:09:48 -0400 | 
|---|---|---|
| committer | Noah Lev <camelidcamel@gmail.com> | 2022-08-13 00:37:14 -0400 | 
| commit | 9db6061d64fbec7470f4e4419d16c47fe9aeb322 (patch) | |
| tree | 916bd8c4297d8d78ffb75992daaff9957058ee6e /src/etc/htmldocck.py | |
| parent | 13d53273f81142cbea70e63730f0adc199723153 (diff) | |
| download | rust-9db6061d64fbec7470f4e4419d16c47fe9aeb322.tar.gz rust-9db6061d64fbec7470f4e4419d16c47fe9aeb322.zip | |
Fix line lengths
Diffstat (limited to 'src/etc/htmldocck.py')
| -rw-r--r-- | src/etc/htmldocck.py | 10 | 
1 files changed, 7 insertions, 3 deletions
| diff --git a/src/etc/htmldocck.py b/src/etc/htmldocck.py index e0cd089ac5e..baf95627c70 100644 --- a/src/etc/htmldocck.py +++ b/src/etc/htmldocck.py @@ -544,17 +544,21 @@ def check_command(c, cache): cerr = "" if c.cmd in ['has', 'hasraw', 'matches', 'matchesraw']: # string test regexp = c.cmd.startswith('matches') - if len(c.args) == 1 and not regexp and 'raw' not in c.cmd: # @has <path> = file existence + + # @has <path> = file existence + if len(c.args) == 1 and not regexp and 'raw' not in c.cmd: try: cache.get_file(c.args[0]) ret = True except FailedCheck as err: cerr = str(err) ret = False - elif len(c.args) == 2 and 'raw' in c.cmd: # @hasraw/matchesraw <path> <pat> = string test + # @hasraw/matchesraw <path> <pat> = string test + elif len(c.args) == 2 and 'raw' in c.cmd: cerr = "`PATTERN` did not match" ret = check_string(cache.get_file(c.args[0]), c.args[1], regexp) - elif len(c.args) == 3 and 'raw' not in c.cmd: # @has/matches <path> <pat> <match> = XML tree test + # @has/matches <path> <pat> <match> = XML tree test + elif len(c.args) == 3 and 'raw' not in c.cmd: cerr = "`XPATH PATTERN` did not match" ret = get_nb_matching_elements(cache, c, regexp, True) != 0 else: | 
