Przeglądaj źródła

Support bidirectional text

Fixes #76
Zed 6 lat temu
rodzic
commit
ff359a3fc8

+ 0 - 1
src/sass/tweet/_base.scss

@@ -19,7 +19,6 @@
     font-family: $font_3;
     line-height: 1.4em;
     pointer-events: all;
-    display: inline;
 }
 
 .tweet-header {

+ 2 - 1
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"):

+ 1 - 1
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 =

+ 1 - 1
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: