Skip to content

Commit

Permalink
fix regex (#4)
Browse files Browse the repository at this point in the history
  • Loading branch information
fernandosoaresjr authored Sep 30, 2021
1 parent b58dd6f commit 9505857
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion terraform/plan.go
Original file line number Diff line number Diff line change
Expand Up @@ -112,7 +112,7 @@ func (plan *Plan) ProcessedOutput() string {
output = re.ReplaceAllString(output, "@@ #$1 @@")

// Switches all changing lines (~) for removing and creating lines
re = regexp.MustCompile(`(?m)^\~(.*) = (.*) -> (.*)`)
re = regexp.MustCompile(`(?m)^\~(.*?) = (.*) -> (.*)`)
output = re.ReplaceAllString(output, "-$1 = $2\n+$1 = $3")

// All changing chars (~) can now be replaces by diff changing char (!)
Expand Down

0 comments on commit 9505857

Please sign in to comment.