Re: Enhancement Request: Folding Whitespace
Chris Babcock <[email protected]> Fri, 26 Jun 2009 15:22:01 -0700
| Newsgroups | gmane.mail.spam.crm114 |
|---|---|
| Organization | Kolonel Panic |
| Message-ID | <[email protected]> |
> I hear you. ;-) Almost. :-) > But from the sound of it, mixed with my personal flavouritism, it > seems you'd like to have two different bits: whitespace /stripping/ at > SOL/EOL/both (so that you don't have to say '^[[:space:]]+' but just > '^') and whitespace treatments, where LF is (maybe) not part of said > whitespace, i.e. '[[:space:]]+' becomes just ' '. > > That could be handled by a couple of lines of replacement instructions > (been out of crm114 scripting for ~ 2 months and I already forgot what > the instruction opcode for 'find&replace' is :-( ) or by some sort of > new transmogrification feature to be. Bets are up on what Bill's going > to choose there, but last time I checked my bookie the odds for new > opcode/feature/gadget(tm) were like on that horse Molly No Show (or > was it Mally No Show. Ah, what the heck.) The issue here, though, was the behavior of whitespace in source code. I had just spent several hours debugging a long regex that worked just fine with egrep. The problem was that I expected leading whitespace in my source code to just go away. I blamed it on burning out on RFC research to write my first script, but in retrospect it all comes from using python. :-) > BTW, had a quick gander at your URLs; /index.html turns up empty; Thanks. I have more than a few Dutch users, so that was a nice catch. The problem is probably the character set mismatch. It wouldn't be noticed in any native English browser, so I wouldn't have caught it until final validation. > /includes/master.html shows several :*:xyz: variable literals, so I > take it Mr. A.Z.Kikr is in between bottom actions? ;-) Viewed with > FF3.0.11 on a WinXP system from somewhere in the Dutch Lands. Got it in one. This is the engine: eval (:_dw:) /:*:headers::+:template:/ The /includes/master.html file is the template. The body of the referenced HTML document becomes the content division of the final document. Eventually I'll include metadata. There's ~1500 lines of CRM in this thing, including 150 in webtools/gamelist.crm that generate this page: http://usak.asciiking.com/webtools/gamelist/fge00028 The game map on that page is generated from an archive by a script that uses ~50 lines of CRM to preprocess the archive and provide flow control for the map creation process. Members of this mailing list helped with memory use issues I had in that. Chris ------------------------------------------------------------------------------ _______________________________________________ Crm114-general mailing list [email protected] https://lists.sourceforge.net/lists/listinfo/crm114-general
signature.asc
(application/pgp-signature, 489 B)
-----BEGIN PGP SIGNATURE----- Version: GnuPG v1.4.9 (GNU/Linux) iQEcBAEBAgAGBQJKRUoKAAoJEASgqNsqZfCHLw0IAK5jLg9tooWMdhfUFfqzxU5q TzWeQqCbws+tMCImJ0gaugzaTjHbAYVJbuDLanvmJOflCyxa3cDpR3hl4bjYcKy7 472Lp8s+zwDLWVnAClfr5zzKU4Yh1gRHcfTC7Ex0Di3oHhQNIsGqzaJz6g54utOv bOU1wwISpPWM67GyrXw6kX+rwFKb7+Go+WPkxHJKHjPwstFfxw1afpx/FiaHOIZx peby84viIvKTJDzU14yFBlv24qk2fVlBv96Hh2ldd5RZb0SBhTEZjCrJRKNTwgoT KbqI3oQu8BIQ8VlGWSRHpQcxdAs2pC+rsJt24eikD2yzhOtRJZgJ+ClljfstlXU= =f1/O -----END PGP SIGNATURE-----