From 2cd5dabdc97878fbfec3042fb6aa2279761ad44a Mon Sep 17 00:00:00 2001 From: nea Date: Tue, 12 Jul 2022 00:50:47 +0200 Subject: "Fix" official wiki rendering. This one didnt receive extensive testing, but so far it works --- .../moulberry/notenoughupdates/infopanes/HTMLInfoPane.java | 9 +++++---- 1 file changed, 5 insertions(+), 4 deletions(-) diff --git a/src/main/java/io/github/moulberry/notenoughupdates/infopanes/HTMLInfoPane.java b/src/main/java/io/github/moulberry/notenoughupdates/infopanes/HTMLInfoPane.java index 03f55561..de9c608f 100644 --- a/src/main/java/io/github/moulberry/notenoughupdates/infopanes/HTMLInfoPane.java +++ b/src/main/java/io/github/moulberry/notenoughupdates/infopanes/HTMLInfoPane.java @@ -215,8 +215,11 @@ public class HTMLInfoPane extends TextInfoPane { } String html; try { - html = wikiModel.render(wiki); - } catch (IOException e) { + if (isOfficialWiki) + html = wiki; + else + html = wikiModel.render(wiki); + } catch (Exception e) { return new HTMLInfoPane(overlay, manager, "error", "error", "Could not render wiki.", false); } try (PrintWriter out = new PrintWriter(new File(manager.configLocation, "debug/html.txt"))) { @@ -330,8 +333,6 @@ public class HTMLInfoPane extends TextInfoPane { .replaceAll("[^a-zA-Z0-9_\\-]", "_"); File output = new File(manager.configLocation, "tmp/" + outputFileName + ".png"); - File outputExt = new File(manager.configLocation, "tmp/" + - outputFileName + "_ext.png"); input.deleteOnExit(); output.deleteOnExit(); -- cgit