Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

toKana() seems to not allow combinations んや んゆ んよ #111

Open
1 task done
Tommi377 opened this issue May 6, 2021 · 2 comments
Open
1 task done

toKana() seems to not allow combinations んや んゆ んよ #111

Tommi377 opened this issue May 6, 2021 · 2 comments

Comments

@Tommi377
Copy link

Tommi377 commented May 6, 2021

Issue Type

Description

The current behaviour is:
String: nnya, ToKana: んにゃ
String: nnyo, ToKana: んにょ
String: nnyu, ToKana: んにゅ

On the Google IME expected behaviour is:
String: nnya, ToKana: んや
String: nnyo, ToKana: んよ
String: nnyu, ToKana: んゆ

There doesn't seem to be a way to generate those kanas with the ToKana method

Steps to reproduce

Use the ToKana method in node and type nny + (a or o or u)

Versions

  • Browser: node v10.14.2
  • OS/Device: Windows 10
  • Keyboard/Input Method: romaji
@Tommi377
Copy link
Author

Tommi377 commented May 7, 2021

fixed this by adding { customKanaMapping: { nn: 'ん' }}. Shouldn't this be default behaviour?

@esnaultdev
Copy link
Contributor

I think that you're looking for toKana(input, { IMEMode: true}).
As documented here, IME mode is turned off by default and needs to be activated to match your expectations.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants