mirror of
https://github.com/magefree/mage.git
synced 2025-12-22 11:32:00 -08: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 ")
|
||||||
.replace("\n•", "<br>&bull ");
|
.replace("\n•", "<br>&bull ");
|
||||||
refText += "<br>";
|
refText += "<br>";
|
||||||
|
refText = refText.replace("<br>", "\n");
|
||||||
}
|
}
|
||||||
// mana ability fix
|
// mana ability fix
|
||||||
for (String s : refText.split("[\\$\\\n]")) {
|
for (String s : refText.split("[\\$\\\n]")) {
|
||||||
|
|
@ -1491,7 +1492,13 @@ public class VerifyCardDataTest {
|
||||||
refRules[i] = prepareRule(card.getName(), refRules[i]);
|
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++) {
|
for (int i = 0; i < cardRules.length; i++) {
|
||||||
cardRules[i] = prepareRule(card.getName(), cardRules[i]);
|
cardRules[i] = prepareRule(card.getName(), cardRules[i]);
|
||||||
}
|
}
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue