MCPcopy Create free account
hub / github.com/colbymchenry/codegraph / blanked

Function blanked

__tests__/strip-comments.test.ts:138–138  ·  view source on GitHub ↗
(text: string)

Source from the content-addressed store, hash-verified

136describe('stripCommentsForRegex keeps every offset', () => {
137 // A blank stands for each character of a comment, a newline for itself.
138 const blanked = (text: string): string => text.replace(/[^\n]/g, ' ');
139 const cases: Array<[string, Parameters<typeof stripCommentsForRegex>[1], string, string]> = [
140 ['a block comment across lines', 'cpp', 'int a; /* one\r\n two\n */ int b;', '/* one\r\n two\n */'],
141 ['a comment that runs off the end', 'typescript', 'const a = 1; /* open\nstill', '/* open\nstill'],

Callers 1

Calls

no outgoing calls

Tested by

no test coverage detected