{"action":"created","issue":{"url":"https://api.github.com/repos/jkphl/svg-sprite/issues/50","labels_url":"https://api.github.com/repos/jkphl/svg-sprite/issues/50/labels{/name}","comments_url":"https://api.github.com/repos/jkphl/svg-sprite/issues/50/comments","events_url":"https://api.github.com/repos/jkphl/svg-sprite/issues/50/events","html_url":"https://github.com/jkphl/svg-sprite/issues/50","id":56142181,"number":50,"title":"Custom variable callback doesn't work correctly","user":{"login":"thasmo","id":184284,"avatar_url":"https://avatars.githubusercontent.com/u/184284?v=3","gravatar_id":"","url":"https://api.github.com/users/thasmo","html_url":"https://github.com/thasmo","followers_url":"https://api.github.com/users/thasmo/followers","following_url":"https://api.github.com/users/thasmo/following{/other_user}","gists_url":"https://api.github.com/users/thasmo/gists{/gist_id}","starred_url":"https://api.github.com/users/thasmo/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/thasmo/subscriptions","organizations_url":"https://api.github.com/users/thasmo/orgs","repos_url":"https://api.github.com/users/thasmo/repos","events_url":"https://api.github.com/users/thasmo/events{/privacy}","received_events_url":"https://api.github.com/users/thasmo/received_events","type":"User","site_admin":false},"labels":[{"url":"https://api.github.com/repos/jkphl/svg-sprite/labels/question","name":"question","color":"cc317c"}],"state":"closed","locked":false,"assignee":{"login":"jkphl","id":4446936,"avatar_url":"https://avatars.githubusercontent.com/u/4446936?v=3","gravatar_id":"","url":"https://api.github.com/users/jkphl","html_url":"https://github.com/jkphl","followers_url":"https://api.github.com/users/jkphl/followers","following_url":"https://api.github.com/users/jkphl/following{/other_user}","gists_url":"https://api.github.com/users/jkphl/gists{/gist_id}","starred_url":"https://api.github.com/users/jkphl/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/jkphl/subscriptions","organizations_url":"https://api.github.com/users/jkphl/orgs","repos_url":"https://api.github.com/users/jkphl/repos","events_url":"https://api.github.com/users/jkphl/events{/privacy}","received_events_url":"https://api.github.com/users/jkphl/received_events","type":"User","site_admin":false},"milestone":null,"comments":2,"created_at":"2015-01-31T22:25:47Z","updated_at":"2015-02-01T00:15:04Z","closed_at":"2015-01-31T23:06:33Z","body":"I'm trying to use a similar variable definition as defined in the docs, but all it does is print the function as string into the template, which looks like this:\r\n```scss\r\n%svg-common {\r\n\tbackground-repeat: no-repeat;\r\n\tbackground-image: url(function (sprite, render) {\r\n\t\t\t\t\treturn render(sprite).split('.svg').join('.png');\r\n\t\t\t\t});\r\n\r\n\t.svg & {\r\n\t\tbackground-image: url(../image/sprite.svg);\r\n\t}\r\n}\r\n```\r\nMy configuration looks like this:\r\n```js\r\n{\r\n\tvariables: {\r\n\t\tpng: function() {\r\n\t\t\treturn function(sprite, render) {\r\n\t\t\t\treturn render(sprite).split('.svg').join('.png');\r\n\t\t\t}\r\n\t\t}\r\n\t}\r\n}\r\n```\r\nMy template is this:\r\n```scss\r\n{{#common}}.{{/common}}{{^common}}%{{/common}}{{mixin}} {\r\n\tbackground-repeat: no-repeat;\r\n\tbackground-image: url({{{png}}});\r\n\r\n\t.svg & {\r\n\t\tbackground-image: url({{{sprite}}});\r\n\t}\r\n}\r\n```\r\n\r\nHaven't found anything why mustache shouldn't run the function and instead print it. Any idea?"},"comment":{"url":"https://api.github.com/repos/jkphl/svg-sprite/issues/comments/72344155","html_url":"https://github.com/jkphl/svg-sprite/issues/50#issuecomment-72344155","issue_url":"https://api.github.com/repos/jkphl/svg-sprite/issues/50","id":72344155,"user":{"login":"thasmo","id":184284,"avatar_url":"https://avatars.githubusercontent.com/u/184284?v=3","gravatar_id":"","url":"https://api.github.com/users/thasmo","html_url":"https://github.com/thasmo","followers_url":"https://api.github.com/users/thasmo/followers","following_url":"https://api.github.com/users/thasmo/following{/other_user}","gists_url":"https://api.github.com/users/thasmo/gists{/gist_id}","starred_url":"https://api.github.com/users/thasmo/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/thasmo/subscriptions","organizations_url":"https://api.github.com/users/thasmo/orgs","repos_url":"https://api.github.com/users/thasmo/repos","events_url":"https://api.github.com/users/thasmo/events{/privacy}","received_events_url":"https://api.github.com/users/thasmo/received_events","type":"User","site_admin":false},"created_at":"2015-02-01T00:15:04Z","updated_at":"2015-02-01T00:15:04Z","body":"Yeah, indeed - should get familiar with the mustache basics. Thank you for responding so quickly!"}}