pre-commit: use POSIX regular expression syntax
POSIX sed doesn't support the GNU extensions to regular expressions that GNU sed uses. Use POSIX RE syntax to support it.
While here, strip all trailing whitespace, not just the last bit.
POSIX sed doesn't support the GNU extensions to regular expressions that GNU sed uses. Use POSIX RE syntax to support it.
While here, strip all trailing whitespace, not just the last bit.