Skip to content

Commit

Permalink
Use Jinja for templating (#892)
Browse files Browse the repository at this point in the history
  • Loading branch information
jaimergp authored Nov 18, 2024
1 parent 7e76543 commit d4ac85f
Show file tree
Hide file tree
Showing 21 changed files with 496 additions and 679 deletions.
4 changes: 2 additions & 2 deletions constructor/construct.py
Original file line number Diff line number Diff line change
Expand Up @@ -748,10 +748,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

0 comments on commit d4ac85f

Please sign in to comment.