From fb15c44383b9b04ee5760c947df4bdc527022c00 Mon Sep 17 00:00:00 2001 From: Anuken Date: Fri, 8 Nov 2019 21:11:49 -0500 Subject: [PATCH] Fix links in a hacky way --- core/src/io/anuke/mindustry/mod/ContentParser.java | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/core/src/io/anuke/mindustry/mod/ContentParser.java b/core/src/io/anuke/mindustry/mod/ContentParser.java index 642527434a..f42c34ea33 100644 --- a/core/src/io/anuke/mindustry/mod/ContentParser.java +++ b/core/src/io/anuke/mindustry/mod/ContentParser.java @@ -341,8 +341,9 @@ public class ContentParser{ if(contentTypes.isEmpty()){ init(); } - //add comments starting with ## - json = json.replaceAll("//.*?\n","\n"); + + //add comments starting with ##, but ignore links + json = json.replace("http://", "http:~~").replace("https://", "https:~~").replaceAll("//.*?\n","\n").replace("http:~~", "http://").replace("https:~~", "https://"); JsonValue value = parser.fromJson(null, json); if(!parsers.containsKey(type)){