fixed colors

This commit is contained in:
MeexReay 2025-03-21 17:34:11 +03:00
parent 4842b99002
commit cfa871b696

View File

@ -102,6 +102,8 @@ function stripColors(content) {
function convertColorCodes(input) { function convertColorCodes(input) {
return input.replace(/\$#([0-9a-fA-F]{6})/g, '<span style="color: #$1">') return input.replace(/\$#([0-9a-fA-F]{6})/g, '<span style="color: #$1">')
.replace(/\$##([0-9a-fA-F]{6})/g, '$#$1') .replace(/\$##([0-9a-fA-F]{6})/g, '$#$1')
.replace(/\$([A-Z_]+)/g, '<span style="color: --$1">')
.replace(/\$#([A-Z_]+)/g, '$$$1')
.replace(/\$reset/g, '</span>') .replace(/\$reset/g, '</span>')
.replace(/\$#reset/g, '$reset'); .replace(/\$#reset/g, '$reset');
} }