MCPcopy Create free account
hub / github.com/TheJoWo/Clean-Clode / cleanGitDiff

Function cleanGitDiff

script.js:505–524  ·  view source on GitHub ↗
(input)

Source from the content-addressed store, hash-verified

503 }
504
505 function cleanGitDiff(input) {
506 return input
507 .replace(/[│┃╏╎|▌]+/g, '')
508 .replace(/([^\n])\n(?!\s*(\d+\s*[+-]\s*|[\-*•●⏺▶▪◦]|\d+\.|[A-Z][a-z]|[📌🎯📋📖✨✅❌⭐🔥👉➡️]|^\s*$|$))/g, '$1 ')
509 .replace(/[ \t]+/g, ' ')
510 .split('\n')
511 .map(line => {
512 const trimmed = line.trim();
513 if (trimmed === '') {
514 return '';
515 }
516 if (/^\d+\s*[+-]/.test(trimmed)) {
517 return trimmed;
518 }
519 return trimmed;
520 })
521 .join('\n')
522 .replace(/\n{4,}/g, '\n\n\n')
523 .trim();
524 }
525
526 function cleanClaudeDump(input) {
527 return input

Callers 1

detectAndCleanFunction · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected