[prev in list] [next in list] [prev in thread] [next in thread]
List: velocity-dev
Subject: [jira] Resolved: (VELOCITY-682) #evaluate breaks macro processing
From: "Nathan Bubna (JIRA)" <dev () velocity ! apache ! org>
Date: 2009-01-25 1:37:59
Message-ID: 1906623103.1232847479610.JavaMail.jira () brutus
[Download RAW message or body]
[ https://issues.apache.org/jira/browse/VELOCITY-682?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel \
]
Nathan Bubna resolved VELOCITY-682.
-----------------------------------
Resolution: Fixed
Fix Version/s: 1.7
Inline macro namespace was being dumped during parsing of the source to be evaluated.
> #evaluate breaks macro processing
> ---------------------------------
>
> Key: VELOCITY-682
> URL: https://issues.apache.org/jira/browse/VELOCITY-682
> Project: Velocity
> Issue Type: Bug
> Components: Engine
> Affects Versions: 1.6.1
> Reporter: Sergiu Dumitriu
> Fix For: 1.7
>
>
> When using #evaluate, all further macro processing is broken; old macros are not \
> recognized anymore, and new macros cannot be defined. For example:
> {noformat}
> #macro(aSimpleMacro)
> This is a simple macro
> #end
> ## called 3 times to show that it works each time
> #aSimpleMacro()
> #aSimpleMacro()
> #aSimpleMacro()
> #macro(doEval $b)
> #evaluate($x)
> #end
> #set($x = 'value of x')
> #doEval('$x')
> ## after the first call, which used an #evaluate, these two won't work anymore:
> #doEval('$x')
> #doEval('$x')
> #macro(anotherSimpleMacro)
> This is another simple macro
> #end
> ## This newly defined macro doesn't work, either...
> #anotherSimpleMacro()
> ## And the first macro, which worked well before, suddenly stops working
> #aSimpleMacro()
> {/noformat}
> should print:
> {noformat}
> This is a simple macro
> This is a simple macro
> This is a simple macro
> value of x
> value of x
> value of x
> This is another simple macro
> This is a simple macro
> {/noformat}
> but instead prints:
> {noformat}
> This is a simple macro
> This is a simple macro
> This is a simple macro
> value of x
> #doEval('$x')
> #doEval('$x')
> #anotherSimpleMacro()
> #aSimpleMacro()
> {/noformat}
--
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.
---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@velocity.apache.org
For additional commands, e-mail: dev-help@velocity.apache.org
[prev in list] [next in list] [prev in thread] [next in thread]
Configure |
About |
News |
Add a list |
Sponsored by KoreLogic