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

bodyContent in nested macros called without @ should be unset

    XMLWordPrintableJSON

    Details

    • Type: Bug
    • Status: Open
    • Priority: Minor
    • Resolution: Unresolved
    • Affects Version/s: 1.7.x, 2.3
    • Fix Version/s: None
    • Component/s: Engine
    • Labels:
      None

      Description

      Hi! First ever maybe bug report (pls be gentle).

       

      #macro(test $label)Something $!label $!bodyContent#{end}

      #@test('First')#test('Second')#end

       

      ends up a recurring mess because $bodyContent seems to be still defined when calling the inner macro without a block. I propose (perleeze) that it should always be unset when calling a macro without a block. It's fine if you always call with @ and supply an empty block, or unset it manually before the second call

      p.s.

      #@{test} or #{@test} doesn't work either

       

        Attachments

          Activity

            People

            • Assignee:
              Unassigned
              Reporter:
              willowZzzzz Willow Nice
            • Votes:
              0 Vote for this issue
              Watchers:
              1 Start watching this issue

              Dates

              • Created:
                Updated: