Don't attempt to extract keywords that don't entirely match word token (#505)

This commit is contained in:
Max Brunsfeld 2019-12-11 17:18:15 -08:00 committed by GitHub
parent e313f981a2
commit 1b5ae380ce
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
2 changed files with 35 additions and 7 deletions

View file

@ -271,6 +271,7 @@ fn identify_keywords(
cursor.reset(vec![variable.start_state]);
if all_chars_are_alphabetical(&cursor)
&& token_conflict_map.does_match_same_string(i, word_token.index)
&& !token_conflict_map.does_match_different_string(i, word_token.index)
{
info!(
"Keywords - add candidate {}",