We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent 9b51015 commit f6a8c35Copy full SHA for f6a8c35
Contents/Resources/js/jlatt.js
@@ -1,20 +1,20 @@
1
(function() {
2
- var NOTICE_REGEX = /^\(notice\) '/;
+ var NOTICE_REGEX = /^\(notice\)\s*/;
3
var HTML_SENDER_REGEX = /^(GitHub|Jenkins|Heroku|Pivotal)$/;
4
5
$('#Chat').on('DOMNodeInserted', '.line:not(.html-fixed)', function(e) {
6
var $line = $(this).addClass('html-fixed');
7
var $text = $line.find('.text');
8
- var message = $text.text();
9
+ var message = $text.html();
10
if (NOTICE_REGEX.test(message)) {
11
- message = message.replace(NOTICE_REGEX, '');
+ $text.html(message.replace(NOTICE_REGEX, ''));
12
$line.addClass('notice');
13
}
14
15
var sender = $line.find('.sender .name').text();
16
if (HTML_SENDER_REGEX.test(sender)) {
17
- $text.html(message);
+ $text.html($text.text());
18
19
});
20
}).call(this);
0 commit comments