Uploaded image for project: 'Velocity'
  1. Velocity
  2. VELOCITY-925

Macro calls without parenthesis now "eats" the following newline

    XMLWordPrintableJSON

Details

    • Bug
    • Status: Resolved
    • Major
    • Resolution: Fixed
    • 2.1
    • 2.2
    • Engine
    • None

    Description

      The behavior of macro calls without parenthesis changed in 2.x. I cannot find anything in the changelog about that but maybe I missed it.

      The following:

      #macro(mymacro)value#end
      #mymacro
      

      produces:

      • in Velocity 1.7: "value/n"
      • in Velocity 2.x: "value"

      but:

      #macro(mymacro)value#end
      #mymacro()
      

      produces in both Velocity versions "value" (eats the newline)

      Looks like omitting parenthesis in Velocity 1.7 was making the macro call "inline" while having them was eating the following newline like things like #set directive do.

      Attachments

        Activity

          People

            cbrisson Claude Brisson
            tmortagne Thomas Mortagne
            Votes:
            0 Vote for this issue
            Watchers:
            2 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved: