{"action":"created","issue":{"url":"https://api.github.com/repos/russross/blackfriday/issues/218","labels_url":"https://api.github.com/repos/russross/blackfriday/issues/218/labels{/name}","comments_url":"https://api.github.com/repos/russross/blackfriday/issues/218/comments","events_url":"https://api.github.com/repos/russross/blackfriday/issues/218/events","html_url":"https://github.com/russross/blackfriday/issues/218","id":116193291,"number":218,"title":"Discussion: initial work on v2","user":{"login":"rtfb","id":426340,"avatar_url":"https://avatars.githubusercontent.com/u/426340?v=3","gravatar_id":"","url":"https://api.github.com/users/rtfb","html_url":"https://github.com/rtfb","followers_url":"https://api.github.com/users/rtfb/followers","following_url":"https://api.github.com/users/rtfb/following{/other_user}","gists_url":"https://api.github.com/users/rtfb/gists{/gist_id}","starred_url":"https://api.github.com/users/rtfb/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/rtfb/subscriptions","organizations_url":"https://api.github.com/users/rtfb/orgs","repos_url":"https://api.github.com/users/rtfb/repos","events_url":"https://api.github.com/users/rtfb/events{/privacy}","received_events_url":"https://api.github.com/users/rtfb/received_events","type":"User","site_admin":false},"labels":[],"state":"open","locked":false,"assignee":null,"milestone":null,"comments":1,"created_at":"2015-11-10T20:20:21Z","updated_at":"2015-11-10T23:52:47Z","closed_at":null,"body":"I have rebased my v2 experiments on top the latest master and pushed them to v2 branch for eyeballing.\r\n\r\nHere's what I was doing and where I stand:\r\n\r\n* All constants renamed from C_STYLE to IdiomaticGo (and plain ints to typed\r\n  constants). The rename was mechanical so far, I didn't try to take a chance\r\n  and look for opportunities to eliminate naming inconsistencies; but we\r\n  probably should do that while we're breaking the compatibility. Suggestions\r\n  welcome.\r\n* Renderer interface overhaul. Eliminated callbacks from renderer methods.\r\n  #120 suggested changing `*bytes.Buffer` to `io.Writer`, but I tried another\r\n  approach: leaving all writing business to the renderer internals.\r\n* #189 is probably fixed as side effect: no more callbacks, no more dead\r\n  loops.\r\n* When table of contents is enabled, it still behaves the old way: backups\r\n  all the document in a temp buffer, truncates it, writes out TOC, writes back\r\n  temp buffer. I don't see an easy way around it.\r\n\r\nThe next big thing I'm going to try is constructing an actual AST before rendering. This should allow to clean up our internal code substantially in some places and further simplify the renderer interface (and properly fix the TOC problem).\r\n\r\nComments welcome."},"comment":{"url":"https://api.github.com/repos/russross/blackfriday/issues/comments/155605989","html_url":"https://github.com/russross/blackfriday/issues/218#issuecomment-155605989","issue_url":"https://api.github.com/repos/russross/blackfriday/issues/218","id":155605989,"user":{"login":"russross","id":65428,"avatar_url":"https://avatars.githubusercontent.com/u/65428?v=3","gravatar_id":"","url":"https://api.github.com/users/russross","html_url":"https://github.com/russross","followers_url":"https://api.github.com/users/russross/followers","following_url":"https://api.github.com/users/russross/following{/other_user}","gists_url":"https://api.github.com/users/russross/gists{/gist_id}","starred_url":"https://api.github.com/users/russross/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/russross/subscriptions","organizations_url":"https://api.github.com/users/russross/orgs","repos_url":"https://api.github.com/users/russross/repos","events_url":"https://api.github.com/users/russross/events{/privacy}","received_events_url":"https://api.github.com/users/russross/received_events","type":"User","site_admin":false},"created_at":"2015-11-10T23:52:47Z","updated_at":"2015-11-10T23:52:47Z","body":"I haven't had a chance to look at it yet, but from your description I can say that this sounds like the right direction to me. I especially like the idea of moving to an AST where users can manipulate it freely and still use the normal HTML renderer when the are finished making changes.\r\n\r\nThe only thing I would add is this: don't feel like you need to wait for my approval when you are ready to commit to these large changes. When you think it is ready, you should be the one to make the call.\r\n\r\nThanks again for all of your work on this project!"}}