diff options
| author | Yuval Adam <_@yuv.al> | 2022-11-27 14:23:07 +0200 |
|---|---|---|
| committer | Yuval Adam <_@yuv.al> | 2022-11-27 14:23:07 +0200 |
| commit | 97739aa87068d07483e44ed0903da75e16d5ba6e (patch) | |
| tree | 305f550e2f4844084f3acdc202e0bbb4c8a735c7 /build.py | |
| parent | cd6f1129c398a29ab6a43d8706363a8f0210507c (diff) | |
Normalize unicode chars in render_link comparison
Diffstat (limited to 'build.py')
| -rw-r--r-- | build.py | 5 |
1 files changed, 3 insertions, 2 deletions
@@ -4,6 +4,7 @@ from jinja2 import Environment, PackageLoader, select_autoescape from os import listdir, mkdir from pathlib import Path from shutil import copyfile +from unidecode import unidecode ROOT_PATH = Path(__file__).parent @@ -45,8 +46,8 @@ candidates = list(sorted(candidates, key=lambda x: x["domain"])) def render_link(value, classes): - name = value["name"].lower().split(" ") - domain = value["domain"].replace(".", "") + name = unidecode(value["name"]).lower().split(" ") + domain = unidecode(value["domain"]).replace(".", "") res = [] for part in name: if part == domain: |
