Description

When more than one argument is passed to a macro in the _trailing_args list, the arguments in _trailing_args are in reverse order from their order in the macro invocation.

Steps to reproduce

  1. Put the following file in data/plugin/macro/TestMacro.py:

def macro_TestMacro(macro, _trailing_args=[]):
    return macro.request.formatter.text(' '.join(_trailing_args))
  1. Restart the web server.
  2. On any wiki page, add: <<TestMacro(one,two,three)>>.

  3. Preview or save, and the page shows "three two one".

Example

Component selection

Details

MoinMoin Version

1.9.3

OS and Version

Linux Ubuntu 12.04.1 LTS

Python Version

2.7.3

Server Setup

Local test wiki

Server Details

Language you are using the wiki in (set in the browser/UserPreferences)

English

Workaround

Reverse the trailing arguments in the macro invocation or the macro definition.

Discussion

Plan


CategoryMoinMoinBug

MoinMoin: MoinMoinBugs/TrailingMacroArgsReversed (last edited 2013-01-27 19:43:36 by ASchepler)