This commit is contained in:
MeexReay 2025-03-21 21:16:04 +03:00
parent e4b3b17528
commit f7ce6cd869
2 changed files with 7 additions and 2 deletions

View File

@ -73,7 +73,12 @@ async function main(args) {
} else if (event.type == "char") { } else if (event.type == "char") {
if (mode == "normal") { if (mode == "normal") {
if (event.char == ":") { if (event.char == ":") {
console.log(status_length)
trimTerminal(status_length) trimTerminal(status_length)
console.log(getTerminal())
writeStdout(":") writeStdout(":")
let command = await readLine() let command = await readLine()

View File

@ -102,8 +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, '<span style="color: --$1">')
.replace(/\$#([A-Z_]+)/g, '$$$1') .replace(/\$#([A-Z_]+)--/g, '$$$1--')
.replace(/\$reset/g, '</span>') .replace(/\$reset/g, '</span>')
.replace(/\$#reset/g, '$reset'); .replace(/\$#reset/g, '$reset');
} }