Commit 0cd724a
fix: compare() 未处理多音调汉字的正确排序权重(如“暗”错排在“安”之前),建议改用 STYLE_TONE2 进行底层比较 (#420)
* Update pinyin comparison to use TONE2 style
* Update packages/pinyin/src/PinyinBase.ts
Co-authored-by: gemini-code-assist[bot] <176961590+gemini-code-assist[bot]@users.noreply.github.com>
* Refactor compare method for pinyin comparison
Refactor compare method to use arrays instead of joined strings for pinyin comparison.
* Add test for sorting Chinese characters with tones
* Convert pinyinA and pinyinB to strings for comparison
---------
Co-authored-by: gemini-code-assist[bot] <176961590+gemini-code-assist[bot]@users.noreply.github.com>1 parent 6e9354d commit 0cd724a
2 files changed
+8
-2
lines changed| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
276 | 276 | | |
277 | 277 | | |
278 | 278 | | |
279 | | - | |
280 | | - | |
| 279 | + | |
| 280 | + | |
281 | 281 | | |
282 | 282 | | |
283 | 283 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
367 | 367 | | |
368 | 368 | | |
369 | 369 | | |
| 370 | + | |
| 371 | + | |
| 372 | + | |
| 373 | + | |
| 374 | + | |
| 375 | + | |
370 | 376 | | |
371 | 377 | | |
372 | 378 | | |
| |||
0 commit comments