From 6599bbd286e81c0e8fff756777afeaf45d216994 Mon Sep 17 00:00:00 2001 From: David Caron Date: Mon, 18 Jun 2018 11:48:14 -0400 Subject: [PATCH] use unidecode instead of replacing individual characters --- generators/utils.py | 7 ++----- requirements_dev.txt | 1 + 2 files changed, 3 insertions(+), 5 deletions(-) diff --git a/generators/utils.py b/generators/utils.py index f3d9923..1e4ab56 100644 --- a/generators/utils.py +++ b/generators/utils.py @@ -2,6 +2,7 @@ from collections import OrderedDict from os.path import join from typing import List +from unidecode import unidecode from inflection import camelize @@ -145,12 +146,8 @@ def clean_doxygen(doxygen): ("}", ""), ("", ""), ("", ""), - ("≥", ">="), - ("ü", "u"), - ("–", "-"), - ("fi", "fi"), - ("Ž", ""), # invisible character in fast_bilateral_filter.h "FrŽdo Durand"[2] (no kidding) ] for k, v in replace: doxygen = doxygen.replace(k, v) + doxygen = unidecode(doxygen) return doxygen diff --git a/requirements_dev.txt b/requirements_dev.txt index d36dfd3..05895fd 100644 --- a/requirements_dev.txt +++ b/requirements_dev.txt @@ -2,6 +2,7 @@ pybind11>=2.3dev PyYAML CppHeaderParser==2.7.3.1 inflection +unidecode # vtk==8.1 # install from conda pytest \ No newline at end of file