fix: cut tweet text by code points, not UTF-16 units

This commit is contained in:
2026-08-04 23:45:54 +08:00
parent f4e60d8946
commit 2faccaac42
2 changed files with 9 additions and 13 deletions
+1 -1
View File
@@ -10,7 +10,7 @@ pub struct SyndicationTweet {
#[serde(default)]
pub possibly_sensitive: Option<bool>,
/// Visible-text span; the raw `text` field has the appended media short
/// link after it. Indices are UTF-16 code units.
/// link after it. Indices are Unicode code points (not UTF-16 units).
#[serde(default, rename = "display_text_range")]
pub display_text_range: Option<[usize; 2]>,
#[serde(default)]