We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 6b09751 commit 77dfe53Copy full SHA for 77dfe53
scripts/generators/asciidoc_fields.py
@@ -140,9 +140,14 @@ def save_asciidoc(f, text):
140
141
# jinja2 setup
142
143
-
+cur_dir = path.abspath(path.curdir)
144
local_dir = path.dirname(path.abspath(__file__))
145
-TEMPLATE_DIR = path.join(local_dir, '../templates')
+CUR_TEMPLATE_DIR = path.join(cur_dir, 'templates')
146
+LOCAL_TEMPLATE_DIR = path.join(local_dir, '../templates')
147
+if path.exists(CUR_TEMPLATE_DIR):
148
+ TEMPLATE_DIR=CUR_TEMPLATE_DIR
149
+elif path.exists(LOCAL_TEMPLATE_DIR):
150
+ TEMPLATE_DIR=LOCAL_TEMPLATE_DIR
151
template_loader = jinja2.FileSystemLoader(searchpath=TEMPLATE_DIR)
152
template_env = jinja2.Environment(loader=template_loader, keep_trailing_newline=True)
153
0 commit comments