Skip to content

Commit

Permalink
fix breaking change
Browse files Browse the repository at this point in the history
  • Loading branch information
shihanwan committed Apr 25, 2024
1 parent 55efc5d commit 4772c77
Showing 1 changed file with 3 additions and 6 deletions.
9 changes: 3 additions & 6 deletions packages/bumpgen-core/src/services/matching/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -204,18 +204,15 @@ const searchAndReplace = (
return content;
}

const indentedNewCode = formatNewCode(
countIndents(firstMatchedLine),
newCode
);
const formattedNewCode = formatNewCode(firstMatchedLine, newCode);

console.log("=== replacing with this new code")
console.log(indentedNewCode.join("\n"));
console.log(formattedNewCode.join("\n"));
console.log("=== \n");

const updatedContents = [
...splitContent.slice(0, startIndex),
...indentedNewCode,
...formattedNewCode,
...splitContent.slice(endIndex + 1)
].join("\n");

Expand Down

0 comments on commit 4772c77

Please sign in to comment.