From 608356f9d2ffbeffbd65cb5a6297cefa8c73cc15 Mon Sep 17 00:00:00 2001 From: Patrick Johnston Date: Fri, 27 Apr 2018 15:00:11 -0400 Subject: [PATCH] Fixed: framing - reset graph context after recursing through named graphs. --- .gitignore | 1 + lib/pyld/jsonld.py | 2 ++ 2 files changed, 3 insertions(+) diff --git a/.gitignore b/.gitignore index 3f02bb3a..f0137049 100644 --- a/.gitignore +++ b/.gitignore @@ -11,3 +11,4 @@ cover dist docs/_build lib/PyLD.egg-info +.idea diff --git a/lib/pyld/jsonld.py b/lib/pyld/jsonld.py index 7b52785c..73b76da3 100755 --- a/lib/pyld/jsonld.py +++ b/lib/pyld/jsonld.py @@ -3458,6 +3458,8 @@ def _match_frame(self, state, subjects, frame, parent, property): # recurse into graph self._match_frame( state, sorted(state['graphMap'][id_].keys()), [subframe], output, '@graph') + #reset to current graph + state['graph'] = state['graphStack'].pop() # iterate over subject properties in order for prop, objects in sorted(subject.items()):