MCPcopy Create free account
hub / github.com/colbymchenry/codegraph / inlineCode

Function inlineCode

src/mcp/explore-one-symbol.ts:172–177  ·  view source on GitHub ↗

`text` as inline code, whatever backticks it holds.

(text: string)

Source from the content-addressed store, hash-verified

170
171/** `text` as inline code, whatever backticks it holds. */
172function inlineCode(text: string): string {
173 const longest = Math.max(0, ...[...text.matchAll(/`+/g)].map((m) => m[0].length));
174 const fence = '`'.repeat(longest + 1);
175 const pad = text.startsWith('`') || text.endsWith('`') ? ' ' : '';
176 return `${fence}${pad}${text}${pad}${fence}`;
177}
178
179const MAX_SITE_TEXT = 160;
180

Callers 3

siteLineFunction · 0.85
renderUnlinkedFunction · 0.85
definitionSourceFunction · 0.85

Calls 1

mapMethod · 0.80

Tested by

no test coverage detected