From 22bb6177d47a8c9cab45f5c218e374ca34194796 Mon Sep 17 00:00:00 2001 From: "behrooz shabani (everplays)" Date: Sat, 10 Sep 2011 16:14:30 +0430 Subject: [PATCH]

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])