style(sub): simplify a negated conjunction to satisfy staticcheck QF1001

golangci-lint (staticcheck QF1001) flagged the `!(a && b)` guard in
expandSegment. Rewrite it via De Morgan's law to the equivalent
`!a || !b` form so the linter passes; behavior is unchanged.
This commit is contained in:
MHSanaei
2026-07-15 13:34:14 +02:00
parent 325550e57f
commit a862680645
+1 -1
View File
@@ -135,7 +135,7 @@ func expandSegment(seg string, ctx remarkContext) (string, bool) {
hasToken = true
token := m[2 : len(m)-2]
val := remarkVarValue(token, ctx)
if val != "" && !(unlimitedDropTokens[token] && val == unlimitedMark) {
if val != "" && (!unlimitedDropTokens[token] || val != unlimitedMark) {
hasOtherValue = true
}
return val