fix title matching to extract subgroup
parent
2a4fef7566
commit
ee807dcac8
8
main.go
8
main.go
|
@ -85,9 +85,11 @@ func pageTitleFor(username string) string {
|
||||||
fmt.Fprintf(os.Stderr, "failed to read %q: %v\n", indexPath, err)
|
fmt.Fprintf(os.Stderr, "failed to read %q: %v\n", indexPath, err)
|
||||||
return ""
|
return ""
|
||||||
}
|
}
|
||||||
title := pageTitleRe.FindString(string(content))
|
titleMatch := pageTitleRe.FindStringSubmatch(string(content))
|
||||||
|
if len(titleMatch) < 2 {
|
||||||
return title
|
return ""
|
||||||
|
}
|
||||||
|
return titleMatch[1]
|
||||||
}
|
}
|
||||||
|
|
||||||
func systemUsers() map[string]bool {
|
func systemUsers() map[string]bool {
|
||||||
|
|
Loading…
Reference in New Issue