Skip to content

Commit

Permalink
Replace similar characters
Browse files Browse the repository at this point in the history
In french, it is better to use ’ instead of ' in many sentences (eg: l’)
Can be extended later with other terms if needed
  • Loading branch information
mart-e committed Apr 13, 2024
1 parent 3a19408 commit 407858a
Showing 1 changed file with 6 additions and 0 deletions.
6 changes: 6 additions & 0 deletions app.js
Original file line number Diff line number Diff line change
Expand Up @@ -307,6 +307,12 @@ var ngramTypeConfig = {

// Remove spaces at starting of the phrase
var typedPhrase = this.typedPhrase.trimStart();
var substitutions = [
["’", "'"],
];
for (var subst of substitutions) {
typedPhrase = typedPhrase.replace(subst[0], subst[1]);
}
if (!typedPhrase.length) {
return;
}
Expand Down

0 comments on commit 407858a

Please sign in to comment.