MCPcopy Create free account
hub / github.com/chokcoco/iCSS / extractPreview

Method extractPreview

MCP/debug-local.js:322–336  ·  view source on GitHub ↗
(body, maxLength = 200)

Source from the content-addressed store, hash-verified

320 }
321
322 extractPreview(body, maxLength = 200) {
323 if (!body) return 'No preview available';
324
325 const cleanText = body
326 .replace(/```[\s\S]*?```/g, '[code block]')
327 .replace(/`([^`]+)`/g, '$1')
328 .replace(/[#*_~]/g, '')
329 .replace(/\[([^\]]+)\]\([^)]+\)/g, '$1')
330 .replace(/\s+/g, ' ')
331 .trim();
332
333 return cleanText.length > maxLength
334 ? cleanText.substring(0, maxLength - 3) + '...'
335 : cleanText;
336 }
337
338 async run() {
339 debugLog('🚀 Starting debug server...');

Callers 1

searchCssTechniquesMethod · 0.95

Calls

no outgoing calls

Tested by

no test coverage detected