jetzig-framework / zmpl

Zmpl is a templating language written in Zig
MIT License
103 stars 8 forks source link

Support windows CLRF new lines #5

Closed btipling closed 8 months ago

btipling commented 8 months ago

By ignoring \r on CLRF new lines.

I was going to create a test case but I saw all your test cases were instructive examples and a test for CLRF didn't make sense.

I pulled in your files directly in my project and I made this change in my version of your code. It's fine if this isn't the approach that works for this project, I thought I'd create a PR anyway. Really great library.

Unrelated but I noticed if I created a test.zmpl it will generate invalid zig code in the manifest.

Also I might patch this to clear out currently generated compiled.zig's for each build for those that weren't found?

Thanks so much for this great template library!

bobf commented 8 months ago

Hi, this looks good to me. I don't have a Windows machine to test on so any fixes for Windows compatibility are hugely appreciated. Thank you !