compose2nix
compose2nix copied to clipboard
Enable escaping special Nix chars in template
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.