ikayzo/mojinizer — pull request #6 by johnnyshields (2014-05-31 07:58:25+00:00)
Title: Add `.kana_to_roma` method to prevent `.romaji` from modifying pre-existing alpha chars in a string

I found an edge-case where the `.romaji` method can affect some pre-existing alpha chars in the string, for example two consective `n`s become a single `n`. (There are a few other cases as well).

```
"runner ツクエ".romaji #=> "runer tsukue"
```

To workaround this, I added a new method `.kana_to_roma` which breaks up the string into kana and non-kana chunks, and calls `.romaji` only on the kana chunks.

```
"runner ツクエ".kana_to_roma #=> "runner tsukue"
```

I think it might actually be better to make this the behavior of the `.romaji` method itself, as in nearly every case I'd think users wouldn't want to affect existing alpha chars.

I think we need to do something here because current behavior is unexpected--I was actually calling it on email addresses to sanitize them, and it was breaking the emails! **Please let me know your thoughts.**