1
0
mirror of https://github.com/RipMeApp/ripme.git synced 2025-08-27 07:44:20 +02:00

Merge pull request #1127 from soloturn/changelog

replaceAll takes a regex, escape newline to replace it with <br>
This commit is contained in:
cyian-1756
2019-01-04 08:03:22 -05:00
committed by GitHub

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) {