MCPcopy Create free account
hub / github.com/dethcrypto/dethcode / fixNewline

Function fixNewline

packages/ethereum-viewer/src/fs/textSearchProvider.ts:174–176  ·  view source on GitHub ↗
(pattern: string)

Source from the content-addressed store, hash-verified

172 * Replaces _actual newline_ in the pattern with escaped newline.
173 */
174export function fixNewline(pattern: string): string {
175 return pattern.replace(/\n/g, "\\r?\\n");
176}
177
178// @todo VSCode RipgrepTextSearchProvider fixes regex with the following code
179// export function fixRegexNewline(pattern: string): string {

Callers 2

testFixNewlineFunction · 0.90
searchInFileFunction · 0.85

Calls

no outgoing calls

Tested by 1

testFixNewlineFunction · 0.72