Fixes #1959202 [Column icons and stored templates](https://bugs.launchpad.net/calibre/+bug/1959202)
This commit is contained in:
Kovid Goyal 2022-01-27 19:22:46 +05:30
commit 2f07353be9
No known key found for this signature in database
GPG Key ID: 06BC317B515ACE7C

View File

@ -523,7 +523,7 @@ class _Parser:
if not text.startswith('program:'): if not text.startswith('program:'):
self.error(_("A stored template must begin with '{0}'").format('program:')) self.error(_("A stored template must begin with '{0}'").format('program:'))
text = text[len('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.parent.lex_scanner.scan(text))
self.funcs[name].cached_parse_tree = subprog self.funcs[name].cached_parse_tree = subprog
return CallNode(self.line_number, name, subprog, arguments) return CallNode(self.line_number, name, subprog, arguments)