Enhance regular to match blank before include.
parent
0ccebd9916
commit
5df6f11cfc
|
@ -10,7 +10,7 @@ module Metasploit
|
|||
# @return [String] The normalized code.
|
||||
def self.normalize_code(code, headers)
|
||||
code = code.lines.map { |line|
|
||||
if line =~ /^#include <([[:print:]]+)>$/
|
||||
if line =~ /^\s*#include <([[:print:]]+)>$/
|
||||
%Q|<%= headers.include('#{$1}') %>\n|
|
||||
else
|
||||
line
|
||||
|
|
Loading…
Reference in New Issue