mirror of
https://github.com/kiddin9/op-packages.git
synced 2026-10-31 15:35:13 +08:00
🐤 Sync 2026-08-24 23:23:52
This commit is contained in:
1 parent
73568a624f
commit
1391687e01
82 files changed
+5971
-5537
No files matched your search
@@ -1280,13 +1280,14 @@ const ansiToHtml = function(text) {
|
||||
// Escape HTML special characters
|
||||
const escapeHtml = (str) => {
|
||||
const map = {
|
||||
' ': ' ',
|
||||
'&': '&',
|
||||
'<': '<',
|
||||
'>': '>',
|
||||
'"': '"',
|
||||
"'": '''
|
||||
};
|
||||
return str.replace(/[&<>"']/g, m => map[m]);
|
||||
return str.replace(/[&<>"' ]/g, m => map[m]);
|
||||
};
|
||||
|
||||
// Split by ANSI escape sequences and process
|
||||
|
||||
Reference in new issue
Block a user