[kramdown-users] Using kramdown while reading from a file
Sandeep Laxman
sandeep.laxman at gmail.com
Wed Jan 16 08:58:12 UTC 2013
Hi Guys,
I have a static file in which data is stored in kramdown syntax. I am
trying to convert it to HTML using the following code
In the controller:
@demo =
Kramdown::Document.new(File.read("./app/views/books/demo_data")).to_html
In the view:
<div class="span6">
<%= raw @demo %>
</div>
However, in the output, all I get is the raw kramdown syntax data in the
demo_data file with <pre> tags attached. No conversion to HTML is taking
place. What can I do to fix this?
Thanks in advance!
- Sandeep
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://rubyforge.org/pipermail/kramdown-users/attachments/20130116/893656d5/attachment.html>
More information about the kramdown-users
mailing list