From b05be369b2b19b8d34afb0a15bb63373805bac02 Mon Sep 17 00:00:00 2001 From: Balloonpopper Date: Wed, 9 Mar 2022 13:50:34 +1100 Subject: [PATCH] fix: Automatically remove trailing whitespace when parsing scripts to avoid needing to change all regular expressions separately --- addons/escoria-core/game/core-scripts/esc/esc_compiler.gd | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/addons/escoria-core/game/core-scripts/esc/esc_compiler.gd b/addons/escoria-core/game/core-scripts/esc/esc_compiler.gd index 503a1cdc..d966e4a7 100644 --- a/addons/escoria-core/game/core-scripts/esc/esc_compiler.gd +++ b/addons/escoria-core/game/core-scripts/esc/esc_compiler.gd @@ -117,7 +117,7 @@ func _compile(lines: Array) -> Array: var returned = [] while lines.size() > 0: - var line = lines.pop_front() + var line = lines.pop_front().strip_edges(false, true) escoria.logger.trace("Parsing line %s" % line) if _comment_regex.search(line) or _empty_regex.search(line): # Ignore comments and empty lines