Hello,

Checking this, I have an error where it does not render a parameter
(generic variable) correctly ie $type:

#showAutocomplete("$search/entry", '1', $name, 'query', false)

#macro(showAutocomplete $sUrl $source $name $type $links)
...
data: {
          sUrl: "$sUrl",
          source: "$source",
          #if($name) name: "$name",#end
          $type: input.val()
        }
....

Expected:
sUrl: "/homepage/search/entry",
source: "1",
name: "homepage",
query: input.val()

Actual:
sUrl: "/homepage/search/entry",
source: "1",
name: "homepage",
$type: input.val()

$type is used extensively as a generic variable, so maybe there is some
clash somewhere?  Also if I rename the variable, for example $type1, it
seems to work.

I Also went back to 2.1 to check and it works as expected.

Cheers Greg

On Fri, 24 Jan 2020 at 11:21, Claude Brisson <cla...@renegat.net.invalid>
wrote:

> The test build of Velocity Engine 2.2 RC5 is available.
>
> No determination as to the quality ('alpha,' 'beta,' or 'GA') of
> Velocity Engine 2.2 has been made, and at this time it is simply a "test
> build". We welcome any comments you may have, and will take all feedback
> into account if a quality vote is called for this build.
>
> Release notes:
>
> *
>
> https://dist.apache.org/repos/dist/dev/velocity/velocity-engine/2.2/release-notes.html
>
>
> Distribution:
>
>   * https://dist.apache.org/repos/dist/dev/velocity/velocity-engine/2.2/
>
> Maven 2 staging repository:
>
>   *
> https://repository.apache.org/content/repositories/orgapachevelocity-1033/
>
> Documentation:
>
> * https://velocity.apache.org/engine/2.2/
>
> Sources:
>
>   * https://svn.apache.org/repos/asf/velocity/engine/tags/2.2/
>
> Release Candidates History:
>
>   * RC1 Initial RC
>
>   * RC2
>   - added BigInteger and BigDecimal implicit conversions
>   - [VELOCITY-923] fixed a parser regression for `$foo||`
>   - [VELOCITY-904] fixed two corner case bugs for the
> velocimacro.arguments.preserve_literals backward compatibility flag
>   - fixed engine and dependency versions in README and mention the
> parser customization feature in the *building* section
>   - nicified README links
>   - upgraded surfire plugin version from 2.19.1 to 2.22.1
>   - upgraded maven-jar-plugin from 3.1.1 to 3.2.2
>   - added version 1.2 for extra-enforcer-rules
>   - upgraded maven-javadoc-plugin from 3.1.0 to 3.1.1
>   - upgraded findbugs-maven-plugin from 3.0.4 to 3.0.5
>   - upgraded maven-release-plugin from *unspecified* to 3.0.0-M1
>   - added a new templatized static class
> org.apache.velocity.runtime.VelocityEngineVersion.java
>   - use the File Separator control character to mark the end of stream
> for the parser (instead of the zero-width space char)
>   - reviewed packaging of engine examples (refreshed content, plus made
> them as a standalone zip file with readme, shell scripts, dependencies
> and examples sources rather than a meaningless standalone pom next to a
> jar without explanations...)
>
> * RC3
>   - [VELOCITY-904] fixed yet another corner case bugs for the
> velocimacro.arguments.preserve_literals backward compatibility flag
>   - upgraded SLF4J from 1.7.28 to 1.7.30
>
> * RC4
>   - [VELOCITY-904] fixed a regression introduced in RC3
>
> * RC5
>   - [VELOCITY-924] fixed cache collision between an object and its class
>   - Javadoc fixes in parser genereted classes
>   - [VELOCITY-925] fixed BC whitespace gobbling for macro call without
> parentheses
>   - [VELOCITY-926] fixed regression: Macro arguments names cannot
> collide with external references names
>   - upgraded junit from 4.12 to 4.13
>
>
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: dev-unsubscr...@velocity.apache.org
> For additional commands, e-mail: dev-h...@velocity.apache.org
>
>

Reply via email to