jj-tetraquark / wanikani-burn

Adds a space on the wanikani dash that reviews random burned items
4 stars 2 forks source link

Allow auto-correction of "n" to "ん" at end of input for Reading quiz #19

Closed gremlinn closed 7 years ago

gremlinn commented 7 years ago

Minor enhancement request, but it'd be great (to speed up quizzes) if, when processing the input for a Reading quiz, any input string ending in "n" would have this automatically replaced this with kana "ん" (as WaniKani does in reviews). image

DJTB commented 7 years ago

From kaniwani

function addTerminalN(str = '') {
  return /n/i.test(str.slice(-1)) ? `${str.slice(0, -1)}ん` : str;
}

:)

jj-tetraquark commented 7 years ago

Yeah that'd do it :) If you want to submit a pull request I'll happily merge it in.