keymanapp / keymanapp/keyman

feat(core): optimize character output to avoid deleting and reinserting identical content

Open
#14,718 0 comments 0 reactions 0 assignees View on GitHub
core/ feat
Dominant language
Pascal
Stars
534
Forks
143
Avg merge
2d 10h
Merged PRs (30d)
113

Description

Where a rule emits exactly the same characters as found in the context, it would be useful to avoid deleting and reinserting. For example the following rule should not require us to delete and reinsert `U+000A`:

```
U+000A U+094D > U+000A U+0905
```

The same applies for `context(1)`:

```
U+000A U+094D > context(1) U+0905
```

Apart from the marginal performance impact, this will increase compatibility, because we can handle control characters such as LF as shown above more seamlessly; see for example #14148 for an example of this problem.

As I currently remember it, LDML keyboards already do this, through the normalization module.

Contributor guide

Open the contributing guide

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.