The original file content.
Array of Replacement objects.
An object containing the updated content and any error messages.
Private
findPrivate
findAttempts to find matches by trimming whitespace from lines in the original content and the search string.
The original content.
The substring to search for, potentially with varying whitespace.
An array of starting indices where a trimmed match is found.
Private
getPrivate
replaceReplaces all occurrences of oldContent with newContent in the content.
The original content.
The content to be replaced.
The content to replace with.
The content after all replacements.
Private
replaceReplaces the first occurrence of oldContent with newContent in the content.
The original content.
The content to be replaced.
The content to replace with.
The content after replacement.
Applies a list of replacements to the original content using a multi-step matching strategy.