markdown optimization, few other changes
This commit is contained in:
@@ -11,7 +11,7 @@ atom_feed do |feed|
|
||||
end
|
||||
entry.url blogpost_url(post)
|
||||
entry.title post.title
|
||||
entry.content Sanitize.clean(render_md(post.content), Sanitize::Config::RELAXED).html_safe, :type => 'html'
|
||||
entry.content render_md(post.content).html_safe, :type => 'html'
|
||||
end
|
||||
end
|
||||
end
|
||||
@@ -13,7 +13,7 @@
|
||||
<div class="items">
|
||||
<div class="item content post">
|
||||
<h2 class="headline"><%= link_to truncate(p.title, length: 60, omission: " …"), p %></h2>
|
||||
<%= Sanitize.clean(render_md(p.content), Sanitize::Config::RELAXED).html_safe %>
|
||||
<%= render_md(p.content).html_safe %>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
@@ -8,7 +8,7 @@
|
||||
<div class="items">
|
||||
<div class="item content">
|
||||
<h2 class="headline"><%= link_to truncate(@post.title, length: 60, omission: " …"), p %></h2>
|
||||
<%= Sanitize.clean(render_md(@post.content), Sanitize::Config::RELAXED).html_safe %>
|
||||
<%= render_md(@post.content).html_safe %>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
@@ -6,7 +6,7 @@
|
||||
</div>
|
||||
<div class="items">
|
||||
<div class="item content">
|
||||
<%= Sanitize.clean(render_mini_md(c.content.gsub(/([\r\n]+\s*?){3,}/, "\n\n")), Sanitize::Config::BASIC).html_safe %>
|
||||
<%= render_mini_md(c.content).html_safe %>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
@@ -1,7 +1,7 @@
|
||||
<% if current_user %>
|
||||
<h3>New comment</h3>
|
||||
<%= simple_form_for [@post, @comment] do |f| %>
|
||||
<p>> quote | _underline_ | *italic* | **bold** | `code` | [link](https://example.com)
|
||||
<p><blockquote>> quote</blockquote> | _underline_ | <i>*italic*</i> | <b>**bold**</b> | <code>`code`</code> | <mark>==mark==</mark> | <a>[link](https://example.com)</a>
|
||||
<%= f.input :content, :label => false, :as => "text", :placeholder => "Comment", input_html: {class: "comment"} %>
|
||||
<%= f.submit class: "btn blue" %>
|
||||
<% end %>
|
||||
|
||||
@@ -8,7 +8,7 @@
|
||||
<div class="items">
|
||||
<div class="item content">
|
||||
<h2 class="headline"><%= link_to truncate(@thread.title, length: 60, omission: " …"), p %></h2>
|
||||
<%= Sanitize.clean(render_md(@thread.content), Sanitize::Config::RELAXED).html_safe %>
|
||||
<%= render_md(@thread.content).html_safe %>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
@@ -82,5 +82,5 @@
|
||||
</tbody>
|
||||
</table>
|
||||
About:<br>
|
||||
<%= @user.about.blank? ? "<span class=\"no-about\">nothing</span>".html_safe : @user.about %>
|
||||
<%= @user.about.blank? ? "<span class=\"no-about\">nothing</span>".html_safe : render_mini_md(@user.about).html_safe %>
|
||||
</div>
|
||||
Reference in New Issue
Block a user