Skip to content

Commit af2016a

Browse files
committed
docs: add more comments
1 parent 4b32172 commit af2016a

File tree

1 file changed

+3
-1
lines changed

1 file changed

+3
-1
lines changed

cmd/readmevalidation/readmefiles.go

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -39,7 +39,9 @@ const (
3939

4040
var (
4141
supportedAvatarFileFormats = []string{".png", ".jpeg", ".jpg", ".gif", ".svg"}
42-
// Matches markdown headers, must be at the beginning of a line, such as "# " or "### ".
42+
// Matches markdown headers placed at the beginning of a line (e.g., "# " or "### "). To make the logic for
43+
// validateReadmeBody easier, this pattern deliberately matches on invalid headers (header levels must be in the
44+
// range 1–6 to be valid). The function has checks to see if the level is correct.
4345
readmeHeaderRe = regexp.MustCompile(`^(#+)(\s*)`)
4446
)
4547

0 commit comments

Comments
 (0)