From ae72a9382dd28f8687a745b1cd0d04edc2536ec6 Mon Sep 17 00:00:00 2001 From: "behrooz shabani (everplays)" Date: Sun, 31 Jul 2011 19:50:03 +0430 Subject: [PATCH 1/2] make comments to accept rtl direction by making spans blocked --- public/stylesheets/sass/rtl.sass | 2 ++ 1 file changed, 2 insertions(+) diff --git a/public/stylesheets/sass/rtl.sass b/public/stylesheets/sass/rtl.sass index cae495675..6547d8570 100644 --- a/public/stylesheets/sass/rtl.sass +++ b/public/stylesheets/sass/rtl.sass @@ -256,3 +256,5 @@ ul.left_nav .contact_count, ul.left_nav .edit :float left :margin-right 10px +div.content span.rtl + :display block From 22bb6177d47a8c9cab45f5c218e374ca34194796 Mon Sep 17 00:00:00 2001 From: "behrooz shabani (everplays)" Date: Sat, 10 Sep 2011 16:14:30 +0430 Subject: [PATCH 2/2]

can't be inside another one - breaks direction detection we are applying direction of content on

& markdownify always generates a

so we have something like

...

but paragraph can't be inside another paragraph & browsers sees something like

...

so applied direction will be ignored --- app/views/comments/_comment.mobile.haml | 2 +- app/views/messages/_message.haml | 2 +- app/views/status_messages/_status_message.haml | 2 +- 3 files changed, 3 insertions(+), 3 deletions(-) diff --git a/app/views/comments/_comment.mobile.haml b/app/views/comments/_comment.mobile.haml index 19738dc6b..b563dfbff 100644 --- a/app/views/comments/_comment.mobile.haml +++ b/app/views/comments/_comment.mobile.haml @@ -14,6 +14,6 @@ .content .from = person_link(comment.author) - %p{ :class => direction_for(comment.text) } + %div{ :class => direction_for(comment.text) } = markdownify(comment, :youtube_maps => comment[:youtube_titles]) diff --git a/app/views/messages/_message.haml b/app/views/messages/_message.haml index 7b5ff3264..de27244cc 100644 --- a/app/views/messages/_message.haml +++ b/app/views/messages/_message.haml @@ -11,6 +11,6 @@ %time.timeago{:datetime => message.created_at} = how_long_ago(message) - %p{ :class => direction_for(message.text) } + %div{ :class => direction_for(message.text) } = markdownify(message) diff --git a/app/views/status_messages/_status_message.haml b/app/views/status_messages/_status_message.haml index 73b43c248..c0d0dfbb4 100644 --- a/app/views/status_messages/_status_message.haml +++ b/app/views/status_messages/_status_message.haml @@ -15,5 +15,5 @@ - for photo in photos[1..photos.size] = link_to (image_tag photo.url(:thumb_small), :class => 'stream-photo thumb_small', 'data-small-photo' => photo.url(:thumb_medium), 'data-full-photo' => photo.url), photo_path(photo), :class => 'stream-photo-link' -%p{:class => direction_for(post.text)} +%div{:class => direction_for(post.text)} != markdownify(post, :youtube_maps => post[:youtube_titles])