From c1cb9e8078e54b1ecd7950841d2eba6993c2f036 Mon Sep 17 00:00:00 2001 From: Mikko Rasa Date: Tue, 5 Sep 2023 01:01:31 +0300 Subject: [PATCH] Allow spaces after # when reading includes from C source files --- source/lib/csourcefile.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/source/lib/csourcefile.cpp b/source/lib/csourcefile.cpp index bc76605..96030a9 100644 --- a/source/lib/csourcefile.cpp +++ b/source/lib/csourcefile.cpp @@ -21,7 +21,7 @@ CSourceFile::CSourceFile(Builder &b, const Component &c, const FS::Path &p): void CSourceFile::parse_includes(IO::Base &in) { - static Regex r_include("^[ \t]*#include[ \t]+([\"<].*)[\">]"); + static Regex r_include("^[ \t]*# *include[ \t]+([\"<].*)[\">]"); string line; while(in.getline(line)) -- 2.45.2