hepburn icon indicating copy to clipboard operation
hepburn copied to clipboard

cleanRomaji breaks valid double N notation

Open risseraka opened this issue 4 years ago • 1 comments

Hi there,

This might be an unresolvable issue, but here goes.

Cleaning valid romaji breaks it.

E.g.:

toHiragana(cleanRomaji("DANNA"))
// DAN'A
// だんあ wrong
toHiragana("DANNA")
// DANNA
// だんな correct

I understand that the rationale behind the following code is to correct outdated writing of romaji

// Convert the NN form into the more common N'
str = str.replace(/NN/g, "N'");

but then, how was 旦那 (husband) written? DANNNA?

WDYT?

risseraka avatar Apr 04 '20 16:04 risseraka

/cc @jeresig who originally contributed this useful feature and may have suggestions.

lovell avatar Apr 11 '20 09:04 lovell