1
0
mirror of https://github.com/RipMeApp/ripme.git synced 2025-08-26 15:24:51 +02:00

replaceAll takes a regex, escape newline to replace it with <br>

This fixes the download box displaying only one line for all versions
and their fix descriptsion out of ripme.json.
This commit is contained in:
soloturn
2018-12-27 11:17:57 +01:00
parent a2f6b6e09a
commit 685fb44af4

View File

@@ -131,10 +131,10 @@ public class UpdateUtils {
JEditorPane changeListPane = new JEditorPane("text/html", String.format(
"<html><font color=\"green\">New version (%s) is available!</font>" + "<br><br>Recent changes: %s"
+ "<br><br>Do you want to download and run the newest version?</html>",
latestVersion, changeList.replaceAll("\n", "<br><br>")));
latestVersion, changeList.replaceAll("\\n", "<br><br>")));
changeListPane.setEditable(false);
JScrollPane changeListScrollPane = new JScrollPane(changeListPane);
changeListScrollPane.setPreferredSize(new Dimension(250, 200));
changeListScrollPane.setPreferredSize(new Dimension(300, 300));
int result = JOptionPane.showConfirmDialog(null, changeListScrollPane, "RipMe Updater",
JOptionPane.YES_NO_OPTION);
if (result != JOptionPane.YES_OPTION) {