diff --git a/tool/src/generate.go b/tool/src/generate.go index 5ef1b16..fd8e75b 100644 --- a/tool/src/generate.go +++ b/tool/src/generate.go @@ -68,6 +68,7 @@ func debug(msg string) { var docsPat = regexp.MustCompile("^\\s*(\\/\\/|#)\\s") var headerPat = regexp.MustCompile("^\\s*(\\/\\/|#)\\s#+\\s") +var todoPat = regexp.MustCompile("\\/\\/ todo: ") type seg struct { docs, code, docsRendered, codeRendered string @@ -104,6 +105,9 @@ func main() { segs = append(segs, &seg{code: "", docs: ""}) lastSeen := "" for _, line := range lines { + if todoPat.MatchString(line) { + continue + } headerMatch := headerPat.MatchString(line) docsMatch := docsPat.MatchString(line) emptyMatch := line == ""