markdown optimization, few other changes

This commit is contained in:
jomo
2014-04-19 01:54:25 +02:00
parent 0264f239ba
commit 097f9b1ba4
12 changed files with 88 additions and 54 deletions

View File

@@ -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>

View File

@@ -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>&gt; 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 %>