<% content_for :sidebar do %>
  <%= render "sidebar" %>
<% end %>

<%= markdown(@document) %>

<% content_for :sidebar do %>
  <%= render "sidebar" %>
<% end %>

<%= simple_format(@document) %>

Use simple_format instead of markdown.
Use simple_format instead of markdown.
