From 032a7301de1363244257eacbb195a4e5ba7cca1f Mon Sep 17 00:00:00 2001 From: Maarten van Gompel Date: Thu, 1 Jul 2021 14:43:49 +0200 Subject: [PATCH] ensure corrections get assigned the right processor (proycon/flat#170) --- folia/fql.py | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/folia/fql.py b/folia/fql.py index dceb8bb..de3a9a0 100644 --- a/folia/fql.py +++ b/folia/fql.py @@ -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' @@ -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))