From 97739aa87068d07483e44ed0903da75e16d5ba6e Mon Sep 17 00:00:00 2001 From: Yuval Adam <_@yuv.al> Date: Sun, 27 Nov 2022 14:23:07 +0200 Subject: Normalize unicode chars in render_link comparison --- build.py | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) (limited to 'build.py') diff --git a/build.py b/build.py index 60d987d..3fc2b53 100644 --- a/build.py +++ b/build.py @@ -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: -- cgit v1.3.1