compose2nix icon indicating copy to clipboard operation
compose2nix copied to clipboard

Enable escaping special Nix chars in template

Open bLuka opened this issue 9 months ago • 0 comments

Fix an issue where special characters were not properly escaped in template, leading to Nix parsing errors.

Tests have been checked and pass. Test data has been written from the real world problem I faced using Dovecot's labels containing shell scripts.

I went to simplicity by only escaping dollars and quotes, using strings.ReplaceAll. I’m not sure I don’t forget other relevant chars for the Nix syntax.

bLuka avatar May 05 '24 02:05 bLuka