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

Method replacer

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

Source from the content-addressed store, hash-verified

353
354 let shouldIndentNextCharacter = options.indentStart !== false
355 const replacer = (match: string) => {
356 if (shouldIndentNextCharacter)
357 return `${resolvedIndentStr}${match}`
358 shouldIndentNextCharacter = true
359 return match
360 }
361
362 this.intro = this.intro.replace(pattern, replacer)
363

Callers

nothing calls this directly

Calls

no outgoing calls

Tested by

no test coverage detected