remy/nodemon — pull request #221 by pauloadaoag (2013-11-08 11:31:05+00:00)
Title: Removed /r and /n from nodemonignore lines

Fixed bug in windows wherein lines in nodemonignore with comments are not processed correctly.

if my nodemonignore looks like
/.git/
/public/ #public files
Then nodemon processes it correctly

However if my ignore file is
/public/ #public files
/.git/
The /public folder does not get ignore.

Found out that this is because when the files are split by '\n', on some systems .nodemonignore is saved with \r\n as the newline (sublime text does this). The remaining \r in the string causes the regex replaces in addIgnoreRule to fail.

I added another regex replace on \r and \n to fix this.