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

Function formatSlackInline

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

Source from the content-addressed store, hash-verified

47}
48
49function formatSlackInline(text: string): string {
50 let formatted = text;
51
52 formatted = formatted.replace(LINK_RE, (_, label: string, url: string) => {
53 return `<${url}|${label}>`;
54 });
55 formatted = formatted.replace(
56 /^(#{1,6})[ \t]+(.+)$/gm,
57 (_, __: string, content: string) => `*${content.trim()}*`,
58 );
59 formatted = formatted.replace(/\*\*([^*\n]+)\*\*/g, "*$1*");
60 formatted = formatted.replace(/__([^_\n]+)__/g, "*$1*");
61 formatted = formatted.replace(/^(?:-|\*) /gm, "• ");
62
63 return formatted;
64}
65
66function formatTelegramInline(text: string): string {
67 let formatted = escapeHtml(text);

Callers 1

formatSlackMessageFunction · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected