fix strip colors

This commit is contained in:
MeexReay 2025-03-21 23:31:01 +03:00
parent b9522bdf47
commit ee80265097

View File

@ -100,8 +100,10 @@ function updateCursor() {
cursor.scrollIntoView({behavior: "smooth", inline: "end"}) cursor.scrollIntoView({behavior: "smooth", inline: "end"})
} }
function stripColors(content) { function stripColors(input) {
return stripHtml(convertColorCodes(content)) return input.replace(/\$#([0-9a-fA-F]{6})/g, "")
.replace(/\$([A-Z_]+)--/g, "")
.replace(/\$reset/g, "")
} }
function makeColorCodesPrintable(input) { function makeColorCodesPrintable(input) {