updated verify check to better handle line breaks

This commit is contained in:
Evan Kranzler 2020-10-07 09:19:39 -04:00
parent a2ae0bc9b8
commit 9a140a19a2

View file

@ -1470,6 +1470,7 @@ public class VerifyCardDataTest {
.replace("\n•", "-<br>&bull ")
.replace("\n•", "<br>&bull ");
refText += "<br>";
refText = refText.replace("<br>", "\n");
}
// mana ability fix
for (String s : refText.split("[\\$\\\n]")) {
@ -1491,7 +1492,13 @@ public class VerifyCardDataTest {
refRules[i] = prepareRule(card.getName(), refRules[i]);
}
String[] cardRules = card.getRules().toArray(new String[0]);
String[] cardRules = card
.getRules()
.stream()
.reduce("", (a, b) -> a + '\n' + b)
.replace("<br>", "\n")
.replace("<br/>", "\n")
.split("[\\$\\\n]");
for (int i = 0; i < cardRules.length; i++) {
cardRules[i] = prepareRule(card.getName(), cardRules[i]);
}