2

Ok, I hope this is a simple typo or something, but I've got a problem trying to get HAML to print markdown text. The relevant portion of my gemfile looks like this:

gem 'rdiscount'

My text looks like this:

### TEST HEADING ###
Here's some text.

My view code looks like this:

%h1= @article.title
.body
  :markdown
    = @article.body

but what renders on the page is:

Article Title

= @article.body

So not only is it not formatting the markdown, it's not even outputting the content of @article.body.

Any help?

Community
  • 1
  • 1
Andrew
  • 42,517
  • 51
  • 181
  • 281

1 Answers1

6

You should use this instead:

%h1= @article.title
.body
  :markdown
    #{@article.body}
Kevin
  • 1,845
  • 13
  • 12