From dd2a076b6f18e906bb985079349e3967264f0f1e Mon Sep 17 00:00:00 2001 From: Jim Miller Date: Sun, 2 Apr 2023 19:06:54 -0500 Subject: [PATCH] Add static include_in_* when double quoted. --- fanficfare/story.py | 20 ++++++++++++-------- 1 file changed, 12 insertions(+), 8 deletions(-) diff --git a/fanficfare/story.py b/fanficfare/story.py index cf971417..359c5f17 100644 --- a/fanficfare/story.py +++ b/fanficfare/story.py @@ -1199,14 +1199,18 @@ class Story(Requestable): # includelist prevents infinite recursion of include_in_'s if self.hasConfig("include_in_"+listname) and listname not in includelist: for k in self.getConfigList("include_in_"+listname): - ldorepl = doreplacements - if k.endswith('.NOREPL'): - k = k[:-len('.NOREPL')] - ldorepl = False - retlist.extend(self.getList(k,removeallentities=False, - doreplacements=ldorepl,includelist=includelist+[listname], - skip_cache=True, - seen_list=seen_list)) + ## allow for static string includes when double quoted "" + if k.startswith('"') and k.endswith('"'): + retlist.append(k[1:-1]) + else: + ldorepl = doreplacements + if k.endswith('.NOREPL'): + k = k[:-len('.NOREPL')] + ldorepl = False + retlist.extend(self.getList(k,removeallentities=False, + doreplacements=ldorepl,includelist=includelist+[listname], + skip_cache=True, + seen_list=seen_list)) else: if not self.isList(listname):