serenadeai / serenade

Apache License 2.0
317 stars 57 forks source link

Special characters split a word into several words #8

Open erreurBarbare opened 2 years ago

erreurBarbare commented 2 years ago

First of all: I really love Serenade! Is so easy to use and I can relax my aching hands. Thank you so much for that.

System Information

Serenade Version: v2.0.1

OS and Version: Windows Version 10.0.19043 Build 19043

Application: Chrome, VS Code

Issue Description

In German, words may contain umlauts (äöü). Serenade does recognize them as separate words, such as other special characters (e.g. $, ., etc.). Thus, commands such as 'call write 5 words' or 'delete 3 words' does actually delete less words than indicated.

How to Reproduce

(I tried with Chrome and VS Code)

  1. Insert this text: 'Ich bin glücklich.'
  2. Use the command 'go left 1 word' 3 times

Result: as characters are recognized as separate words, a word with a umlaut will be recognized as multiple words

MattWiethoff commented 2 years ago

Thanks for the report. The fix is likely just going to be updating this regex and the corresponding yaml tests: https://github.com/serenadeai/serenade/blob/96d1ae2cb30e318bfe84069d82a550043f2f5b19/core/src/main/java/core/selector/SelectorMap.java#L469

erreurBarbare commented 12 months ago

Tests: https://github.com/serenadeai/serenade/blob/master/core/src/test/resources/base.yaml#L600