(text: string)
| 86 | .replace(/&/g, "&") |
| 87 | .replace(/</g, "<") |
| 88 | .replace(/>/g, ">"); |
| 89 | |
| 90 | const escMd = (text: string): string => |
| 91 | text.replace(/([_*[\]()~`>#+\-=|{}.!\\])/g, "\\$1"); |
| 92 | |
| 93 | /* ===================== 各种格式渲染器 ===================== */ |
| 94 | |
| 95 | const Renderers: Record<Mode, (t: string) => string> = { |