[Petal] Re: Escaped semicolons in meta-templates

Jean-Michel Hiver jhiver at mkdoc.com
Mon Feb 10 16:29:18 GMT 2003


> Hi Jean,

Sorry for being a picky but i'd prefer if you wrote J.M rather than
cutting my name in half :)


> I have attached an archive that demonstrates the semicolon delimiter
> problem that occurs when filling in petal:attribute commands from
> a Petal meta-template.  Pardon me if the test program is a bit long,
> but it examines 5 different cases.  The program displays the input 
> meta-templates, generated templates, and output for each case.

Thank you very much! As useful as always :-) I've used the test 2/ in
order to fix the semicolon bug. I've also added that test to the test
suite... it's great!

Basically it's the string: modifier that was faulty. Anything that's
backslashed should be unescaped, in the exact same way it works with
Perl strings.

I fixed it, let's hope that you'll be able to enjoy meta-template
generation without any further kludges :-)


> Anyway, a bunch of ideas.  I don't know whether the escaping
> issue should be considered a bug or not, but here are the tests
> and workarounds.

It is. For example, 'string:\\foo\\' should return '\foo\', and that's
now exactly what it does. Well, when I release 0.85... soon :)


Cheers,
-- 
Building a better web - http://www.mkdoc.com/
---------------------------------------------
Jean-Michel Hiver
jhiver at mkdoc.com  - +44 (0)114 255 8097
Homepage: http://www.webmatrix.net/



More information about the Petal mailing list