Merge branch 'main' into translations-system

This commit is contained in:
NeeEoo
2024-04-10 16:14:55 +02:00
59 changed files with 345 additions and 162 deletions
+1 -1
View File
@@ -207,7 +207,7 @@ class CoolUtil
* @return String Result without any kind of IP
*/
public static inline function removeIP(msg:String):String {
return ~/\d+.\d+.\d+.\d+/.replace(msg, "[Your IP]"); // For now its just IPs but who knows in the future.. - Nex
return ~/\d+.\d+.\d+.\d+/.replace(msg, "[Your IP]"); // For now its just IPs but who knows in the future.. - Nex
}
/**
+1 -1
View File
@@ -134,7 +134,7 @@ class MemoryUtil {
if (process.exitCode() != 0) return "Unknown";
var lines = process.stdout.readAll().toString().split("\n");
for (line in lines) {
if (line.indexOf("Type:") == 0) {
if (line.startsWith("Type:")) {
return line.substring("Type:".length).trim();
}
}
+3 -1
View File
@@ -285,10 +285,12 @@ class XMLUtil {
}
/**
* Trims and removes spacing from the nodeValue in the XML
*
* WARNING: will edit directly the node!
*/
public static function fixSpacingInNode(node:Access):Access {
var arr = [for(x in node.x) x];
var arr = Lambda.array(node.x);
for(i => n in arr) {
if(n.nodeType == PCData) {
if(i == 0) n.nodeValue = n.nodeValue.ltrim();