dagolden / Path-Tiny

File path utility
41 stars 59 forks source link

Use \z to match end of string instead of $ #232

Closed Grinnz closed 4 years ago

Grinnz commented 4 years ago

All of the instances of using $ to match end of string appear to be cases where a trailing newline should not be allowed, which $ allows. Either they are meant to match the end of a filename (e.g. for trailing slashes) where a trailing newline would actually mean it's not the end of a filename since newlines are valid in filenames; or it's already explicitly matching a CR/LF so has no reason to allow an additional LF. Each instance replaced with \z which only matches the end of the string.

coveralls commented 4 years ago

Coverage Status

Coverage increased (+1.8%) to 93.085% when pulling 0efe5c23a3f35e11119b275318b1690f7a86bfa5 on Grinnz:regex_end_of_string into 8f396aa8532ed6b017bea709016bd9e1dbe9a2a7 on dagolden:master.

xdg commented 4 years ago

Uploaded Path-Tiny-0.113-TRIAL.tar.gz

xdg commented 4 years ago

Thanks!