diff options
author | Andy Wortman <ixineeringeverywhere@gmail.com> | 2017-11-15 23:17:57 -0800 |
---|---|---|
committer | Andy Wortman <ixineeringeverywhere@gmail.com> | 2017-11-15 23:17:57 -0800 |
commit | f8d53de1fea82a4fa5698a6d5501ca34a0677d65 (patch) | |
tree | e9391245af9a8c03827270ae5301b0c325a1e2e6 /src/tw/mod.rs | |
parent | 66cb9a132ca6d61a2d6a5874ea3aaf14a812f948 (diff) |
move line wrapping into render_twete
this is, hopefully, the start of support for correctly wrapping lines
with ANSI control codes included. additionally, hopefully the start of
supporting coloring @'s in tweets.
Diffstat (limited to 'src/tw/mod.rs')
-rw-r--r-- | src/tw/mod.rs | 14 |
1 files changed, 0 insertions, 14 deletions
diff --git a/src/tw/mod.rs b/src/tw/mod.rs index 08ec974..7024260 100644 --- a/src/tw/mod.rs +++ b/src/tw/mod.rs @@ -78,20 +78,6 @@ pub fn full_twete_text(twete: &serde_json::map::Map<String, serde_json::Value>) .replace(">", ">") .replace("<", "<"); - for url in twete["entities"]["urls"].as_array().unwrap() { - let display_url = url["url"].as_str().unwrap(); - let expanded_url = url["expanded_url"].as_str().unwrap(); - if expanded_url.len() < 200 { - if let Some(twid) = quoted_tweet_id { - if expanded_url.ends_with(twid) { - twete_text = twete_text.replace(display_url, ""); - continue; - } - } - twete_text = twete_text.replace(display_url, expanded_url); - } - } - twete_text } |