Browse Source

Merge pull request #750 from hellodword/patch-1

enable comment of conf titles
ffdfgdfg 4 years ago
parent
commit
9d5c3fd870
1 changed files with 1 additions and 1 deletions
  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
 	}