bug(core): LDML processor does not match spec for priority of reordering rules
- Dominant language
- Pascal
- Stars
- 534
- Forks
- 143
- Avg merge
- 2d 10h
- Merged PRs (30d)
- 113
Description
From @miloush via keyboard-sc WG email:
> I did some comparison between Microsoft’s, Keyman’s and Martin’s implementations.
Priority of reordering rules: The spec says “ elements are priority ordered based first on the length of string their `@from` attribute value matches and then the sum of the lengths of the strings their `@before` attribute value matches.”. I have to admit I don’t understand the sum business. Keyman seems to be prioritizing based on element count at load time, and ignores before completely? My implementation does the matching first, so that it can apply the rules based on the length match, first based on `@from`, then on the whole including `@before` (my interpretation of the sum). The spec does not say whether `@before` allows regex or just elements like from or what.
The spec technically does not say whether shorter or longer are higher priority, but more importantly what should be done in case of a tie is not specified, especially as “the relative ordering of elements is not significant”.
Contributor guide
Assessment
This issue has not been assessed yet.