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

Method extractPreview

MCP/server.js:764–778  ·  view source on GitHub ↗
(body, maxLength = 200)

Source from the content-addressed store, hash-verified

762 }
763
764 extractPreview(body, maxLength = 200) {
765 if (!body) return 'No preview available';
766
767 // Remove markdown formatting for preview
768 const cleanText = body
769 .replace(/```[\s\S]*?```/g, '[code block]')
770 .replace(/`([^`]+)`/g, '$1')
771 .replace(/[#*_~]/g, '')
772 .replace(/\[([^\]]+)\]\([^)]+\)/g, '$1')
773 .trim();
774
775 return cleanText.length > maxLength
776 ? cleanText.substring(0, maxLength) + '...'
777 : cleanText;
778 }
779
780 async run() {
781 debugLog('🚀 Starting MCP Server transport...');

Callers 2

searchCssTechniquesMethod · 0.95
getRandomCssTipMethod · 0.95

Calls

no outgoing calls

Tested by

no test coverage detected