mirror of
https://github.com/correl/mage.git
synced 2024-11-14 19:19:32 +00:00
updated verify check to better handle line breaks
This commit is contained in:
parent
a2ae0bc9b8
commit
9a140a19a2
1 changed files with 8 additions and 1 deletions
|
@ -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]);
|
||||
}
|
||||
|
|
Loading…
Reference in a new issue