Skip to content

Commit

Permalink
fix regexp for includes
Browse files Browse the repository at this point in the history
This was excluding hyphens.
  • Loading branch information
John Swanson authored and johnswanson committed Oct 20, 2020
1 parent faf8544 commit 275feba
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion process/process.go
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@ import (
// the <<include()>> parameter is the string passed.
func MaybeIncludeFile(s string, orbDirectory string) (string, error) {
// View: https://regexr.com/599mq
includeRegex := regexp.MustCompile(`<<[\s]*include\(([\w\/\.]+)\)?[\s]*>>`)
includeRegex := regexp.MustCompile(`<<[\s]*include\(([-\w\/\.]+)\)?[\s]*>>`)

// only find up to 2 matches, because we throw an error if we find >1
includeMatches := includeRegex.FindAllStringSubmatch(s, 2)
Expand Down

0 comments on commit 275feba

Please sign in to comment.