You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@velocity.apache.org by "Geir Magnusson Jr." <ge...@optonline.net> on 2000/11/05 15:03:55 UTC
Re: FW: cvs commit:
jakarta-velocity/test/templates/comparediabolical.cmp
Jon Stevens wrote:
>
> shouldn't there be a space between these two:
>
> +<first element><second element>
> +#"FFFF
Why? I don't think so. The parser is now pretty precise.
The VTL to produce that is (any other readers : the + came from diff in
the commit):
#foreach($a in $stringarray)<$a>#end
and there are no spaces after '(' or before '#'. So the output is
<first element><second element>
If you want a space, do
#foreach($a in $stringarray)<$a> #end
or
#foreach($a in $stringarray) <$a>#end
[actually, the latter doesn't work at the moment as I eat whitespace
after any valid #directive(), but that's not right in a case like this.
Easy fix, later this a.m. (after coffee) :) ]
geir
> -jon
>
> ----------
> From: geirm@locus.apache.org
> Reply-To: velocity-dev@jakarta.apache.org
> Date: 5 Nov 2000 05:49:25 -0000
> To: jakarta-velocity-cvs@apache.org
> Subject: cvs commit: jakarta-velocity/test/templates/compare diabolical.cmp
>
> geirm 00/11/04 21:49:25
>
> Modified: test/templates diabolical.vm
> test/templates/compare diabolical.cmp
> Log:
> Added new tests, centered around things that might be directives.
>
> Revision Changes Path
> 1.5 +11 -0 jakarta-velocity/test/templates/diabolical.vm
>
> Index: diabolical.vm
> ===================================================================
> RCS file: /home/cvs/jakarta-velocity/test/templates/diabolical.vm,v
> retrieving revision 1.4
> retrieving revision 1.5
> diff -u -r1.4 -r1.5
> --- diabolical.vm 2000/11/03 11:35:35 1.4
> +++ diabolical.vm 2000/11/05 05:49:24 1.5
> @@ -33,3 +33,14 @@
> $strings.getVillageType($col.Type)
> $strings.getVillageType( $col.Type)
> $strings.getVillageType($col.Type )
> +
> +-- Note that the \#end
> +#foreach($a in $stringarray)<$a>#end
> +
> +#"FFFF
> +-#-#-#-#-#
> +#-#-#-#
> +$-$-$-$-
> +#FF00FF00
> +#'FF
> +
>
>
>
> 1.5 +10 -0
> jakarta-velocity/test/templates/compare/diabolical.cmp
>
> Index: diabolical.cmp
> ===================================================================
> RCS file:
> /home/cvs/jakarta-velocity/test/templates/compare/diabolical.cmp,v
> retrieving revision 1.4
> retrieving revision 1.5
> diff -u -r1.4 -r1.5
> --- diabolical.cmp 2000/11/03 11:35:41 1.4
> +++ diabolical.cmp 2000/11/05 05:49:25 1.5
> @@ -21,3 +21,13 @@
> $strings.getVillageType($col.Type)
> $strings.getVillageType($col.Type)
> $strings.getVillageType($col.Type)
> +
> +-- Note that the #end
> +<first element><second element>
> +#"FFFF
> +-#-#-#-#-#
> +#-#-#-#
> +$-$-$-$-
> +#FF00FF00
> +#'FF
> +
>
>
>
--
Geir Magnusson Jr. geirm@optonline.com
Dakota tribal wisdom: "when you discover you are riding a dead horse,
the best strategy is to dismount."