diff --git a/pokedex/roomaji.py b/pokedex/roomaji.py index 5844a36..bb722b7 100644 --- a/pokedex/roomaji.py +++ b/pokedex/roomaji.py @@ -98,9 +98,9 @@ class Romanizer(object): if last_kana == 'sokuon': if kana[0] in vowels: - raise ValueError("Sokuon cannot precede a vowel.") - - characters.append(kana[0]) + characters.append("'") + else: + characters.append(kana[0]) elif last_kana == 'n' and kana[0] in vowels: characters.append("'") diff --git a/pokedex/tests/test_roomaji.py b/pokedex/tests/test_roomaji.py index 2ac08c1..c4c952a 100644 --- a/pokedex/tests/test_roomaji.py +++ b/pokedex/tests/test_roomaji.py @@ -25,6 +25,7 @@ import pokedex.roomaji (u'ラティアス', 'ratiasu'), (u'ウィー', 'wii'), (u'セレビィ', 'sereby'), + (u'ウッウ', u"u'u"), ] ) def test_roomaji(kana, roomaji): @@ -52,6 +53,7 @@ def test_roomaji(kana, roomaji): (u'ラティアス', u'ratiasu'), (u'ウィー', u'wí'), (u'セレビィ', u'serebí'), + (u'ウッウ', u"u'u"), ] ) def test_roomaji_cs(kana, roomaji):