mirror of
https://github.com/Xevion/glance.git
synced 2025-12-15 04:11:59 -06:00
Add alternative include syntax
Also make it the new recommended way for doing includes
This commit is contained in:
@@ -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)
|
||||
|
||||
Reference in New Issue
Block a user