toddbluhm / env-cmd

Setting environment variables from a file
https://www.npmjs.com/package/env-cmd
MIT License
1.73k stars 65 forks source link

Fix stripComments() #333

Open erlendfh opened 2 years ago

erlendfh commented 2 years ago

If you have a value containing a # followed at some point by a line containing only #\n, the wrong # will be removed by stripComments().

This PR both fixes this issue and simplifies stripComments().