File tree 2 files changed +4
-5
lines changed
internal/arduino/builder/internal/detector
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 {
477
477
return nil
478
478
}
479
479
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+)[">]` )
482
481
483
482
// IncludesFinderWithRegExp fixdoc
484
483
func IncludesFinderWithRegExp (source string ) string {
Original file line number Diff line number Diff line change @@ -77,9 +77,9 @@ func TestIncludesFinderWithRegExpPaddedIncludes4(t *testing.T) {
77
77
}
78
78
79
79
func 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 "
83
83
84
84
include := detector .IncludesFinderWithRegExp (output )
85
85
You can’t perform that action at this time.
0 commit comments