{"action":"created","issue":{"url":"https://api.github.com/repos/meteor/meteor/issues/3985","labels_url":"https://api.github.com/repos/meteor/meteor/issues/3985/labels{/name}","comments_url":"https://api.github.com/repos/meteor/meteor/issues/3985/comments","events_url":"https://api.github.com/repos/meteor/meteor/issues/3985/events","html_url":"https://github.com/meteor/meteor/issues/3985","id":63343814,"number":3985,"title":"Source handler doesn't run for a file extension if it is a file name","user":{"login":"stevezhu","id":4130171,"avatar_url":"https://avatars.githubusercontent.com/u/4130171?v=3","gravatar_id":"","url":"https://api.github.com/users/stevezhu","html_url":"https://github.com/stevezhu","followers_url":"https://api.github.com/users/stevezhu/followers","following_url":"https://api.github.com/users/stevezhu/following{/other_user}","gists_url":"https://api.github.com/users/stevezhu/gists{/gist_id}","starred_url":"https://api.github.com/users/stevezhu/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/stevezhu/subscriptions","organizations_url":"https://api.github.com/users/stevezhu/orgs","repos_url":"https://api.github.com/users/stevezhu/repos","events_url":"https://api.github.com/users/stevezhu/events{/privacy}","received_events_url":"https://api.github.com/users/stevezhu/received_events","type":"User","site_admin":false},"labels":[{"url":"https://api.github.com/repos/meteor/meteor/labels/Project:Isobuild","name":"Project:Isobuild","color":"f7c6c7"}],"state":"open","locked":false,"assignee":null,"milestone":null,"comments":1,"created_at":"2015-03-21T01:47:01Z","updated_at":"2015-03-26T20:52:11Z","closed_at":null,"body":"When using a file name as a file extension when registering a source handler as cited in the [Plugin.registerSourceHandler docs](http://docs.meteor.com/#/full/Plugin-registerSourceHandler)\r\n```javascript\r\nPlugin.registerSourceHandler('some_json.json', function(compileStep) {\r\n  console.log('In some_json.json source handler');\r\n});\r\n```\r\n\"In some_json.json source handler\" isn't logged unless you also add a source handler with just json\r\n```javascript\r\nPlugin.registerSourceHandler('json', function(compileStep) {\r\n  console.log('In json source handler');\r\n});\r\n```\r\nNote: this works fine for `api.addFiles` in packages\r\n\r\nreproduction: https://github.com/stevezhu/meteor-source-handler-bug  \r\nusing osx mavericks 10.9.5 if it's relevant"},"comment":{"url":"https://api.github.com/repos/meteor/meteor/issues/comments/86709666","html_url":"https://github.com/meteor/meteor/issues/3985#issuecomment-86709666","issue_url":"https://api.github.com/repos/meteor/meteor/issues/3985","id":86709666,"user":{"login":"glasser","id":16724,"avatar_url":"https://avatars.githubusercontent.com/u/16724?v=3","gravatar_id":"","url":"https://api.github.com/users/glasser","html_url":"https://github.com/glasser","followers_url":"https://api.github.com/users/glasser/followers","following_url":"https://api.github.com/users/glasser/following{/other_user}","gists_url":"https://api.github.com/users/glasser/gists{/gist_id}","starred_url":"https://api.github.com/users/glasser/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/glasser/subscriptions","organizations_url":"https://api.github.com/users/glasser/orgs","repos_url":"https://api.github.com/users/glasser/repos","events_url":"https://api.github.com/users/glasser/events{/privacy}","received_events_url":"https://api.github.com/users/glasser/received_events","type":"User","site_admin":false},"created_at":"2015-03-26T20:52:11Z","updated_at":"2015-03-26T20:52:11Z","body":"So, you're right that there's a bug here, but the bug is that the exact filename match ever works at all.  The feature is documented as:\r\n\r\n> The file extension that this plugin should handle, without the first dot. Examples: \"coffee\", \"coffee.md\".\r\n\r\nIt's pretty explicit that this is supposed to be an extension, and most of the code (eg, the code that looks for relevant files inside an app) correctly handles this.  The fact that, in certain odd cases, the full filename can match, is a bug that I'll fix. Thanks!"}}