aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--hipchat-stfu.pl6
-rwxr-xr-xtest.pl4
2 files changed, 8 insertions, 2 deletions
diff --git a/hipchat-stfu.pl b/hipchat-stfu.pl
index 22c288c..1695ca0 100644
--- a/hipchat-stfu.pl
+++ b/hipchat-stfu.pl
@@ -27,6 +27,12 @@ sub prettify_hipchat {
# Trim whitespace between words
$input =~ s/(\s| ){2,}/ /g;
+ # Remove Priority
+ $input =~ s/Priority://g;
+
+ # Remove Status
+ $input =~ s/Status://g;
+
# Construct start message
if ($link) {
$input =~ s/Created by (.+)$/($1) ($link)/g;
diff --git a/test.pl b/test.pl
index 1e0a2a3..c596e8c 100755
--- a/test.pl
+++ b/test.pl
@@ -15,11 +15,11 @@ is(prettify_hipchat('<span style="color: dimgrey;">Type:</span>  <img src="http
'Type: Bug',
'Type');
is(prettify_hipchat(' <span style="color: dimgrey;">Priority:</span>  <img src="http://pixshark.com/white-box-icon.htm" height="16" width="16" />'),
- 'Priority:',
+ '',
'Priority label');
is(prettify_hipchat(' Not prioritized  '), 'Not prioritized', 'Priority tag body');
is(prettify_hipchat('<span style="color: dimgrey;">Status:</span>  '),
- 'Status:',
+ '',
'Status label');
is(prettify_hipchat(' <span class="aui-lozenge aui-lozenge-complete">'),
'',