MCPcopy Index your code
hub / github.com/codeaashu/claude-code / tryJsonFormatContent

Function tryJsonFormatContent

src/components/shell/OutputLine.tsx:33–39  ·  view source on GitHub ↗
(content: string)

Source from the content-addressed store, hash-verified

31}
32const MAX_JSON_FORMAT_LENGTH = 10_000;
33export function tryJsonFormatContent(content: string): string {
34 if (content.length > MAX_JSON_FORMAT_LENGTH) {
35 return content;
36 }
37 const allLines = content.split('\n');
38 return allLines.map(tryFormatJson).join('\n');
39}
40
41// Match http(s) URLs inside JSON string values. Conservative: no quotes,
42// no whitespace, no trailing comma/brace that'd be JSON structure.

Callers 1

OutputLineFunction · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected