Fix permalinks issue with repeated sections

Fixes #10377
This commit is contained in:
Bjørn Erik Pedersen
2023-01-17 11:00:38 +01:00
parent 2fb40ece5d
commit 671f64b2eb
3 changed files with 41 additions and 1 deletions

View File

@@ -176,7 +176,7 @@ func (l PermalinkExpander) parse(patterns map[string]string) (map[string]func(Pa
// can return a string to go in that position in the page (or an error)
type pageToPermaAttribute func(Page, string) (string, error)
var attributeRegexp = regexp.MustCompile(`:\w+(\[.+\])?`)
var attributeRegexp = regexp.MustCompile(`:\w+(\[.+?\])?`)
// validate determines if a PathPattern is well-formed
func (l PermalinkExpander) validate(pp string) bool {