[Date Index][Thread Index]
[Date Prev][Date Next][Thread Prev][Thread Next]

Bug report: Problems with variables



Hi,

I have a problem with variables.

An example:
I have a template.wml with this content (very simplified):

-------------------------------
<TITLE>foo$(SubTitle:+: )$(SubTitle)</TITLE>
-------------------------------

This template.wml is called via

-------------------------------
#use <template.wml>
-------------------------------

or like this:

-------------------------------
#use <template.wml> SubTitle="Homepage"
-------------------------------

This second form (with SubTitle set) generates the correct
form "foo: Homepage".  The first form generates "foo$(SubTitle)",
but it should generate simply "foo". 

When i try this:

-------------------------------
<TITLE>foo$(SubTitle:+: $(SubTitle))</TITLE>
-------------------------------
then the first call generates the wrong output "foo)", and the second
call is still correct.
It seems, that the first SubTitle greps the wrong closing bracket.

My solution (or bypass) of the problem is very simple. I use:

-------------------------------
<TITLE>foo$(SubTitle:+: )\
$(SubTitle)</TITLE>
-------------------------------

and with this slightly changed template.wml both calls are correct.
Funny, isn't it?

BTW: I have tried this with wml 1.7.1.

-- 
Uwe Mindrup  Ingersheim, Germany
http://www.mindrup.de/

______________________________________________________________________
Website META Language (WML)                www.engelschall.com/sw/wml/
Official Support Mailing List                   sw-wml@engelschall.com
Automated List Manager                       majordomo@engelschall.com