Skip to content

Commit ebda10e

Browse files
committed
Fix: If dictionary entries exist multiple times in source file, keep only the highest-rating entry
1 parent ccecc18 commit ebda10e

File tree

4 files changed

+25
-23
lines changed

4 files changed

+25
-23
lines changed

data-scripts/build_frequency_lists.py

+2
Original file line numberDiff line numberDiff line change
@@ -56,6 +56,8 @@ def parse_frequency_lists(data_dir):
5656
for i, line in enumerate(f):
5757
rank = i + 1 # rank starts at 1
5858
token = line.split()[0]
59+
if token in token_to_rank: # do not overwrite if already exists
60+
continue
5961
token_to_rank[token] = rank
6062
freq_lists[freq_list_name] = token_to_rank
6163
for freq_list_name in DICTIONARIES:

dist/zxcvbn.js

+11-11
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

dist/zxcvbn.js.map

+1-1
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

src/frequency_lists.coffee

+11-11
Large diffs are not rendered by default.

0 commit comments

Comments
 (0)