David Susco
2009-Nov-02 17:57 UTC
is there a way to configure line breaks in markaby output?
Hi all, Instead of having the following: def index h1 ''My Site'' p ''Welcome to my site!'' end output this: <h1>My Site</h1><p>Welcome to my site!</p> Is there anyway that I can configure Markaby to add line breaks between block elements so I''d get something like this: <h1>My Site</h1> <p>Welcome to my site!</p> Obviously it makes no difference to the browser, it would just make it easier on me when debugging and testing. -- Dave
Magnus Holm
2009-Nov-02 18:16 UTC
is there a way to configure line breaks in markaby output?
I think this should do it: Camping.goes :Nuts Nuts::Mab.set(:indent, 2) You should probably only use it in development, because I think it''s pretty slow. //Magnus Holm On Mon, Nov 2, 2009 at 18:57, David Susco <dsusco at gmail.com> wrote:> Hi all, > > Instead of having the following: > > def index > ?h1 ''My Site'' > ?p ''Welcome to my site!'' > end > > output this: > > <h1>My Site</h1><p>Welcome to my site!</p> > > Is there anyway that I can configure Markaby to add line breaks > between block elements so I''d get something like this: > > <h1>My Site</h1> > > <p>Welcome to my site!</p> > > Obviously it makes no difference to the browser, it would just make it > easier on me when debugging and testing. > > -- > Dave > _______________________________________________ > Camping-list mailing list > Camping-list at rubyforge.org > http://rubyforge.org/mailman/listinfo/camping-list >
Dave Everitt
2009-Nov-02 21:42 UTC
is there a way to configure line breaks in markaby output?
Yes, it can be a bugbear. It''s a bit ''non-lazy'' but I just tend to add newlines with Markaby''s ''text'': def index h1 ''My Site'' text("\n\n") p ''Welcome to my site!'' end - DaveE> Is there anyway that I can configure Markaby to add line breaks > between block elements so I''d get something like this: > > <h1>My Site</h1> > > <p>Welcome to my site!</p>