From ff359a3fc8d055a883bbef439be3796a6df08f10 Mon Sep 17 00:00:00 2001 From: Zed Date: Fri, 18 Oct 2019 00:54:22 +0200 Subject: [PATCH] Support bidirectional text Fixes #76 --- src/sass/tweet/_base.scss | 1 - src/views/profile.nim | 3 ++- src/views/timeline.nim | 2 +- src/views/tweet.nim | 2 +- 4 files changed, 4 insertions(+), 4 deletions(-) diff --git a/src/sass/tweet/_base.scss b/src/sass/tweet/_base.scss index c9c6cfc..46319e2 100644 --- a/src/sass/tweet/_base.scss +++ b/src/sass/tweet/_base.scss @@ -19,7 +19,6 @@ font-family: $font_3; line-height: 1.4em; pointer-events: all; - display: inline; } .tweet-header { diff --git a/src/views/profile.nim b/src/views/profile.nim index 18b215a..6e0703b 100644 --- a/src/views/profile.nim +++ b/src/views/profile.nim @@ -25,7 +25,8 @@ proc renderProfileCard*(profile: Profile; prefs: Prefs): VNode = tdiv(class="profile-card-extra"): if profile.bio.len > 0: tdiv(class="profile-bio"): - p: verbatim replaceUrl(profile.bio, prefs) + p(dir="auto"): + verbatim replaceUrl(profile.bio, prefs) if profile.location.len > 0: tdiv(class="profile-location"): diff --git a/src/views/timeline.nim b/src/views/timeline.nim index 023ab7b..b8fa5b6 100644 --- a/src/views/timeline.nim +++ b/src/views/timeline.nim @@ -59,7 +59,7 @@ proc renderUser(user: Profile; prefs: Prefs): VNode = linkUser(user, class="fullname") linkUser(user, class="username") - tdiv(class="tweet-content media-body"): + tdiv(class="tweet-content media-body", dir="auto"): verbatim replaceUrl(user.bio, prefs) proc renderTimelineUsers*(results: Result[Profile]; prefs: Prefs; path=""): VNode = diff --git a/src/views/tweet.nim b/src/views/tweet.nim index ac0c167..6551dc6 100644 --- a/src/views/tweet.nim +++ b/src/views/tweet.nim @@ -247,7 +247,7 @@ proc renderTweet*(tweet: Tweet; prefs: Prefs; path: string; class=""; if index == 0 and tweet.reply.len > 0: renderReply(tweet) - tdiv(class="tweet-content media-body"): + tdiv(class="tweet-content media-body", dir="auto"): verbatim replaceUrl(tweet.text, prefs) if tweet.quote.isSome: