{"action":"created","issue":{"url":"https://api.github.com/repos/michael-lazar/rtv/issues/274","repository_url":"https://api.github.com/repos/michael-lazar/rtv","labels_url":"https://api.github.com/repos/michael-lazar/rtv/issues/274/labels{/name}","comments_url":"https://api.github.com/repos/michael-lazar/rtv/issues/274/comments","events_url":"https://api.github.com/repos/michael-lazar/rtv/issues/274/events","html_url":"https://github.com/michael-lazar/rtv/issues/274","id":169772704,"number":274,"title":"Use markdown to format post and comment text","user":{"login":"5225225","id":8584210,"avatar_url":"https://avatars.githubusercontent.com/u/8584210?v=3","gravatar_id":"","url":"https://api.github.com/users/5225225","html_url":"https://github.com/5225225","followers_url":"https://api.github.com/users/5225225/followers","following_url":"https://api.github.com/users/5225225/following{/other_user}","gists_url":"https://api.github.com/users/5225225/gists{/gist_id}","starred_url":"https://api.github.com/users/5225225/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/5225225/subscriptions","organizations_url":"https://api.github.com/users/5225225/orgs","repos_url":"https://api.github.com/users/5225225/repos","events_url":"https://api.github.com/users/5225225/events{/privacy}","received_events_url":"https://api.github.com/users/5225225/received_events","type":"User","site_admin":false},"labels":[{"url":"https://api.github.com/repos/michael-lazar/rtv/labels/enhancement","name":"enhancement","color":"84b6eb"}],"state":"open","locked":false,"assignee":null,"assignees":[],"milestone":null,"comments":2,"created_at":"2016-08-07T00:10:28Z","updated_at":"2016-08-08T19:19:32Z","closed_at":null,"body":"Some things like links can't be done, but the majority of the syntax used can be rendered fine on a terminal. Should probably use an existing markdown implementation and either add an output format that's easy for us to understand, or try to parse the HTML output that's given."},"comment":{"url":"https://api.github.com/repos/michael-lazar/rtv/issues/comments/238346785","html_url":"https://github.com/michael-lazar/rtv/issues/274#issuecomment-238346785","issue_url":"https://api.github.com/repos/michael-lazar/rtv/issues/274","id":238346785,"user":{"login":"5225225","id":8584210,"avatar_url":"https://avatars.githubusercontent.com/u/8584210?v=3","gravatar_id":"","url":"https://api.github.com/users/5225225","html_url":"https://github.com/5225225","followers_url":"https://api.github.com/users/5225225/followers","following_url":"https://api.github.com/users/5225225/following{/other_user}","gists_url":"https://api.github.com/users/5225225/gists{/gist_id}","starred_url":"https://api.github.com/users/5225225/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/5225225/subscriptions","organizations_url":"https://api.github.com/users/5225225/orgs","repos_url":"https://api.github.com/users/5225225/repos","events_url":"https://api.github.com/users/5225225/events{/privacy}","received_events_url":"https://api.github.com/users/5225225/received_events","type":"User","site_admin":false},"created_at":"2016-08-08T19:19:32Z","updated_at":"2016-08-08T19:19:32Z","body":"I think a good way to do this would be to render the markdown to a list of chunks with their text and any needed formatting. Then do a loop like\r\n\r\n```python\r\nfor chunk, attr in chunks:\r\n    stdscr.addstr(chunk, attr)\r\n```\r\n\r\nMaybe make a function for the rendering to chunks where the chunk function is just given the markdown and screen width (And it handles the text wrapping as well, since doing it beforehand could screw with the formatting).\r\n\r\nThat way would be faster than doing it character by character, and for posts with no formatting it would be pretty much identical to the way we're currently doing it."}}
{"actor":{"display_login":"5225225"}}