File tree Expand file tree Collapse file tree 2 files changed +4
-5
lines changed
internal/arduino/builder/internal/detector Expand file tree Collapse file tree 2 files changed +4
-5
lines changed Original file line number Diff line number Diff line change @@ -477,8 +477,7 @@ func (l *SketchLibrariesDetector) failIfImportedLibraryIsWrong() error {
477477 return nil
478478}
479479
480- // includeRegexp fixdoc
481- var includeRegexp = regexp .MustCompile (`#include[ \t]*[<"](\S+)[">]` )
480+ var includeRegexp = regexp .MustCompile (`(?ms)^\s*[0-9 |]*\s*#[ \t]*include\s*[<"](\S+)[">]` )
482481
483482// IncludesFinderWithRegExp fixdoc
484483func IncludesFinderWithRegExp (source string ) string {
Original file line number Diff line number Diff line change @@ -77,9 +77,9 @@ func TestIncludesFinderWithRegExpPaddedIncludes4(t *testing.T) {
7777}
7878
7979func TestIncludesFinderWithRegExpPaddedIncludes5 (t * testing.T ) {
80- output := "/some/path/sketch.ino:23:42: fatal error: 'Foobar.h' file not found" +
81- " 23 | #include \" Foobar.h\" " +
82- " | ^~~~~~~~~~"
80+ output := "/some/path/sketch.ino:23:42: fatal error: 'Foobar.h' file not found\n " +
81+ " 23 | #include \" Foobar.h\" \n " +
82+ " | ^~~~~~~~~~\n "
8383
8484 include := detector .IncludesFinderWithRegExp (output )
8585
You can’t perform that action at this time.
0 commit comments