MCPcopy Create free account
hub / github.com/CreminiAI/skillpack / formatSlackMessage

Function formatSlackMessage

src/runtime/adapters/markdown.ts:91–108  ·  view source on GitHub ↗
(text: string)

Source from the content-addressed store, hash-verified

89}
90
91export function formatSlackMessage(text: string): string {
92 const unwrapped = unwrapMarkdownSourceBlocks(text);
93 const placeholders: string[] = [];
94 const withFenced = protect(
95 unwrapped,
96 FENCED_CODE_BLOCK_RE,
97 placeholders,
98 (block: string) => block,
99 );
100 const withInline = protect(
101 withFenced,
102 INLINE_CODE_RE,
103 placeholders,
104 (_match: string, code: string) => `\`${code}\``,
105 );
106
107 return restore(formatSlackInline(withInline), placeholders);
108}
109
110export function formatTelegramMessage(text: string): string {
111 const unwrapped = unwrapMarkdownSourceBlocks(text);

Callers 3

sendWithRetryMethod · 0.85
updateWithRetryMethod · 0.85

Calls 4

protectFunction · 0.85
restoreFunction · 0.85
formatSlackInlineFunction · 0.85

Tested by

no test coverage detected