{"action":"created","issue":{"url":"https://api.github.com/repos/lepture/mistune/issues/94","repository_url":"https://api.github.com/repos/lepture/mistune","labels_url":"https://api.github.com/repos/lepture/mistune/issues/94/labels{/name}","comments_url":"https://api.github.com/repos/lepture/mistune/issues/94/comments","events_url":"https://api.github.com/repos/lepture/mistune/issues/94/events","html_url":"https://github.com/lepture/mistune/issues/94","id":144993173,"number":94,"title":"Support for styled spans","user":{"login":"vsajip","id":130553,"avatar_url":"https://avatars.githubusercontent.com/u/130553?v=3","gravatar_id":"","url":"https://api.github.com/users/vsajip","html_url":"https://github.com/vsajip","followers_url":"https://api.github.com/users/vsajip/followers","following_url":"https://api.github.com/users/vsajip/following{/other_user}","gists_url":"https://api.github.com/users/vsajip/gists{/gist_id}","starred_url":"https://api.github.com/users/vsajip/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/vsajip/subscriptions","organizations_url":"https://api.github.com/users/vsajip/orgs","repos_url":"https://api.github.com/users/vsajip/repos","events_url":"https://api.github.com/users/vsajip/events{/privacy}","received_events_url":"https://api.github.com/users/vsajip/received_events","type":"User","site_admin":false},"labels":[],"state":"open","locked":false,"assignee":null,"milestone":null,"comments":2,"created_at":"2016-03-31T19:20:50Z","updated_at":"2016-04-04T08:09:33Z","closed_at":null,"body":"I needed to support styled spans (like `code` but with user-defined styles). As mentioned in issue #79, this is hard to do via the current extension mechanisms. I have therefore implemented it in a branch, by making small changes (a couple of changes to patterns in `InlineGrammar`, and updated `output_code` and `codespan` methods) - around 10 lines in total. It works like this:\r\n\r\n`` `code` `` is handled as before, but `` :fizz buzz:`foo` `` is rendered to `<span class=\"fizz buzz\">foo</span>`.\r\n\r\nI've updated the test fixtures too, and all tests pass. Would you be interested in a patch / PR for this?"},"comment":{"url":"https://api.github.com/repos/lepture/mistune/issues/comments/205184073","html_url":"https://github.com/lepture/mistune/issues/94#issuecomment-205184073","issue_url":"https://api.github.com/repos/lepture/mistune/issues/94","id":205184073,"user":{"login":"vsajip","id":130553,"avatar_url":"https://avatars.githubusercontent.com/u/130553?v=3","gravatar_id":"","url":"https://api.github.com/users/vsajip","html_url":"https://github.com/vsajip","followers_url":"https://api.github.com/users/vsajip/followers","following_url":"https://api.github.com/users/vsajip/following{/other_user}","gists_url":"https://api.github.com/users/vsajip/gists{/gist_id}","starred_url":"https://api.github.com/users/vsajip/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/vsajip/subscriptions","organizations_url":"https://api.github.com/users/vsajip/orgs","repos_url":"https://api.github.com/users/vsajip/repos","events_url":"https://api.github.com/users/vsajip/events{/privacy}","received_events_url":"https://api.github.com/users/vsajip/received_events","type":"User","site_admin":false},"created_at":"2016-04-04T08:09:33Z","updated_at":"2016-04-04T08:09:33Z","body":"Okay, but I've realised there's a more general approach which works without changes to the core. I now use `[span contents](custom-link)` and handle it in my `Renderer` subclass. This has the additional benefit of allowing markdown inside the `[span contents]` :-)\r\n\r\nJust for reference, [here is the patch](https://gist.github.com/vsajip/80ef81a46c7235d8470d6724be46cbbe)."}}