{"action":"created","issue":{"url":"https://api.github.com/repos/unrolled/render/issues/25","labels_url":"https://api.github.com/repos/unrolled/render/issues/25/labels{/name}","comments_url":"https://api.github.com/repos/unrolled/render/issues/25/comments","events_url":"https://api.github.com/repos/unrolled/render/issues/25/events","html_url":"https://github.com/unrolled/render/pull/25","id":74910297,"number":25,"title":"skip dir and get proper extension while walking templates(extension should start from last dot.(both python and golang))","user":{"login":"darkdarkfruit","id":1013797,"avatar_url":"https://avatars.githubusercontent.com/u/1013797?v=3","gravatar_id":"","url":"https://api.github.com/users/darkdarkfruit","html_url":"https://github.com/darkdarkfruit","followers_url":"https://api.github.com/users/darkdarkfruit/followers","following_url":"https://api.github.com/users/darkdarkfruit/following{/other_user}","gists_url":"https://api.github.com/users/darkdarkfruit/gists{/gist_id}","starred_url":"https://api.github.com/users/darkdarkfruit/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/darkdarkfruit/subscriptions","organizations_url":"https://api.github.com/users/darkdarkfruit/orgs","repos_url":"https://api.github.com/users/darkdarkfruit/repos","events_url":"https://api.github.com/users/darkdarkfruit/events{/privacy}","received_events_url":"https://api.github.com/users/darkdarkfruit/received_events","type":"User","site_admin":false},"labels":[],"state":"open","locked":false,"assignee":null,"milestone":null,"comments":1,"created_at":"2015-05-10T12:31:01Z","updated_at":"2015-05-11T14:31:08Z","closed_at":null,"pull_request":{"url":"https://api.github.com/repos/unrolled/render/pulls/25","html_url":"https://github.com/unrolled/render/pull/25","diff_url":"https://github.com/unrolled/render/pull/25.diff","patch_url":"https://github.com/unrolled/render/pull/25.patch"},"body":"It seems ext should start from \"last dot\" of a filepath(Below is the golang and python version).\r\n\r\n    golang:\r\n        ext = filepath.Ext(rel)\r\n    \r\n        func Ext(path string) string\r\n        Ext returns the file name extension used by path. The extension is\r\n        the suffix beginning at the final dot in the final element of path;\r\n        it is empty if there is no dot.\r\n    \r\n    python:\r\n        In [10]: os.path.splitext?\r\n        Signature: os.path.splitext(p)\r\n        Docstring:\r\n        Split the extension from a pathname.\r\n    \r\n        Extension is everything from the last dot to the end, ignoring\r\n        leading dots.  Returns \"(root, ext)\"; ext may be empty.\r\n        File:      /usr/lib/python2.7/posixpath.py\r\n        Type:      function\r\n    \r\n        In [11]: os.path.splitext('a.b.c.d')\r\n        Out[11]: ('a.b.c', '.d')\r\n\r\nIn source code(https://github.com/unrolled/render/blob/v1/render.go#L163):\r\n``ext = \".\" + strings.Join(strings.Split(rel, \".\")[1:], \".\")``\r\nseems start from \"first dot\". In such case, when we set\r\noption:\tExtensions: []string{\".tmpl\", \".html\"}, then file \"foo.tmpl.html\" is \r\nnot a valid file(ofcourse, \"foo-tmpl.html\" is legal) as its extension would be\r\n\".tmpl.html\" which is not list in options!\r\n\r\nMaybe use ``ext = filepath.Ext(rel)`` is a straight way to do."},"comment":{"url":"https://api.github.com/repos/unrolled/render/issues/comments/100926567","html_url":"https://github.com/unrolled/render/pull/25#issuecomment-100926567","issue_url":"https://api.github.com/repos/unrolled/render/issues/25","id":100926567,"user":{"login":"unrolled","id":407228,"avatar_url":"https://avatars.githubusercontent.com/u/407228?v=3","gravatar_id":"","url":"https://api.github.com/users/unrolled","html_url":"https://github.com/unrolled","followers_url":"https://api.github.com/users/unrolled/followers","following_url":"https://api.github.com/users/unrolled/following{/other_user}","gists_url":"https://api.github.com/users/unrolled/gists{/gist_id}","starred_url":"https://api.github.com/users/unrolled/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/unrolled/subscriptions","organizations_url":"https://api.github.com/users/unrolled/orgs","repos_url":"https://api.github.com/users/unrolled/repos","events_url":"https://api.github.com/users/unrolled/events{/privacy}","received_events_url":"https://api.github.com/users/unrolled/received_events","type":"User","site_admin":false},"created_at":"2015-05-11T14:31:08Z","updated_at":"2015-05-11T14:31:08Z","body":"Great change! Can you add a couple of tests to capture your changes? Thanks!"}}