Opened 11 years ago

Last modified 7 years ago

#11119 new enhancement

Strip whitespace from macro arguments — at Version 1

Reported by: Ryan J Ollos Owned by: Steffen Hoffmann
Priority: normal Component: AccountManagerPlugin
Severity: normal Keywords: macro argument
Cc: osimons, Jun Omae Trac Release: 0.11

Description (last modified by Ryan J Ollos)

While working on a patch t:#10751, I added a stripws argument to parse_args, to strip leading and trailing whitespace from macro arguments (see cd5f4cee). There hasn't been any interest expressed in the patch so far, but I encountered a situation this evening that made me think we should deal with this directly in the UserStats macro.

The macro call [[UserQuery(email, name, visit)]] results in the list [u'email', u' name', u' visit']. The output of the macro is then,

admin, user1 <user1@gmail.com>, user2 <user2@gmail.com> 

rather than the expected,

Account Name Email Last Login
admin
user1 User One user1@gmail.com 16 hours ago
user2 User Two user2@gmail.com

Change History (1)

comment:1 Changed 11 years ago by Ryan J Ollos

Description: modified (diff)
Note: See TracTickets for help on using tickets.