aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorTeddy Wing2015-06-14 02:46:33 -0400
committerTeddy Wing2015-06-14 02:46:33 -0400
commit291435bb1da4f9bb043f7d134a998ad067655a4f (patch)
treeee37a06662355a9929fef50fef7a913548587ea4
parentd6f76b336715ca0fc9a11b2d2bd26500918a0e9f (diff)
downloadirssi-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.pl2
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;
};