MCPcopy Create free account
hub / github.com/idosal/git-mcp / isBadgeLine

Function isBadgeLine

src/api/utils/vectorStore.ts:299–310  ·  view source on GitHub ↗
(line: string)

Source from the content-addressed store, hash-verified

297
298 // Helper function to detect badge lines (markdown image links with badge URLs)
299 function isBadgeLine(line: string): boolean {
300 // Detect badge-specific patterns (shield.io, badge URLs, image links in a row)
301 return (
302 /!\[.*\]\(.*badge.*\)/.test(line) ||
303 /!\[.*\]\(.*shield\.io.*\)/.test(line) ||
304 (/\[!\[.*\]\(.*\)\]\(.*\)/.test(line) &&
305 (line.includes("badge") || line.includes("shield"))) ||
306 /img\.shields\.io/.test(line) ||
307 (line.includes("<img") &&
308 (line.includes("badge") || line.includes("shield")))
309 );
310 }
311
312 // First pass: Extract headers and their content
313 const lines = text.split("\n");

Callers 1

chunkReadmeFunction · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected