Skip to content

Commit

Permalink
Merge branch 'pierre-24:dev' into fix-phys-rev-e
Browse files Browse the repository at this point in the history
  • Loading branch information
klb2 authored Jul 8, 2024
2 parents e2958c6 + 045bcd1 commit 6817f14
Showing 1 changed file with 3 additions and 0 deletions.
3 changes: 3 additions & 0 deletions pyiso4/ltwa.py
Original file line number Diff line number Diff line change
Expand Up @@ -177,6 +177,9 @@ def match_capitalization_and_diacritic(abbrv: str, original: str) -> str:
"""Matches the capitalization and diacritics of the `original` word, as long as they are similar
"""

if len(abbrv) > len(original):
abbrv = abbrv[:len(original)]

normalized_abbrv = list(normalize(abbrv, Level.SOFT))
for i, c in enumerate(normalized_abbrv):
unided = unidecode(original[i])
Expand Down

0 comments on commit 6817f14

Please # to comment.