From 16cbf238a74cac17082d6888bc8934899c850645 Mon Sep 17 00:00:00 2001 From: kijai <40791699+kijai@users.noreply.github.com> Date: Mon, 15 Dec 2025 18:29:17 +0200 Subject: [PATCH] Fix StringConstantMultiline I have no idea what this even was about... --- nodes/nodes.py | 12 ++++-------- 1 file changed, 4 insertions(+), 8 deletions(-) diff --git a/nodes/nodes.py b/nodes/nodes.py index 84d1c17..25397f2 100644 --- a/nodes/nodes.py +++ b/nodes/nodes.py @@ -90,14 +90,10 @@ class StringConstantMultiline: CATEGORY = "KJNodes/constants" def stringify(self, string, strip_newlines): - new_string = [] - for line in io.StringIO(string): - if not line.strip().startswith("\n") and strip_newlines: - line = line.replace("\n", '') - new_string.append(line) - new_string = "\n".join(new_string) - - return (new_string, ) + new_string = string + if strip_newlines: + new_string = new_string.replace('\n', '').strip() + return (new_string,)