{"issue":{"pull_request":{"diff_url":"https://github.com/zotonic/zotonic/pull/251.diff","html_url":"https://github.com/zotonic/zotonic/pull/251","patch_url":"https://github.com/zotonic/zotonic/pull/251.patch"},"state":"open","milestone":null,"user":{"avatar_url":"https://secure.gravatar.com/avatar/eaf911f3cfba9a89eaf6300cc659dd9b?d=https://a248.e.akamai.net/assets.github.com%2Fimages%2Fgravatars%2Fgravatar-140.png","gravatar_id":"eaf911f3cfba9a89eaf6300cc659dd9b","url":"https://api.github.com/users/kaos","login":"kaos","id":72965},"assignee":null,"updated_at":"2011-11-16T19:20:20Z","labels":[],"closed_at":null,"comments":14,"url":"https://api.github.com/repos/zotonic/zotonic/issues/251","body":"Replace any $N in Input with the N'th value from Args.\r\n\r\nExample usage: {{ value|format:[\"first\", \"second\", \"third\"] }}\r\n  For a value of \"My $1 trough $3 is not $2 to best\"\r\n  produces \"My first trough third is not second to best\"\r\n\r\n$ may be escaped by \\\\ to avoid replacement.\r\nN may be in the range [1..9]. If N is out of range of the provided\r\nargs, the $N is left as-is.\r\n\r\nFor single arg, {{ value|format:\"first\" }} is also allowed.\r\n\r\nI've not yet managed to apply this filter to a trans text, though.\r\nAny good reason why the trans tags use string_literal or the like instead of Value?","html_url":"https://github.com/zotonic/zotonic/issues/251","title":"mod_base/filters/format: new format filter (#193).","number":251,"id":2127598,"created_at":"2011-11-02T22:57:00Z"},"action":"created","comment":{"user":{"avatar_url":"https://secure.gravatar.com/avatar/eaf911f3cfba9a89eaf6300cc659dd9b?d=https://a248.e.akamai.net/assets.github.com%2Fimages%2Fgravatars%2Fgravatar-140.png","gravatar_id":"eaf911f3cfba9a89eaf6300cc659dd9b","url":"https://api.github.com/users/kaos","login":"kaos","id":72965},"updated_at":"2011-11-16T19:20:20Z","url":"https://api.github.com/repos/zotonic/zotonic/issues/comments/2766288","body":"Since I didn't get too big complaints about replace_$arg, I've gone ahead and tried it.\r\n\r\nAs you said Marc, erlydtl didn't like $ in identifiers. If we don't mind supporting that, I've included a patch for that along with the filter rename (to support the rename, which otherwise would've been pointless ;c)\r\n\r\nAny other action needed for acceptance, let me know :) \r\n\r\n(It's been rebased for easy merge...)\r\n","id":2766288,"created_at":"2011-11-16T19:20:20Z"}}