Skip to content
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 4 additions & 0 deletions src/etc/htmldocck.py
Original file line number Diff line number Diff line change
Expand Up @@ -564,10 +564,14 @@ def check_command(c, cache):
# hasraw/matchesraw <path> <pat> = string test
elif len(c.args) == 2 and "raw" in c.cmd:
cerr = "`PATTERN` did not match"
if c.negated:
cerr = "`PATTERN` unexpectedly matched"
ret = check_string(cache.get_file(c.args[0]), c.args[1], regexp)
# 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"
if c.negated:
cerr = "`XPATH PATTERN` unexpectedly matched"
ret = get_nb_matching_elements(cache, c, regexp, True) != 0
else:
raise InvalidCheck("Invalid number of {} arguments".format(c.cmd))
Expand Down
Loading