Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Use Jinja for templating #892

Merged
merged 15 commits into from
Nov 18, 2024
Merged
4 changes: 2 additions & 2 deletions constructor/construct.py
Original file line number Diff line number Diff line change
Expand Up @@ -746,10 +746,10 @@ def yamlize(data, directory, content_filter):
if ('{{' not in data) and ('{%' not in data):
raise UnableToParse(original=e)
try:
from constructor.jinja import render_jinja
from constructor.jinja import render_jinja_for_input_file
except ImportError as ex:
raise UnableToParseMissingJinja2(original=ex)
data = render_jinja(data, directory, content_filter)
data = render_jinja_for_input_file(data, directory, content_filter)
return yaml.load(data)


Expand Down
Loading
Loading