MCPcopy Create free account
hub / github.com/Rich-Harris/magic-string / replacer

Method replacer

src/MagicString.ts:368–373  ·  view source on GitHub ↗
(match: string)

Source from the content-addressed store, hash-verified

366
367 let shouldIndentNextCharacter = options.indentStart !== false
368 const replacer = (match: string) => {
369 if (shouldIndentNextCharacter)
370 return `${resolvedIndentStr}${match}`
371 shouldIndentNextCharacter = true
372 return match
373 }
374
375 this.intro = this.intro.replace(pattern, replacer)
376

Callers

nothing calls this directly

Calls

no outgoing calls

Tested by

no test coverage detected