diff options
| author | Teddy Wing | 2015-06-14 02:46:33 -0400 |
|---|---|---|
| committer | Teddy Wing | 2015-06-14 02:46:33 -0400 |
| commit | 291435bb1da4f9bb043f7d134a998ad067655a4f (patch) | |
| tree | ee37a06662355a9929fef50fef7a913548587ea4 | |
| parent | d6f76b336715ca0fc9a11b2d2bd26500918a0e9f (diff) | |
| download | irssi-hipchat-stfu-291435bb1da4f9bb043f7d134a998ad067655a4f.tar.bz2 | |
prettify_hipchat: Also match non-breaking spaces
Turns out the whitespace problem I was getting in
d6f76b336715ca0fc9a11b2d2bd26500918a0e9f was due to the fact that
HipChat sends non-breaking spaces in addition to regular spaces
(WTF?!!!?!!!), so those weren't getting trimmed.
Add non-breaking space characters to the regular expression so those get
whacked by our substitution matcher also.
| -rw-r--r-- | hipchat-stfu.pl | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/hipchat-stfu.pl b/hipchat-stfu.pl index 2e06d69..aa992a3 100644 --- a/hipchat-stfu.pl +++ b/hipchat-stfu.pl @@ -15,7 +15,7 @@ $VERSION = '1.00'; sub prettify_hipchat { my ($input) = @_; - $input =~ s/^\s+|\s+$//g; + $input =~ s/^(\s| )+|(\s| )+$//g; return $input; }; |
