Explorar o código

enable comment of conf titles

hellodword %!s(int64=4) %!d(string=hai) anos
pai
achega
f08d2eb500
Modificáronse 1 ficheiros con 1 adicións e 1 borrados
  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
 	}