samuelcolvin / jinjahtml-vscode

Syntax highlighting for jinja(2) html templates in vscode
https://marketplace.visualstudio.com/items?itemName=samuelcolvin.jinjahtml
MIT License
135 stars 53 forks source link

Better Jinja removing empty last line #130

Open datawookie opened 1 year ago

datawookie commented 1 year ago

Hi!

I've been using Better Jinja (currently on the 2023-01-23 version) for a few months now. It does a great job of syntax highlighting in my templates.

However, it also seems that it remove an empty line at the end of templates. This is a problem since I'm using pre-commit with the end-of-file-fixer filter, which insists that there is an empty line at the end of all files.

Is it possible to set an option so that Better Jinja doesn't remove the last line?

Thanks, Andrew.

robert-sjoblom commented 1 year ago

I would also like this. As it is I have to manually fix all jinja template files.

samuelcolvin commented 1 year ago

Pr welcome to fix this.