%h2== Search for "#{h(@query)}" (#{@search.total_entries} results)
-if @correction
  == Did you mean #{@correction}?
-unless @search.any?
  %em No results found.
-@search.each do |result|
  %p
    -if result.instance_of? Channel
      -channel = result
      =link_to "Channel Title: #{channel.title}", channel_path(channel)
    -elsif result.instance_of? Post
      -post = result
      -post_link = channel_path(post.channel, :anchor => "post_#{post.id}")
      =link_to "Channel Title: #{post.channel.title}", post_link
      %br/
      =link_to "Post: #{highlight_results h(post.body), @query}".html_safe, post_link
      ==by #{user_name(post.channel.user)}
=will_paginate(@search)

.block
  %h2== Search for "#{h(@query)}" (#{@search.total_entries} results)
  -if @correction
    == Did you mean #{@correction}?
  -unless @search.any?
    %em No results found.
  -@search.each do |result|
    %p
      -if result.instance_of? Channel
        -channel = result
        =link_to "Channel Title: #{channel.title}", channel_path(channel)
      -elsif result.instance_of? Post
        -post = result
        -post_link = channel_path(post.channel, :anchor => "post_#{post.id}")
        =link_to "Channel Title: #{post.channel.title}", post_link
        %br/
        =link_to "Post: #{highlight_results h(post.body), @query}".html_safe, post_link
        ==by #{user_name(post.channel.user)}
  =will_paginate(@search)

Put search results inside block
Put search results inside block
