From kingdon at panix.com Mon Aug 11 10:59:28 2008 From: kingdon at panix.com (Jim Kingdon) Date: Mon, 11 Aug 2008 10:59:28 -0400 (EDT) Subject: [Erector-devel] indentation code checked in In-Reply-To: <7a93bd340806060710w1b44521dt7a838d2a5f31f8a2@mail.gmail.com> (alex@stinky.com) References: <20080606055736.D2DD6241B5@panix5.panix.com> <7a93bd340806060710w1b44521dt7a838d2a5f31f8a2@mail.gmail.com> Message-ID: <20080811145928.67B3F241E0@panix5.panix.com> > How about to_pretty? That would set the flag and then un-set it on the > way out. I've done this. The way the cache in Erector::Widget works, subsequent calls to to_s are also affected. > I'm also for a global variable, so we can set it in development.rb and > unset it in production.rb (with the caveat that there might be > functional differences between the two). Done. If anyone has any ideas about which of the various Ruby concepts of "global variable" are right here, feel free to take a look at what I did. > For some reason I'm fond of the no-extraneous-whitespace format. Maybe > because it jibes with my philosophy that HTML should be an output > format only, or maybe because it makes it obvious that Erector was > used for a given page. Well, with respect to the latter, you just need to learn the Erector pretty-printing style (which isn't all *that* strange, but I'm sure it has its little tics).