Skip to content

Commit

Permalink
use unidecode instead of replacing individual characters
Browse files Browse the repository at this point in the history
  • Loading branch information
davidcaron committed Jun 18, 2018
1 parent 13894a6 commit 6599bbd
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 5 deletions.
7 changes: 2 additions & 5 deletions generators/utils.py
Original file line number Diff line number Diff line change
Expand Up @@ -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

Expand Down Expand Up @@ -145,12 +146,8 @@ def clean_doxygen(doxygen):
("}", ""),
("<b>", ""),
("</b>", ""),
("≥", ">="),
("ü", "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
1 change: 1 addition & 0 deletions requirements_dev.txt
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,7 @@ pybind11>=2.3dev
PyYAML
CppHeaderParser==2.7.3.1
inflection
unidecode
# vtk==8.1 # install from conda

pytest

0 comments on commit 6599bbd

Please sign in to comment.