Skip to content

Commit

Permalink
Fix error in preprocessing includes: multiple includes with paths wer…
Browse files Browse the repository at this point in the history
…e accidentally being deleted
  • Loading branch information
mvandervoord committed Jan 7, 2025
1 parent 30a3be8 commit 65ce792
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions lib/ceedling/preprocessinator_file_handler.rb
Original file line number Diff line number Diff line change
Expand Up @@ -133,8 +133,8 @@ def assemble_preprocessed_header_file(filename:, preprocessed_filepath:, content
# ----------------------------------------------------
# - We rely on search paths at compilation rather than explicit #include paths
# - Match (#include ")((path/)+)(file") and reassemble string using first and last matching groups
_contents.gsub!( /(#include\s+")(([^\/]+\/)+)(.+")/, '\1\4' )
_contents.gsub!( /(#include\s+")(?:(?:[^"\/]+\/)+)([^"\/]*")/, '\1\2' )

# Write contents of final preprocessed file
@file_wrapper.write( preprocessed_filepath, _contents )
end
Expand Down

0 comments on commit 65ce792

Please sign in to comment.