Skip to content

Commit

Permalink
Merge pull request #5052 from kuronekochomusuke/issue_5051
Browse files Browse the repository at this point in the history
use pre tag around issue text
  • Loading branch information
HammerGS authored Jan 13, 2024
2 parents 441fddc + 2797e65 commit 4399c44
Showing 1 changed file with 7 additions and 2 deletions.
9 changes: 7 additions & 2 deletions megamek/src/megamek/common/MechView.java
Original file line number Diff line number Diff line change
Expand Up @@ -543,7 +543,7 @@ public MechView(final Entity entity, final boolean showDetail, final boolean use

if (!sb.toString().isEmpty()) {
sInvalid.add(new SingleLine());
sInvalid.add(new LabeledElement(Messages.getString("MechView.InvalidReasons"), sb.toString()));
sInvalid.add(new LabeledElement(Messages.getString("MechView.InvalidReasons"), "\n" + sb.toString()));
}
}
}
Expand Down Expand Up @@ -662,13 +662,18 @@ public String getMechReadout() {
public String getMechReadout(@Nullable String fontName) {
String docStart = "";
String docEnd = "";
String preStart = "";
String preEnd = "";

if (html && (fontName != null)) {
docStart = "<div style=\"font-family:" + fontName + ";\">";
docEnd = "</div>";
preStart = "<PRE style=\"font-family:" + fontName + ";\">";
preEnd = "</PRE>";
}
return docStart + getMechReadoutHead()
+ getMechReadoutBasic() + getMechReadoutLoadout()
+ getMechReadoutFluff() + getMechReadoutInvalid() + docEnd;
+ getMechReadoutFluff() + preStart + getMechReadoutInvalid() + preEnd + docEnd;
}

private List<ViewElement> getInternalAndArmor() {
Expand Down

0 comments on commit 4399c44

Please sign in to comment.