chore: 将 Impeccable 更新到 4.8.0
This commit is contained in:
@@ -109,6 +109,25 @@ border-inline-end: 1px solid; /* Not border-right */
|
||||
[dir="rtl"] .arrow { transform: scaleX(-1); }
|
||||
```
|
||||
|
||||
**Arabic-script specifics** (Arabic, Persian, Urdu, Pashto, Kurdish):
|
||||
- Preserve Zero-Width Non-Joiner (U+200C). Persian and Kurdish use ZWNJ between compound-word parts to break cursive joining while keeping the word together. A filter or sanitizer that strips it changes meaning. Never normalize it away.
|
||||
- Handle Yeh and Kaf variants. Persian uses ی (U+06CC) and ک (U+06A9), while Arabic uses ي (U+064A) and ك (U+0643). Preserve the original form in storage. For search and validation, treat the corresponding letters as equivalent so that Arabic-keyboard input matches Persian text. Rejecting one variant locks out users whose keyboard sends the other.
|
||||
- Support locale-aware digits. Persian (`fa-IR`) and Arabic locales use Eastern Arabic-Indic numerals (۰-۹ and ٠-٩). Use `Intl.NumberFormat` with the correct locale rather than hardcoding Western digits.
|
||||
|
||||
```javascript
|
||||
// ✅ Locale-aware digit formatting
|
||||
new Intl.NumberFormat('fa-IR').format(1234); // ۱٬۲۳۴
|
||||
new Intl.NumberFormat('ar-SA').format(1234); // ١٬٢٣٤
|
||||
```
|
||||
|
||||
- Respect calendar systems. Persian users expect the Solar Hijri (Jalali) calendar; many Arabic-speaking users expect the Hijri (Islamic) calendar. Use `Intl.DateTimeFormat` with the appropriate locale or calendar parameter.
|
||||
|
||||
```javascript
|
||||
// ✅ Locale-appropriate calendar
|
||||
new Intl.DateTimeFormat('fa-IR').format(new Date());
|
||||
new Intl.DateTimeFormat('ar-SA-u-ca-islamic').format(new Date());
|
||||
```
|
||||
|
||||
**Character set support**:
|
||||
- Use UTF-8 encoding everywhere
|
||||
- Test with Chinese/Japanese/Korean (CJK) characters
|
||||
|
||||
Reference in New Issue
Block a user