Skip to content
This repository was archived by the owner on Jun 27, 2018. It is now read-only.

Commit d823f81

Browse files
committed
Merge pull request #206 from birkenfeld/master
Fix for new escape sequences in nightly compiler.
2 parents 9777ef5 + 756f6a5 commit d823f81

File tree

1 file changed

+4
-2
lines changed

1 file changed

+4
-2
lines changed

static/web.js

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -543,11 +543,13 @@
543543
return text.replace(/&/g, '&')
544544
.replace(/</g, '&lt;')
545545
.replace(/>/g, '&gt;')
546-
.replace(/\x1b\[3([0-7])m([^\x1b]*)(?:\x1b\(B)?\x1b\[0?m/g, function(original, colorCode, text) {
546+
.replace(/\x1b\[1m\x1b\[3([0-7])m([^\x1b]*)(?:\x1b\(B)?\x1b\[0?m/g, function(original, colorCode, text) {
547+
return '<span class=ansi-' + COLOR_CODES[+colorCode] + '><strong>' + text + '</strong></span>';
548+
}).replace(/\x1b\[3([0-7])m([^\x1b]*)(?:\x1b\(B)?\x1b\[0?m/g, function(original, colorCode, text) {
547549
return '<span class=ansi-' + COLOR_CODES[+colorCode] + '>' + text + '</span>';
548550
}).replace(/\x1b\[1m([^\x1b]*)(?:\x1b\(B)?\x1b\[0?m/g, function(original, text) {
549551
return "<strong>" + text + "</strong>";
550-
});
552+
}).replace(/(?:\x1b\(B)?\x1b\[0m/g, '');
551553
}
552554

553555
//This affects how mouse acts on the program output.

0 commit comments

Comments
 (0)