Sun, 07 Jan 2024 11:05:24 +0100
trim all contents by default - relates to #317
src/main/java/de/unixwork/uwproj/Dependency.java | file | annotate | diff | comparison | revisions | |
src/main/java/de/unixwork/uwproj/Util.java | file | annotate | diff | comparison | revisions |
--- a/src/main/java/de/unixwork/uwproj/Dependency.java Sun Jan 07 11:02:43 2024 +0100 +++ b/src/main/java/de/unixwork/uwproj/Dependency.java Sun Jan 07 11:05:24 2024 +0100 @@ -55,7 +55,7 @@ } else if (n.equals("make")) { d.addMake(Util.getContent(elm)); } else if (n.equals("lang")) { - d.lang.add(Util.getContent(elm).trim().toLowerCase()); + d.lang.add(Util.getContent(elm).toLowerCase()); } } }
--- a/src/main/java/de/unixwork/uwproj/Util.java Sun Jan 07 11:02:43 2024 +0100 +++ b/src/main/java/de/unixwork/uwproj/Util.java Sun Jan 07 11:05:24 2024 +0100 @@ -32,9 +32,9 @@ if (v == null) { return ""; } else if (trimIndent) { - return v.replaceAll("\\n[ \\t]+", "\n"); + return v.trim().replaceAll("\\n[ \\t]+", "\n"); } else { - return v; + return v.trim(); } } }