Skip to content

Commit

Permalink
ensure corrections get assigned the right processor (proycon/flat#170)
Browse files Browse the repository at this point in the history
  • Loading branch information
proycon committed Jul 1, 2021
1 parent 2014b35 commit 032a730
Showing 1 changed file with 4 additions and 1 deletion.
5 changes: 4 additions & 1 deletion folia/fql.py
Original file line number Diff line number Diff line change
Expand Up @@ -1046,7 +1046,6 @@ def __call__(self, query, action, focus, target,debug=False):

isspan = isinstance(action.focus.Class, folia.AbstractSpanAnnotation)


actionassignments = {} #make a copy
for key, value in action.assignments.items():
if key == 'class': key = 'cls'
Expand Down Expand Up @@ -1088,6 +1087,10 @@ def __call__(self, query, action, focus, target,debug=False):
else:
correction = False

if query.doc.processor and 'processor' not in action.assignments:
action.assignments['processor'] = query.doc.processor
kwargs['processor'] = query.doc.processor

inheritchildren = []
if focus and not self.bare: #copy all data within
inheritchildren = list(focus.copychildren(query.doc, True))
Expand Down

0 comments on commit 032a730

Please sign in to comment.