From 37d73caab855a4f5b4248efaaf04b1d4917b9039 Mon Sep 17 00:00:00 2001 From: Charles Haley Date: Thu, 27 Jan 2022 13:43:47 +0000 Subject: [PATCH] Bug #1959202: Column icons and stored templates --- src/calibre/utils/formatter.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/calibre/utils/formatter.py b/src/calibre/utils/formatter.py index 19cca6173d..83d62c0d8f 100644 --- a/src/calibre/utils/formatter.py +++ b/src/calibre/utils/formatter.py @@ -523,7 +523,7 @@ class _Parser: if not text.startswith('program:'): self.error(_("A stored template must begin with '{0}'").format('program:')) text = text[len('program:'):] - subprog = _Parser().program(self, self.funcs, + subprog = _Parser().program(self.parent, self.funcs, self.parent.lex_scanner.scan(text)) self.funcs[name].cached_parse_tree = subprog return CallNode(self.line_number, name, subprog, arguments)