Skip to content

Commit 56f530c

Browse files
committed
Added extra checks for duplicates
1 parent 78b2e2a commit 56f530c

File tree

1 file changed

+3
-0
lines changed

1 file changed

+3
-0
lines changed

mathics_scanner/build_tables.py

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -45,6 +45,7 @@ def compile_tables(data: dict) -> dict:
4545
# Conversion from WL to the fully qualified names
4646
wl_to_ascii_dict = {v["wl-unicode"]: get_plain_text(k, v, False)
4747
for k, v in data.items()}
48+
wl_to_ascii_dict = {k: v for k, v in wl_to_ascii_dict.items() if k != v}
4849
wl_to_ascii_re = re_from_keys(wl_to_ascii_dict)
4950

5051
# Conversion from wl to unicode
@@ -60,6 +61,8 @@ def compile_tables(data: dict) -> dict:
6061
for v in data.values()
6162
if "unicode-equivalent" in v
6263
and v["has-unicode-inverse"]}
64+
unicode_to_wl_dict = {k: v for k, v in unicode_to_wl_dict.items()
65+
if k != v}
6366
unicode_to_wl_re = re_from_keys(unicode_to_wl_dict)
6467

6568
# Character ranges of letterlikes

0 commit comments

Comments
 (0)