mirror of https://github.com/ehang-io/nps
enable comment of conf titles
parent
63ba9774f9
commit
f08d2eb500
|
@ -302,7 +302,7 @@ func delLocalService(s string) *LocalServer {
|
||||||
|
|
||||||
func getAllTitle(content string) (arr []string, err error) {
|
func getAllTitle(content string) (arr []string, err error) {
|
||||||
var re *regexp.Regexp
|
var re *regexp.Regexp
|
||||||
re, err = regexp.Compile(`\[.+?\]`)
|
re, err = regexp.Compile(`(?m)^\[[^\[\]\r\n]+\]`)
|
||||||
if err != nil {
|
if err != nil {
|
||||||
return
|
return
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in New Issue