Could we turn on newlines to <br> rendering in Textile filter for Radiant...
It seems to me that most applications for breaks at 80 chars or whatever have long since passed. My users are constantly confused by putting breaks into their text and getting no breaks on the final page. Update: I've fixed this by putting the following in my textile_filter.rb file. class RedCloth # Patch for RedCloth. Fixed in RedCloth r128 but _why hasn't released it yet. # <a href="http://code.whytheluckystiff.net/redcloth/changeset/ 128">http://code.whytheluckystiff.net/redcloth/changeset/128</a> def hard_break( text ) text.gsub!( /(.)\n(?!\n|\Z| *([#*=]+(\s|$)|[{|]))/, "\\1<br / >" ) if hard_breaks end end class TextileFilter < TextFilter description_file File.dirname(__FILE__) + "/../textile.html" def filter(text) RedCloth.new(text, [:hard_breaks] ).to_html end end The fix for Redcloth comes from the rails wiki: http://wiki.rubyonrails.com/rails/pages/RedCloth _______________________________________________ Radiant mailing list Post: [email protected] Search: http://radiantcms.org/mailing-list/search/ Site: http://lists.radiantcms.org/mailman/listinfo/radiant
