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
3 changes: 2 additions & 1 deletion source/virtualBuffers/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -57,7 +57,8 @@ class VBufStorage_findMatch_word(str):
# Symbols that must be escaped for a regular expression.
FINDBYATTRIBS_ESCAPE_TABLE.update({(ord(s), u"\\" + s) for s in u"^$.*+?()[]{}|"})
def _prepareForFindByAttributes(attribs):
escape = lambda text: text.translate(FINDBYATTRIBS_ESCAPE_TABLE)
# A lambda that coerces a value to a string and escapes characters suitable for a regular expression.
escape = lambda val: str(val).translate(FINDBYATTRIBS_ESCAPE_TABLE)
reqAttrs = []
regexp = []
if isinstance(attribs, dict):
Expand Down