{"action":"opened","issue":{"url":"https://api.github.com/repos/valeriangalliat/markdown-it-anchor/issues/12","labels_url":"https://api.github.com/repos/valeriangalliat/markdown-it-anchor/issues/12/labels{/name}","comments_url":"https://api.github.com/repos/valeriangalliat/markdown-it-anchor/issues/12/comments","events_url":"https://api.github.com/repos/valeriangalliat/markdown-it-anchor/issues/12/events","html_url":"https://github.com/valeriangalliat/markdown-it-anchor/issues/12","id":119370738,"number":12,"title":"TypeError: plugin.apply is not a function","user":{"login":"arve0","id":4810521,"avatar_url":"https://avatars.githubusercontent.com/u/4810521?v=3","gravatar_id":"","url":"https://api.github.com/users/arve0","html_url":"https://github.com/arve0","followers_url":"https://api.github.com/users/arve0/followers","following_url":"https://api.github.com/users/arve0/following{/other_user}","gists_url":"https://api.github.com/users/arve0/gists{/gist_id}","starred_url":"https://api.github.com/users/arve0/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/arve0/subscriptions","organizations_url":"https://api.github.com/users/arve0/orgs","repos_url":"https://api.github.com/users/arve0/repos","events_url":"https://api.github.com/users/arve0/events{/privacy}","received_events_url":"https://api.github.com/users/arve0/received_events","type":"User","site_admin":false},"labels":[],"state":"open","locked":false,"assignee":null,"milestone":null,"comments":0,"created_at":"2015-11-29T17:06:17Z","updated_at":"2015-11-29T17:06:17Z","closed_at":null,"body":"```sh\r\n...\\node_modules\\markdown-it\\lib\\index.js:477\r\n  plugin.apply(plugin, args);\r\n         ^\r\n\r\nTypeError: plugin.apply is not a function\r\n```\r\n\r\nSeems like the babel upgrade uses `exports.default`, which node does not load as a function:\r\n\r\n```sh\r\n$ npm install markdown-it-anchor\r\n$ node\r\n> require(\"markdown-it-anchor\")\r\n{ default:\r\n   { [Function: anchor]\r\n     defaults:\r\n      { level: 1,\r\n        slugify: [Function: slugify],\r\n        permalink: false,\r\n        renderPermalink: [Function: renderPermalink],\r\n        permalinkClass: 'header-anchor',\r\n        permalinkSymbol: '¶',\r\n        permalinkBefore: false } } }\r\n```\r\n\r\nWhich breaks `md.use(require('markdown-it-anchor'))`."}}