From 7532b1dc2658f1eec0af6b1df187f65621d92d34 Mon Sep 17 00:00:00 2001 From: UCSIG Date: Wed, 28 Feb 2024 12:01:25 +0100 Subject: [PATCH] Fix adding newlines everytime a skeleton is created. --- lib/cmock_generator.rb | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/lib/cmock_generator.rb b/lib/cmock_generator.rb index c3896dfb..f4f1cecb 100644 --- a/lib/cmock_generator.rb +++ b/lib/cmock_generator.rb @@ -140,7 +140,10 @@ def create_skeleton_source_file(mock_project) if existing.empty? create_source_header_section(file, fullname, blank_project) else - file << existing << "\n" + file << existing + if existing[-1] != "\n" + file << "\n" + end end mock_project[:parsed_stuff][:functions].each do |function| create_function_skeleton(file, function, existing)