Hey all: I''ve moved my application from my own computer to a Textdrive server, and in the process, switched from using RedCloth 3.0.3 to 3.0.4. Unfortunately, either the Redcloth version switch or the server switch has introduced a new problem: when I use the to_html method, two consecutive newlines are no longer converted to paragraph tags. Instead, any number of newlines are converted to a single <br />. This problem didn''t exist on my own machine--as I expected, two consecutive newlines became paragraph tags. Any ideas? Thanks, Dave Anderson --~--~---------~--~----~------------~-------~--~----~ You received this message because you are subscribed to the Google Groups "Ruby on Rails: Talk" group. To post to this group, send email to rubyonrails-talk-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org To unsubscribe from this group, send email to rubyonrails-talk-unsubscribe-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org For more options, visit this group at http://groups.google.com/group/rubyonrails-talk?hl=en -~----------~----~----~----~------~----~------~--~---
Hey all: I''ve moved my application from my own computer to a Textdrive server, and in the process, switched from using RedCloth 3.0.3 to 3.0.4. Unfortunately, either the Redcloth version switch or the server switch has introduced a new problem: when I use the to_html method, two consecutive newlines are no longer converted to paragraph tags. Instead, any number of newlines are converted to a single <br />. This problem didn''t exist on my own machine--as I expected, two consecutive newlines became paragraph tags. Any ideas? Thanks, Dave Anderson --~--~---------~--~----~------------~-------~--~----~ You received this message because you are subscribed to the Google Groups "Ruby on Rails: Talk" group. To post to this group, send email to rubyonrails-talk-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org To unsubscribe from this group, send email to rubyonrails-talk-unsubscribe-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org For more options, visit this group at http://groups.google.com/group/rubyonrails-talk?hl=en -~----------~----~----~----~------~----~------~--~---
subimage interactive
2006-Dec-26 00:06 UTC
Re: Problem moving from RedCloth 3.0.3 to 3.0.4
rake rails:freeze:gems ...It will put all of your local gems in your /vendor directory, then you can upload that to Textdrive :) On 12/25/06, David Anderson <yowzadave-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org> wrote:> > > Hey all: > > I''ve moved my application from my own computer to a Textdrive server, > and in the process, switched from using RedCloth 3.0.3 to 3.0.4. > Unfortunately, either the Redcloth version switch or the server > switch has introduced a new problem: when I use the to_html method, > two consecutive newlines are no longer converted to paragraph tags. > Instead, any number of newlines are converted to a single <br />. > > This problem didn''t exist on my own machine--as I expected, two > consecutive newlines became paragraph tags. > > Any ideas? > > Thanks, > Dave Anderson > > > >-- -------------------- seth at subimage interactive ----- http://www.subimage.com http://sublog.subimage.com ----- http://www.getcashboard.com http://dev.subimage.com/projects/substruct --~--~---------~--~----~------------~-------~--~----~ You received this message because you are subscribed to the Google Groups "Ruby on Rails: Talk" group. To post to this group, send email to rubyonrails-talk-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org To unsubscribe from this group, send email to rubyonrails-talk-unsubscribe-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org For more options, visit this group at http://groups.google.com/group/rubyonrails-talk?hl=en -~----------~----~----~----~------~----~------~--~---
subimage interactive
2006-Dec-26 00:07 UTC
Re: Problem moving from RedCloth 3.0.3 to 3.0.4
Whoops, that''s only for rails. Anyhow - you could do something similar. CP redcloth to vendor/redcloth, then include it in your application from environment.rb. On 12/25/06, subimage interactive <subimage-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org> wrote:> > rake rails:freeze:gems > > ...It will put all of your local gems in your /vendor directory, then you > can upload that to Textdrive :) > > On 12/25/06, David Anderson <yowzadave-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org> wrote: > > > > > > Hey all: > > > > I''ve moved my application from my own computer to a Textdrive server, > > and in the process, switched from using RedCloth 3.0.3 to 3.0.4. > > Unfortunately, either the Redcloth version switch or the server > > switch has introduced a new problem: when I use the to_html method, > > two consecutive newlines are no longer converted to paragraph tags. > > Instead, any number of newlines are converted to a single <br />. > > > > This problem didn''t exist on my own machine--as I expected, two > > consecutive newlines became paragraph tags. > > > > Any ideas? > > > > Thanks, > > Dave Anderson > > > > > > > > > > > -- > -------------------- > seth at subimage interactive > ----- > http://www.subimage.com > http://sublog.subimage.com > ----- > http://www.getcashboard.com > http://dev.subimage.com/projects/substruct-- -------------------- seth at subimage interactive ----- http://www.subimage.com http://sublog.subimage.com ----- http://www.getcashboard.com http://dev.subimage.com/projects/substruct --~--~---------~--~----~------------~-------~--~----~ You received this message because you are subscribed to the Google Groups "Ruby on Rails: Talk" group. To post to this group, send email to rubyonrails-talk-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org To unsubscribe from this group, send email to rubyonrails-talk-unsubscribe-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org For more options, visit this group at http://groups.google.com/group/rubyonrails-talk?hl=en -~----------~----~----~----~------~----~------~--~---
Hey David, here''s a solution that you can perform after doing a rake rails:freeze:gems http://nubyonrails.com/articles/2005/12/22/freeze-other-gems-to-rails-lib-directory Good luck, -Conrad On 12/25/06, David Anderson <yowzadave-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org> wrote:> > Hey all: > > I''ve moved my application from my own computer to a Textdrive server, > and in the process, switched from using RedCloth 3.0.3 to 3.0.4. > Unfortunately, either the Redcloth version switch or the server > switch has introduced a new problem: when I use the to_html method, > two consecutive newlines are no longer converted to paragraph tags. > Instead, any number of newlines are converted to a single <br />. > > This problem didn''t exist on my own machine--as I expected, two > consecutive newlines became paragraph tags. > > Any ideas? > > Thanks, > Dave Anderson > > > >--~--~---------~--~----~------------~-------~--~----~ You received this message because you are subscribed to the Google Groups "Ruby on Rails: Talk" group. To post to this group, send email to rubyonrails-talk-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org To unsubscribe from this group, send email to rubyonrails-talk-unsubscribe-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org For more options, visit this group at http://groups.google.com/group/rubyonrails-talk?hl=en -~----------~----~----~----~------~----~------~--~---
Conrad Taylor wrote:> Hey David, here''s a solution that you can perform after doing a > > rake rails:freeze:gems > > http://nubyonrails.com/articles/2005/12/22/freeze-other-gems-to-rails-lib-directoryThanks for your help, everyone--I took your suggestions, and was able to get it working. Cheers, Dave --~--~---------~--~----~------------~-------~--~----~ You received this message because you are subscribed to the Google Groups "Ruby on Rails: Talk" group. To post to this group, send email to rubyonrails-talk-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org To unsubscribe from this group, send email to rubyonrails-talk-unsubscribe-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org For more options, visit this group at http://groups.google.com/group/rubyonrails-talk?hl=en -~----------~----~----~----~------~----~------~--~---
_why turned off hard breaks by default in the latest version of RedCloth. The option you want is :hard_breaks, but it is broken. There was a fix applied to the trunk (http://code.whytheluckystiff.net/redcloth/changeset/128) seven months ago, but _why hasn''t released it as a gem. I''ve bugged him to do so, but it would help if you all would too. To fix it yourself, either unpack RedCloth r128 or later into vendor/ and require it from there or else open the class and overwrite the hard_break method. class RedCloth hard_break( text ) text.gsub!( /(.)\n(?!\n|\Z| *([#*=]+(\s|$)|[{|]))/, "\\1<br />" ) if hard_breaks end end Jason --~--~---------~--~----~------------~-------~--~----~ You received this message because you are subscribed to the Google Groups "Ruby on Rails: Talk" group. To post to this group, send email to rubyonrails-talk-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org To unsubscribe from this group, send email to rubyonrails-talk-unsubscribe-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org For more options, visit this group at http://groups.google.com/group/rubyonrails-talk?hl=en -~----------~----~----~----~------~----~------~--~---