Enhance wwdoc comment handling by allowing whitespace trimming and updating regex for parsing

Signed-off-by: Josh Burks <jeburks2@asu.edu>
This commit is contained in:
Josh Burks
2026-02-03 17:01:19 -07:00
parent 31bcefea11
commit 634982dc86
3 changed files with 40 additions and 1 deletions

View File

@@ -335,7 +335,7 @@ func (overlay Overlay) ParseCommentVars(file string) (retMap map[string]string)
return nil
}
re := regexp.MustCompile(`{{\s*/\*\s*(.*?):\s*(.*?)\s*\*/\s*}}`)
re := regexp.MustCompile(`{{-?\s*/\*\s*(.*?):\s*(.*?)\s*\*/\s*-?}}`)
matches := re.FindAllStringSubmatch(string(content), -1)
if len(matches) > 0 {
wwlog.Debug("matches: %v len(%d:%d)", matches, len(matches), len(matches[0]))