From 9d3546efcb780cd5dc19ea46a02e1c9086b0c131 Mon Sep 17 00:00:00 2001 From: Justsnoopy30 Date: Fri, 29 Oct 2021 18:57:41 -0500 Subject: [PATCH] Remove consolidation of newlines from JCPP preprocessing This causes line numbers to be shifted even more and coderbot indicates it should be removed. --- .../net/coderbot/iris/shaderpack/PropertiesPreprocessor.java | 5 ----- .../net/coderbot/iris/shaderpack/ShaderPreprocessor.java | 5 ----- 2 files changed, 10 deletions(-) diff --git a/src/main/java/net/coderbot/iris/shaderpack/PropertiesPreprocessor.java b/src/main/java/net/coderbot/iris/shaderpack/PropertiesPreprocessor.java index ee049ee5a5..3b72acc8e1 100644 --- a/src/main/java/net/coderbot/iris/shaderpack/PropertiesPreprocessor.java +++ b/src/main/java/net/coderbot/iris/shaderpack/PropertiesPreprocessor.java @@ -42,11 +42,6 @@ public static String preprocessSource(String source) { source = builder.toString(); - // strip leading whitespace before newline, makes next change more reliable - source = source.replaceAll("[ \t]*[\r\n]", "\n"); - // consolidate newlines - source = source.replaceAll("\n{2,}", "\n\n"); - return source; } } diff --git a/src/main/java/net/coderbot/iris/shaderpack/ShaderPreprocessor.java b/src/main/java/net/coderbot/iris/shaderpack/ShaderPreprocessor.java index 65247e3f56..d47ff2ae48 100644 --- a/src/main/java/net/coderbot/iris/shaderpack/ShaderPreprocessor.java +++ b/src/main/java/net/coderbot/iris/shaderpack/ShaderPreprocessor.java @@ -150,11 +150,6 @@ public static String glslPreprocessSource(String source) { source = builder.toString(); - // strip leading whitespace before newline, makes next change more reliable - source = source.replaceAll("[ \t]*[\r\n]", "\n"); - // consolidate newlines - source = source.replaceAll("\n{2,}", "\n\n"); - return source; } }