Rewrite text parsing to ensure correctness

This commit is contained in:
Zed
2019-10-09 16:06:51 +02:00
parent 83a651e732
commit 7b766b793b
7 changed files with 47 additions and 100 deletions

View File

@@ -215,7 +215,7 @@ proc renderQuote(quote: Quote; prefs: Prefs): VNode =
renderReply(quote)
tdiv(class="quote-text"):
verbatim linkifyText(quote.text, prefs)
verbatim replaceUrl(quote.text, prefs)
if quote.hasThread:
a(class="show-thread", href=getLink(quote)):
@@ -248,7 +248,7 @@ proc renderTweet*(tweet: Tweet; prefs: Prefs; path: string; class="";
renderReply(tweet)
tdiv(class="tweet-content media-body"):
verbatim linkifyText(tweet.text, prefs)
verbatim replaceUrl(tweet.text, prefs)
if tweet.quote.isSome:
renderQuote(tweet.quote.get(), prefs)