소스 검색

enable comment of conf titles

hellodword 4 년 전
부모
커밋
f08d2eb500
1개의 변경된 파일1개의 추가작업 그리고 1개의 파일을 삭제
  1. 1 1
      lib/config/config.go

+ 1 - 1
lib/config/config.go

@@ -302,7 +302,7 @@ func delLocalService(s string) *LocalServer {
 
 func getAllTitle(content string) (arr []string, err error) {
 	var re *regexp.Regexp
-	re, err = regexp.Compile(`\[.+?\]`)
+	re, err = regexp.Compile(`(?m)^\[[^\[\]\r\n]+\]`)
 	if err != nil {
 		return
 	}