lib/openc3/models/widget_model.rb in openc3-5.10.1 vs lib/openc3/models/widget_model.rb in openc3-5.11.0

- old
+ new

@@ -122,10 +122,10 @@ filename = gem_path + "/tools/widgets/" + @full_name + '/' + @filename # Load widget file data = File.read(filename, mode: "rb") OpenC3.set_working_dir(File.dirname(filename)) do - data = ERB.new(data, trim_mode: "-").result(binding.set_variables(variables)) if data.is_printable? + data = ERB.new(data.comment_erb(), trim_mode: "-").result(binding.set_variables(variables)) if data.is_printable? end unless validate_only cache_control = BucketUtilities.get_cache_control(@filename) # TODO: support widgets that aren't just a single js file (and its associated map file) bucket.put_object(bucket: ENV['OPENC3_TOOLS_BUCKET'], content_type: 'application/javascript', cache_control: cache_control, key: @bucket_key, body: data)