MCPcopy Create free account
hub / github.com/TeleBoxOrg/TeleBox_Plugins / htmlEscape

Function htmlEscape

git_PR/git_PR.ts:11–18  ·  view source on GitHub ↗
(text: string)

Source from the content-addressed store, hash-verified

9
10import { htmlEscape } from "@utils/htmlEscape";
11
12// HTML转义函数
13// Telegram 长消息处理
14const MAX_MESSAGE_LENGTH = 4096;
15function splitMessage(text: string): string[] {
16 if ((text || "").length <= MAX_MESSAGE_LENGTH) return [text];
17 const parts: string[] = [];
18 let current = "";
19 for (const line of (text || "").split("\n")) {
20 if ((current + (current ? "\n" : "") + line).length > MAX_MESSAGE_LENGTH) {
21 parts.push(current);

Callers 5

GitManagerPluginClass · 0.70
handleReposMethod · 0.70
handlePRsMethod · 0.70
handleMergeMethod · 0.70
handleMergeAllMethod · 0.70

Calls

no outgoing calls

Tested by

no test coverage detected