qmk-keymap icon indicating copy to clipboard operation
qmk-keymap copied to clipboard

Autocorrect apostrophes not respecting colon

Open ochief opened this issue 2 years ago • 1 comments

If you include a colon in front of a word in the dictionary it correctly only modifies the word if that word has a 'word break' in front of it. For words with an apostrophe it seems to ignore the word break.

Repro steps;

  1. Add the following to autocorrection_dict.txt

:htere -> there :cant -> can't

  1. Run the python file and compile firmware

  2. Type " htere"

     Expected result: there
     Actual result: there
     Result: WORKING
    
  3. Type "testhtere"

    Expected result: testhtere
    Actual result: testhtere
    Result: WORKING
    
  4. Type " cant"

    Expected result: can't
    Actual result: can't
    Result: WORKING
    
  5. Type " testcant"

    Expected result: testcant
    Actual result: testcan't
    Result: BROKEN
    

ochief avatar Jul 04 '22 10:07 ochief

Thanks for the report! I appreciate the clear examples.

I haven't been able to reproduce the bug yet, unfortunately. I tried appending

:htere -> there
:cant -> can't

to my dictionary, and also tried a dictionary containing only those two entries, yet typing "testcant" isn't triggering autocorrection.

Would you mind to share your full dictionary? (You can make attachments in this thread.) The bug is conceivably a problem in trie encoding.

Do you have special QMK features like mod-taps, Tap Dance, Auto Shift, etc. active on the keys C, A, N, T? Interoperating with QMK's features can be tricky.

getreuer avatar Jul 08 '22 16:07 getreuer