<a name='post-#{post.id}'></a>
<tr id='post_<%= post.id %>' class='post <%= cycle('odd', 'even') -%>'>
  <%= render :partial => 'forem/posts/user_details', :locals => { :user => post.user } %>

  <td class='contents'>
    <time datetime="<%= post.created_at.to_s(:db) -%>"><%= time_ago_in_words(post.created_at) -%> ago</time>
    <div class='text'>
      <%= forem_markdown(post.text) %>
    </div>

    <% if post.reply_to %>
      <%= link_to "In reply to #{post.reply_to.user}", "#post-#{post.reply_to.id}" %>
    <% end %>

    <ul class='actions'>
      <% if current_user %>
        <% if @topic.can_be_replied_to? %>
          <li><%= link_to "Reply", new_topic_post_path(@topic, :reply_to_id => post.id) %></li>
        <% end %>
        <li><%= link_to "Delete", topic_post_path(@topic, post), :method => :delete, :confirm => "Are you sure?" %></li>
      <% end %>
    </ul>
  </td>
</tr>

<a name='post-<%= post.id %>'></a>
<tr id='post_<%= post.id %>' class='post <%= cycle('odd', 'even') -%>'>
  <%= render :partial => 'forem/posts/user_details', :locals => { :user => post.user } %>

  <td class='contents'>
    <time datetime="<%= post.created_at.to_s(:db) -%>"><%= time_ago_in_words(post.created_at) -%> ago</time>
    <div class='text'>
      <%= forem_markdown(post.text) %>
    </div>

    <% if post.reply_to %>
      <%= link_to "In reply to #{post.reply_to.user}", "#post-#{post.reply_to.id}" %>
    <% end %>

    <ul class='actions'>
      <% if current_user %>
        <% if @topic.can_be_replied_to? %>
          <li><%= link_to "Reply", new_topic_post_path(@topic, :reply_to_id => post.id) %></li>
        <% end %>
        <li><%= link_to "Delete", topic_post_path(@topic, post), :method => :delete, :confirm => "Are you sure?" %></li>
      <% end %>
    </ul>
  </td>
</tr>

Use ERB tags, not interpolation for post.id
Use ERB tags, not interpolation for post.id
