summaryrefslogtreecommitdiff
path: root/yarns/lib.py
diff options
context:
space:
mode:
authorLars Wirzenius <liw@liw.fi>2019-03-10 15:18:13 +0200
committerLars Wirzenius <liw@liw.fi>2019-03-10 15:18:13 +0200
commitae85e66e58f09af0161005c2d49f9161f9baf6a7 (patch)
tree3b2e8fecc6aebb52589d13b737ba602222e1203f /yarns/lib.py
parent654f088bab35aff16cd999a5744b8f045e2cc49b (diff)
downloadeffi-reg-ae85e66e58f09af0161005c2d49f9161f9baf6a7.tar.gz
Add: /search to effiapi
Diffstat (limited to 'yarns/lib.py')
-rw-r--r--yarns/lib.py6
1 files changed, 6 insertions, 0 deletions
diff --git a/yarns/lib.py b/yarns/lib.py
index 2e76b88..6fa8843 100644
--- a/yarns/lib.py
+++ b/yarns/lib.py
@@ -151,6 +151,12 @@ def get_expanded_match():
return expand(match, V)
+def get_expanded_json_match():
+ match = get_next_match()
+ expanded = expand(match, V)
+ return json.loads(expanded)
+
+
def expand(text, variables):
result = ''
while text: