Merge pull request #2110 from jeburks2/wwdoc-comments

Allow wwdoc comments to have trimmed whitespace
This commit is contained in:
Christian Goll
2026-02-04 11:46:12 +01:00
committed by GitHub
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]))