This commit is contained in:
Timothee Cour 2021-04-19 19:02:52 -07:00 • committed by GitHub
commit ad67bcf379
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
5 changed files with 9 additions and 16 deletions

View file

@ -112,7 +112,7 @@ proc getTokenLenFromSource(conf: ConfigRef; ident: string; info: TLineInfo): int
if ident[^1] == '=' and ident[0] in linter.Letters:
if sourceIdent != "=":
result = 0
elif sourceIdent.len > ident.len and sourceIdent[..ident.high] == ident:
elif sourceIdent.len > ident.len and sourceIdent[0..ident.high] == ident:
result = ident.len
elif sourceIdent != ident:
result = 0