fix: 解决网站配置文件更新之后参数丢失的问题 (#4231)

Refs https://github.com/1Panel-dev/1Panel/issues/4171
This commit is contained in:
zhengkunwang 2024-03-19 13:50:06 +08:00 committed by GitHub
parent 0e159f944a
commit d916f2ba6f
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194
2 changed files with 3 additions and 3 deletions

View File

@ -61,7 +61,7 @@ func NewParserFromLexer(lexer *lexer) *Parser {
parser.directiveWrappers = map[string]func(*components.Directive) components.IDirective{
"server": func(directive *components.Directive) components.IDirective {
return parser.parseUpstreamServer(directive)
return parser.wrapServer(directive)
},
}
@ -113,7 +113,7 @@ parsingloop:
case p.curTokenIs(flag.LuaCode):
context.IsLuaBlock = true
context.LiteralCode = p.currentToken.Literal
case p.curTokenIs(flag.Keyword):
case p.curTokenIs(flag.Keyword) || p.curTokenIs(flag.QuotedString):
s, err := p.parseStatement()
if err != nil {
return nil, err

View File

@ -390,7 +390,7 @@ const changeTag = (key: string) => {
searchReq.tags = [key];
}
const index = tags.value.findIndex((tag) => tag.key === key);
if (index > 5) {
if (index > 6) {
moreTag.value = key;
} else {
moreTag.value = '';