you can see that there isn’t a tag and the h2 tag is correct.
Any tips on where I’m going wrong? The database field is a mysql text field,
utf-8, which I’ve been editing using phpMyAdmin on localhost.
update - looks like there is some kind of bug in redcloth concerning
hard
breaks. if I change the textilize function like so:
Returns the text with all the Textile codes turned into HTML-tags.
# <i>This method is only available if RedCloth can be
required.
def textilize(text)
if text.blank?
“”
else #textilized = RedCloth.new(text, [ :hard_breaks ]) #textilized.hard_breaks = true if
textilized.respond_to?(“hard_breaks=”)
# *** SM change - hard_breaks screws up large amounts
textilized
text, like a long article, and screws formatting in general
textilized = RedCloth.new(text)
textilized.to_html
end
end
it works just fine with <%= textilize(@article.body) %>
it would appear that changing line breaks to tags is triggering a
bug in
textilize, because otherwise I can get a long textile-marked-up document
to
render just fine.
thoughts? I guess I’ll have to dive into the RedCloth code now, to solve
this.