Commit 19497edb authored by Steve Borho's avatar Steve Borho
Browse files

grep: fix whole-word searching

rb string prefix for a raw byte string literal

--HG--
branch : stable
parent 52c25aba3764
Pipeline #21235 failed with stage
in 22 minutes and 48 seconds
......@@ -331,7 +331,7 @@ class SearchWidget(QWidget, qtlib.TaskWidget):
regexp = re.compile(pattern, icase and re.I or 0)
if self.wholeword.isChecked():
# re-compile with whole-word wrapping, we know pattern is safe
pattern = r'\b(?:%s)\b' % pattern
pattern = br'\b(?:%s)\b' % pattern
regexp = re.compile(pattern, icase and re.I or 0)
except Exception as inst:
msg = _('grep: invalid match pattern: %s\n') % \
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment