Skip to content
Snippets Groups Projects
Commit 38642389 authored by Cyril Moineau's avatar Cyril Moineau
Browse files

Jinja rendering keep_trailing_newline=True

parent 676ebaa1
No related branches found
No related tags found
3 merge requests!279v0.4.0,!253v0.4.0,!163Export refactor
...@@ -40,7 +40,7 @@ def generate_str(template_path: Union[Path, str], **kwargs) -> str: ...@@ -40,7 +40,7 @@ def generate_str(template_path: Union[Path, str], **kwargs) -> str:
if isinstance(template_path, str): if isinstance(template_path, str):
template_path = Path(template_path) template_path = Path(template_path)
return Environment(loader=FileSystemLoader( return Environment(loader=FileSystemLoader(
template_path.parent), undefined=StrictUndefined).get_template(template_path.name).render(kwargs) template_path.parent), undefined=StrictUndefined, keep_trailing_newline=True).get_template(template_path.name).render(kwargs)
def copy_file(filename, dst_folder): def copy_file(filename, dst_folder):
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment