{"action":"created","issue":{"url":"https://api.github.com/repos/kss-node/kss-node/issues/158","labels_url":"https://api.github.com/repos/kss-node/kss-node/issues/158/labels{/name}","comments_url":"https://api.github.com/repos/kss-node/kss-node/issues/158/comments","events_url":"https://api.github.com/repos/kss-node/kss-node/issues/158/events","html_url":"https://github.com/kss-node/kss-node/issues/158","id":54241143,"number":158,"title":"Restore missing `kssModifier.markup()` method","user":{"login":"MadLittleMods","id":558581,"avatar_url":"https://avatars.githubusercontent.com/u/558581?v=3","gravatar_id":"","url":"https://api.github.com/users/MadLittleMods","html_url":"https://github.com/MadLittleMods","followers_url":"https://api.github.com/users/MadLittleMods/followers","following_url":"https://api.github.com/users/MadLittleMods/following{/other_user}","gists_url":"https://api.github.com/users/MadLittleMods/gists{/gist_id}","starred_url":"https://api.github.com/users/MadLittleMods/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/MadLittleMods/subscriptions","organizations_url":"https://api.github.com/users/MadLittleMods/orgs","repos_url":"https://api.github.com/users/MadLittleMods/repos","events_url":"https://api.github.com/users/MadLittleMods/events{/privacy}","received_events_url":"https://api.github.com/users/MadLittleMods/received_events","type":"User","site_admin":false},"labels":[],"state":"closed","locked":false,"assignee":null,"milestone":null,"comments":1,"created_at":"2015-01-13T20:06:28Z","updated_at":"2015-01-14T01:32:06Z","closed_at":"2015-01-14T01:32:06Z","body":"I tried out the latest from the repo(even the latest release 2.0.0 alpha.4) doesn't have the `markup` function.\r\n\r\nPlease note that even `kssModifier.data.markup` is empty.\r\n\r\nI rely on this function in order to show an example of the module with the modifier. I don't want to manually find/replace the section.markup everytime I need to use it.\r\n\r\nThis is from the [1.x branch](https://github.com/kss-node/kss-node/blob/993ab5810762211022bc80b41aef1a600e68f1b1/lib/kss_modifier.js#L53). In order to restore functionality, just add this function to bottom of `./lib/kss_modifier.js`\r\n```\r\nKssModifier.prototype.markup = function() {\r\n\tif (!(this.data.section && this.data.section.markup)) {\r\n\t\treturn false;\r\n\t}\r\n\r\n\treturn (this.data.section.markup() || '').replace(/\\{\\$modifiers\\}/g, this.className());\r\n};\r\n```\r\n\r\n---\r\n\r\nFor people using kss as a dependency and want to maintain legacy 1.x support and 2.x support. You can use this snippet to get the markup:\r\n```\r\nvar markup = kssModifier.markup ? kssModifier.markup() : (function() {\r\n\treturn (kssModifier.section().markup() || '').replace(/\\{\\$modifiers\\}/g, kssModifier.className());\r\n})();\r\n```\r\n"},"comment":{"url":"https://api.github.com/repos/kss-node/kss-node/issues/comments/69854884","html_url":"https://github.com/kss-node/kss-node/issues/158#issuecomment-69854884","issue_url":"https://api.github.com/repos/kss-node/kss-node/issues/158","id":69854884,"user":{"login":"JohnAlbin","id":33429,"avatar_url":"https://avatars.githubusercontent.com/u/33429?v=3","gravatar_id":"","url":"https://api.github.com/users/JohnAlbin","html_url":"https://github.com/JohnAlbin","followers_url":"https://api.github.com/users/JohnAlbin/followers","following_url":"https://api.github.com/users/JohnAlbin/following{/other_user}","gists_url":"https://api.github.com/users/JohnAlbin/gists{/gist_id}","starred_url":"https://api.github.com/users/JohnAlbin/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/JohnAlbin/subscriptions","organizations_url":"https://api.github.com/users/JohnAlbin/orgs","repos_url":"https://api.github.com/users/JohnAlbin/repos","events_url":"https://api.github.com/users/JohnAlbin/events{/privacy}","received_events_url":"https://api.github.com/users/JohnAlbin/received_events","type":"User","site_admin":false},"created_at":"2015-01-14T01:32:05Z","updated_at":"2015-01-14T01:32:05Z","body":"I've reverted the commit that removed that method."}}