Open
Description
At line 328, the longkey
maybe wrong in further iterations.
For example: if the tokens
is {'is', 'match', 'error'}
, the longkey
variable will be match_match_error
at the second iteration in the inner while loop. So it may fail to get the longest matching key when the key has three or more words.
Here is the potential fix which I brought up:
- longkey = (token .. '_' .. key)
+ longkey = i > 1 and (tokens[i-1] .. '_' .. key) or key
Metadata
Assignees
Labels
No labels