From b18f8895733772fe83583f3d3236133447d05a43 Mon Sep 17 00:00:00 2001 From: janim007 Date: Thu, 5 Aug 2021 15:23:44 -0700 Subject: [PATCH] always return --- jsonpath_ng/ext/string.py | 5 +---- 1 file changed, 1 insertion(+), 4 deletions(-) diff --git a/jsonpath_ng/ext/string.py b/jsonpath_ng/ext/string.py index 80ed890..efce289 100644 --- a/jsonpath_ng/ext/string.py +++ b/jsonpath_ng/ext/string.py @@ -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)