wikimedia/jquery.ime

Cannot write "Sri Lanka" in Sinhala si-singlish

Closed this issue · 1 comments

divec commented

Steps to reproduce:

  1. Choose si-singlish (i.e. choose සිංහල then සිංග්ලිෂ්)
  2. Press 's', 'h', 'r'. The input becomes ශ්‍ර (i.e. combined 'shr', which is correct)
  3. Press 'i'. Then press 'i' again.

Observed behaviour:
The input becomes ශ්‍රඉ (i.e. combined 'shr' followed by separate 'i') then ශ්‍රඊ (i.e. combined 'shr' followed by combined 'ii').

Expected behaviour:
The input should become ශ්‍රි (i.e. combined 'shri') then ශ්‍රී (i.e. combined 'shrii').

Reason:
The value of maxKeyLength in rules/si/si-singlish.js is too low: it is 2 but should be 5. Therefore too little prior text is captured, so the regexes for 'shri' and 'shrii' cannot ever match.

divec commented

Fixed by 28b52b9