Skip to content

Commit 44bff42

Browse files
committed
fix for dennis ansi art
1 parent fbae01f commit 44bff42

File tree

1 file changed

+4
-1
lines changed

1 file changed

+4
-1
lines changed

js/unix_formatting.js

+4-1
Original file line numberDiff line numberDiff line change
@@ -1233,6 +1233,9 @@
12331233
// ---------------------------------------------------------------------
12341234
function format_text(data) {
12351235
var text = data.text;
1236+
if (!data.formatting.length) {
1237+
return text;
1238+
}
12361239
var result = '';
12371240
var last_pos = 0;
12381241
var open_formats = [];
@@ -1259,7 +1262,7 @@
12591262

12601263
result += text.slice(last_pos);
12611264

1262-
return result;
1265+
return result.replace(/\\]/g, '\]');
12631266
}
12641267
// ---------------------------------------------------------------------
12651268
// :: Replace ANSI formatting with terminal formatting

0 commit comments

Comments
 (0)