fix: Auto correcting code is broken in advance mode #50

This commit is contained in:
0xJacky 2023-01-01 11:18:21 +08:00
parent f6a5f350ad
commit e9f0835aea
No known key found for this signature in database
GPG key ID: B6E4A6E4A561BAF0
2 changed files with 2 additions and 2 deletions

View file

@ -18,7 +18,7 @@ const router = useRouter()
const name = ref(route.params.name.toString())
watch(route, () => {
name.value = route.params.name.toString()
name.value = route.params?.name?.toString() ?? ''
})
const update = ref(0)

View file

@ -76,7 +76,7 @@ func (s *NgxServer) parseDirective(d NgxDirective) {
return
}
regExp := regexp.MustCompile("(\\S+?)\\s+?{?(.+?)[;|}]")
regExp := regexp.MustCompile("(\\S+?)\\s+?{?(.+)[;|}]")
matchSlice := regExp.FindAllStringSubmatch(str, -1)
for k, v := range matchSlice {