elide todos
This commit is contained in:
parent
5b93c89644
commit
3af7544a0f
@ -68,6 +68,7 @@ func debug(msg string) {
|
|||||||
|
|
||||||
var docsPat = regexp.MustCompile("^\\s*(\\/\\/|#)\\s")
|
var docsPat = regexp.MustCompile("^\\s*(\\/\\/|#)\\s")
|
||||||
var headerPat = regexp.MustCompile("^\\s*(\\/\\/|#)\\s#+\\s")
|
var headerPat = regexp.MustCompile("^\\s*(\\/\\/|#)\\s#+\\s")
|
||||||
|
var todoPat = regexp.MustCompile("\\/\\/ todo: ")
|
||||||
|
|
||||||
type seg struct {
|
type seg struct {
|
||||||
docs, code, docsRendered, codeRendered string
|
docs, code, docsRendered, codeRendered string
|
||||||
@ -104,6 +105,9 @@ func main() {
|
|||||||
segs = append(segs, &seg{code: "", docs: ""})
|
segs = append(segs, &seg{code: "", docs: ""})
|
||||||
lastSeen := ""
|
lastSeen := ""
|
||||||
for _, line := range lines {
|
for _, line := range lines {
|
||||||
|
if todoPat.MatchString(line) {
|
||||||
|
continue
|
||||||
|
}
|
||||||
headerMatch := headerPat.MatchString(line)
|
headerMatch := headerPat.MatchString(line)
|
||||||
docsMatch := docsPat.MatchString(line)
|
docsMatch := docsPat.MatchString(line)
|
||||||
emptyMatch := line == ""
|
emptyMatch := line == ""
|
||||||
|
Loading…
x
Reference in New Issue
Block a user