chore: formatting

This commit is contained in:
Aurelien Brabant 2024-07-06 00:23:06 +02:00
parent 2fcf3a0e6f
commit cee1eebc2d
No known key found for this signature in database
GPG key ID: 5F90C2579402FCFA
2 changed files with 9 additions and 12 deletions

View file

@ -575,17 +575,15 @@ CParseResult CConfig::parseLine(std::string line, bool dynamic) {
while ((colon = h.name.find(":", idx)) != std::string::npos && impl->categories.size() > depth) {
auto actual = h.name.substr(idx, colon - idx);
if (actual != impl->categories[depth]) {
if (actual != impl->categories[depth])
break;
}
idx = colon + 1;
++depth;
}
if (depth != impl->categories.size() || h.name.substr(idx) != LHS) {
if (depth != impl->categories.size() || h.name.substr(idx) != LHS)
continue;
}
}
if (h.options.allowFlags && (!LHS.starts_with(h.name) || LHS.contains(':') /* avoid cases where a category is called the same as a handler */))

View file

@ -42,20 +42,19 @@ testCategory {
testValueNest = 1
nested2 {
testValueNest = 1
}
categoryKeyword = this one should not either
}
}
categoryKeyword = this one should not either
}
categoryKeyword = we are having fun
categoryKeyword = so much fun
categoryKeyword = im the fun one at parties
categoryKeyword = we are having fun
categoryKeyword = so much fun
categoryKeyword = im the fun one at parties
}
$SPECIALVAL1 = 1
special {
key = a
key = a
value = $SPECIALVAL1
}