From 7ca976516b89534e6fa3abd468ebc8f6f16e9aa5 Mon Sep 17 00:00:00 2001 From: Alex Riedler Date: Sun, 15 Dec 2024 18:16:48 -0500 Subject: [PATCH] chore: remove string edit --- lib/handlebars_assets/handlebars_template.rb | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/lib/handlebars_assets/handlebars_template.rb b/lib/handlebars_assets/handlebars_template.rb index 326a7be..bc2a192 100644 --- a/lib/handlebars_assets/handlebars_template.rb +++ b/lib/handlebars_assets/handlebars_template.rb @@ -115,15 +115,15 @@ def choose_engine(data) def compile(source) # remove trailing \n on file, for some reason the directives pipeline adds this - source.chomp!($INPUT_RECORD_SEPARATOR) + trim_source = source.chomp($INPUT_RECORD_SEPARATOR) # handle the case of multiple frameworks combined with ember # DEFER: use extension setup for ember if (HandlebarsAssets::Config.multiple_frameworks? && @template_path.is_ember?) || (HandlebarsAssets::Config.ember? && !HandlebarsAssets::Config.multiple_frameworks?) - compile_ember(source) + compile_ember(trim_source) else - compile_default(source) + compile_default(trim_source) end end