| pack-priv static boolean shouldRemoveLastNodeBeforeSet(List<Node> nodes) Implements removal of spaces where appropriate before #set directives. The last element
of the given list is removed if it consists of space and if that space occurs in a context
where it is removed before #set. This hack is needed to match what appears to be
special treatment in Apache Velocity of spaces before #set directives. If you have
thing horizontal whitespace #set, then the whitespace is deleted if the
thing is a comment (##...\n); a reference ($x or $x.foo etc); or
another #set. Spaces are also removed before #set at the start of a macro
definition, but that is implemented by calling removeInitialSpaceBeforeSet.
Newlines are already deleted after a directive or comment, so space will be deleted before
the second #set here:
#set ($x = 17)
#set ($y = 23)
but not here:
#set ($x = 17)
#set ($y = 23)
|