Skip to content

Commit 916db6f

Browse files
authoredApr 22, 2024
#patch: Fixes #165 - regex not working with headers and JSON snapshots (#166)
1 parent 11407b4 commit 916db6f

File tree

1 file changed

+1
-1
lines changed
  • java-snapshot-testing-core/src/main/java/au/com/origin/snapshots

1 file changed

+1
-1
lines changed
 

‎java-snapshot-testing-core/src/main/java/au/com/origin/snapshots/Snapshot.java

+1-1
Original file line numberDiff line numberDiff line change
@@ -29,7 +29,7 @@ public String getIdentifier() {
2929
}
3030

3131
public static Snapshot parse(String rawText) {
32-
String regex = "^(?<name>.*?)(\\[(?<scenario>.*)\\])?=(?<header>\\{.*\\})?(?<snapshot>(.*)$)";
32+
String regex = "^(?<name>.*?)(\\[(?<scenario>.*)\\])?=(?<header>\\{.*?\\})?(?<snapshot>(.*)$)";
3333
Pattern p = Pattern.compile(regex, Pattern.DOTALL);
3434
Matcher m = p.matcher(rawText);
3535
boolean found = m.find();

0 commit comments

Comments
 (0)