Skip to content

Commit 78941c0

Browse files
committed
improved regexp to also parse error messages with single quotes around header file name
1 parent 84fc413 commit 78941c0

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

internal/arduino/builder/internal/detector/detector.go

+1-1
Original file line numberDiff line numberDiff line change
@@ -478,7 +478,7 @@ func (l *SketchLibrariesDetector) failIfImportedLibraryIsWrong() error {
478478
}
479479

480480
// includeRegexp fixdoc
481-
var includeRegexp = regexp.MustCompile("(?ms)^\\s*#[ \t]*include\\s*[<\"](\\S+)[\">]")
481+
var includeRegexp = regexp.MustCompile(`(?ms)[<"'](\S+)[">']`)
482482

483483
// IncludesFinderWithRegExp fixdoc
484484
func IncludesFinderWithRegExp(source string) string {

0 commit comments

Comments
 (0)