From f8d53de1fea82a4fa5698a6d5501ca34a0677d65 Mon Sep 17 00:00:00 2001 From: Andy Wortman Date: Wed, 15 Nov 2017 23:17:57 -0800 Subject: 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. --- src/tw/mod.rs | 14 -------------- 1 file changed, 14 deletions(-) (limited to 'src/tw/mod.rs') 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) .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 } -- cgit v1.1