Skip to content
Open
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
5 changes: 1 addition & 4 deletions jsonpath_ng/ext/string.py
Original file line number Diff line number Diff line change
Expand Up @@ -42,10 +42,7 @@ def __init__(self, method=None):
def find(self, datum):
datum = DatumInContext.wrap(datum)
value = self.regex.sub(self.repl, datum.value)
if value == datum.value:
return []
else:
return [DatumInContext.wrap(value)]
return [DatumInContext.wrap(value)]

def __eq__(self, other):
return (isinstance(other, Sub) and self.method == other.method)
Expand Down