Skip to content

Commit

Permalink
parseLabeledOutput: add regex start anchors
Browse files Browse the repository at this point in the history
  • Loading branch information
craig65535 committed Jul 10, 2023
1 parent fbc352c commit 838a0a2
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions assert/assertions_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -2846,8 +2846,8 @@ func Test_truncatingFormat(t *testing.T) {
}

func parseLabeledOutput(output string) []labeledContent {
labelPattern := regexp.MustCompile(`\t([^\t]*): *\t(.*)$`)
contentPattern := regexp.MustCompile(`\t *\t(.*)$`)
labelPattern := regexp.MustCompile(`^\t([^\t]*): *\t(.*)$`)
contentPattern := regexp.MustCompile(`^\t *\t(.*)$`)
var contents []labeledContent
lines := strings.Split(output, "\n")
i := -1
Expand Down

0 comments on commit 838a0a2

Please sign in to comment.