Skip to content

Commit

Permalink
Update metrics docs generator to handle metrics refactor
Browse files Browse the repository at this point in the history
Signed-off-by: João Vilaça <[email protected]>
  • Loading branch information
machadovilaca authored and sradco committed Dec 4, 2023
1 parent 602833f commit bda42e1
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion tools/metricsdocs/metricsdocs.go
Original file line number Diff line number Diff line change
Expand Up @@ -189,6 +189,7 @@ func (p *project) parseMetricsDoc(content []string) string {
for _, s := range content {
if !running && isBeginning(s) {
running = true
fmt.Fprintln(&b, s)
} else if running {
if isEnd(s) {
break
Expand All @@ -201,7 +202,7 @@ func (p *project) parseMetricsDoc(content []string) string {
}

func isBeginning(s string) bool {
return strings.HasPrefix(s, "## ") && strings.Contains(s, "Metrics List")
return strings.HasPrefix(s, "### ")
}

func isEnd(s string) bool {
Expand Down

0 comments on commit bda42e1

Please sign in to comment.