18 Sep
2009
18 Sep
'09
6:22 p.m.
Vincent Massol wrote:
Hi everyone,
Example:
----- %> cut here -------- ... something #end ## some comment
{{warning..../}} ----- %> cut here --------
Quizz: Will the macro be inline or standalone? Answer: inline
Reason is that velocity will start by removing the comment, which will leave a whitespace after the #end
Thus you'll get: something + NL + (space) + NL + warning macro
And then the (space) will be trimmed, leaving two NLs and an inline macro. IMO, this space should not be taken into account when determining if the macro is inline or block.
Thus since there are no 2 NLs before the macro it's going to be inline!
-- Sergiu Dumitriu http://purl.org/net/sergiu/