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

Function stripLineTokenPunctuation

src/search/query-paths.ts:202–204  ·  view source on GitHub ↗

Prose punctuation a line-number token can carry: "lines 900-1003," / "(L88)".

(token: string)

Source from the content-addressed store, hash-verified

200
201/** Prose punctuation a line-number token can carry: "lines 900-1003," / "(L88)". */
202function stripLineTokenPunctuation(token: string): string {
203 return token.replace(/^[('"`[]+/, '').replace(/[)'"`\].,;:!?]+$/, '');
204}
205
206/**
207 * Strip prose punctuation wrapped around a token without eating punctuation

Callers 1

extractQueryPathsFunction · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected