Skip to content

Instantly share code, notes, and snippets.

@josephzidell
Created February 9, 2014 16:58
Show Gist options
  • Save josephzidell/8902100 to your computer and use it in GitHub Desktop.
Save josephzidell/8902100 to your computer and use it in GitHub Desktop.
Markdown adding spaces - a simpler case
```html
<a href="mailto:404-Not-Found@example.com?subject=Hi!&amp;amp;body=Either type the email address or use the form. Thanks!"></a>
```
<pre lang="html"><code>&lt;a href="mailto:404-Not-Found@example.com?subject=Hi!&amp;amp;amp;body=Either type the email address or use the form. Thanks!"&gt;&lt;/a&gt;
</code></pre>
module PostsHelper
def to_html(markdown)
pipeline = HTML::Pipeline.new [
HTML::Pipeline::MarkdownFilter,
# HTML::Pipeline::SyntaxHighlightFilter # isolate problem - just use markdown filter
]
pipeline.call(markdown)[:output].to_s
end
end
%h1= link_to @post.title, @post
= raw to_html @post.body_markdown
=# raw @post.body_html
%hr
%br
= render 'disqus'
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment