Skip to content

Commit 0ad6b7f

Browse files
authored
Unicode sequence normalization (#24)
* normalize the unicode sequence before looping over characters * remove console log * bump version * use nfkc
1 parent f7399dd commit 0ad6b7f

File tree

2 files changed

+8
-3
lines changed

2 files changed

+8
-3
lines changed
Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
11
{
22
"name": "@taskbase/angular-keyboard",
3-
"version": "0.0.10"
4-
}
3+
"version": "0.0.11"
4+
}

projects/angular-keyboard/src/lib/fake-input/fake-input.component.ts

Lines changed: 6 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -89,7 +89,12 @@ export class FakeInputComponent implements OnInit, OnDestroy {
8989
ngOnInit() {
9090
this.registerInputField();
9191
this.chars = this.initialText
92-
.split('').map(char => {
92+
// We want the text to use canonical composition of special symbols like
93+
// german umlaute and avoid treating the combining diaeresis character
94+
// separately.
95+
.normalize("NFKC")
96+
.split('')
97+
.map(char => {
9398
return {
9499
char
95100
};

0 commit comments

Comments
 (0)