Add alternative include syntax
Also make it the new recommended way for doing includes
This commit is contained in:
parent
9c98c6d0c4
commit
9df9673e84
2 changed files with 9 additions and 9 deletions
|
|
@ -144,7 +144,7 @@ func formatWidgetInitError(err error, w widget) error {
|
|||
return fmt.Errorf("%s widget: %v", w.GetType(), err)
|
||||
}
|
||||
|
||||
var includePattern = regexp.MustCompile(`(?m)^(\s*)!include:\s*(.+)$`)
|
||||
var includePattern = regexp.MustCompile(`(?m)^([ \t]*)(?:-[ \t]*)?(?:!|\$)include:[ \t]*(.+)$`)
|
||||
|
||||
func parseYAMLIncludes(mainFilePath string) ([]byte, map[string]struct{}, error) {
|
||||
mainFileContents, err := os.ReadFile(mainFilePath)
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue