(s = '')
| 455 | |
| 456 | // === 新:将 mainText 中的 [R]/[B]/[G]/[Y] 标签渲染为带颜色的高亮 === |
| 457 | function escapeHTMLBasic(s = '') { |
| 458 | return String(s) |
| 459 | .replace(/&/g, '&') |
| 460 | .replace(/</g, '<') |
| 461 | .replace(/>/g, '>'); |
| 462 | } |
| 463 | |
| 464 | function renderTextWithBracketTags(text = '') { |
| 465 | let s = String(text || '').replace(/\r\n/g, '\n'); |
no outgoing calls
no test coverage detected