|
Smarty
WARNING: All discussion is moving to https://reddit.com/r/smarty, please go there! This forum will be closing soon. |
|
View previous topic :: View next topic |
Author |
Message |
jablko Smarty Rookie
Joined: 07 Apr 2006 Posts: 6
|
Posted: Wed Jun 21, 2006 11:52 pm Post subject: [PATCH] _mod_regexp: support empty modifier arguments |
|
|
http://cgi.sfu.ca/~jdbates/tmp/smarty/200606210/patch
I wrote a modifier plugin which takes two optional arguments. Sometimes I want to specify the second argument without specifying the first:
{"foo"|elementId:"bar"}
But without specifying the first argument, "bar" is passed as the first argument
{"foo"|elementId::"bar"} - currently complains: unrecognized tag
This patch fixes _mod_regexp so "bar" is passed as the second argument
Many thanks - Jack |
|
Back to top |
|
boots Administrator
Joined: 16 Apr 2003 Posts: 5611 Location: Toronto, Canada
|
Posted: Thu Jun 22, 2006 12:21 am Post subject: |
|
|
Hi.
Thanks for the patch but I think you will find that {"foo"|elementId:null:"bar"} works just as well, takes only four more keystrokes, is easier to visually spot (and debug!) and saves the :: token for possible future use.
Personally, I don't think that the current functionality is broken. I'm -1 for this patch.
Best regards. |
|
Back to top |
|
|
|
You cannot post new topics in this forum You cannot reply to topics in this forum You cannot edit your posts in this forum You cannot delete your posts in this forum You cannot vote in polls in this forum
|
Powered by phpBB © 2001, 2005 phpBB Group
|