{"pull_request":{"state":"open","deletions":2,"user":{"avatar_url":"https://secure.gravatar.com/avatar/8e6488251bb7fd294791645f1fa33d68?d=https://a248.e.akamai.net/assets.github.com%2Fimages%2Fgravatars%2Fgravatar-140.png","gravatar_id":"8e6488251bb7fd294791645f1fa33d68","url":"https://api.github.com/users/lorenzogil","login":"lorenzogil","id":71676},"merged_by":null,"updated_at":"2011-11-17T10:02:50Z","closed_at":null,"base":{"ref":"master","user":{"avatar_url":"https://secure.gravatar.com/avatar/eb0f2f4a6272441d91c2d8cc330b563d?d=https://a248.e.akamai.net/assets.github.com%2Fimages%2Fgravatars%2Fgravatar-140.png","gravatar_id":"eb0f2f4a6272441d91c2d8cc330b563d","url":"https://api.github.com/users/Pita","login":"Pita","id":231810},"repo":{"name":"etherpad-lite","master_branch":null,"pushed_at":"2011-11-16T07:11:56Z","fork":false,"updated_at":"2011-11-16T22:57:56Z","clone_url":"https://github.com/Pita/etherpad-lite.git","homepage":"http://beta.etherpad.org","open_issues":44,"private":false,"forks":85,"language":"JavaScript","svn_url":"https://svn.github.com/Pita/etherpad-lite","url":"https://api.github.com/repos/Pita/etherpad-lite","owner":{"avatar_url":"https://secure.gravatar.com/avatar/eb0f2f4a6272441d91c2d8cc330b563d?d=https://a248.e.akamai.net/assets.github.com%2Fimages%2Fgravatars%2Fgravatar-140.png","gravatar_id":"eb0f2f4a6272441d91c2d8cc330b563d","url":"https://api.github.com/users/Pita","login":"Pita","id":231810},"html_url":"https://github.com/Pita/etherpad-lite","description":"An Etherpad based on node.js - Our goal is to make collaborative editing the standard on the web","size":496,"id":1529160,"watchers":746,"git_url":"git://github.com/Pita/etherpad-lite.git","created_at":"2011-03-26T13:09:02Z","ssh_url":"git@github.com:Pita/etherpad-lite.git"},"label":"Pita:master","sha":"fa9b36df0f86bc0bf5628cf0d7afcb9a0f2d792c"},"comments":0,"diff_url":"https://github.com/Pita/etherpad-lite/pull/204.diff","commits":5,"head":{"ref":"setHTML","user":{"avatar_url":"https://secure.gravatar.com/avatar/e3d898c03bae692e4d8205e070a202bb?d=https://a248.e.akamai.net/assets.github.com%2Fimages%2Fgravatars%2Fgravatar-orgs.png","gravatar_id":"e3d898c03bae692e4d8205e070a202bb","url":"https://api.github.com/users/Yaco-Sistemas","login":"Yaco-Sistemas","id":739519},"repo":{"name":"etherpad-lite","master_branch":null,"pushed_at":"2011-11-17T09:26:39Z","fork":true,"updated_at":"2011-11-17T09:26:39Z","clone_url":"https://github.com/Yaco-Sistemas/etherpad-lite.git","homepage":"http://beta.etherpad.org","open_issues":0,"private":false,"forks":0,"language":"JavaScript","svn_url":"https://svn.github.com/Yaco-Sistemas/etherpad-lite","url":"https://api.github.com/repos/Yaco-Sistemas/etherpad-lite","owner":{"avatar_url":"https://secure.gravatar.com/avatar/e3d898c03bae692e4d8205e070a202bb?d=https://a248.e.akamai.net/assets.github.com%2Fimages%2Fgravatars%2Fgravatar-orgs.png","gravatar_id":"e3d898c03bae692e4d8205e070a202bb","url":"https://api.github.com/users/Yaco-Sistemas","login":"Yaco-Sistemas","id":739519},"html_url":"https://github.com/Yaco-Sistemas/etherpad-lite","description":"An Etherpad based on node.js - Our goal is to make collaborative editing the standard on the web","size":116,"id":2679844,"watchers":1,"git_url":"git://github.com/Yaco-Sistemas/etherpad-lite.git","created_at":"2011-10-31T10:14:58Z","ssh_url":"git@github.com:Yaco-Sistemas/etherpad-lite.git"},"label":"Yaco-Sistemas:setHTML","sha":"a26918c69e2a8130333c395334eb45ba262e4aac"},"additions":820,"url":"https://api.github.com/repos/Pita/etherpad-lite/pulls/204","merged":false,"merged_at":null,"body":"This is the perfect partner for the getHTML API.\r\n\r\nAt the beginning I tried to to understand how the client code works with the ace2 editor and the easysync internal representation and all that stuff (I even read and understood the math paper)l. I wanted to add a changeset to the Pad with just the differences betweend the old content and the new one and I almost got it working but there were too many corner cases that made it crashes. Then I lowerd my requirements a little bit and put an intermediate state where I would set the pad content to blank before applying the new content. This made the code way easier and more mantenible IMHO.\r\n\r\nThe other thing I feel can be improved is the common code that runs both on the client and the server. Before my previous simplification there was quite a lot of this code and I changed the client code to be able to use it from the server side. After the simplification I discovered I didn't need that much code from the client.\r\n\r\nAnyway, I hope you like this new contribution.","_links":{"comments":{"href":"https://api.github.com/repos/Pita/etherpad-lite/issues/204/comments"},"html":{"href":"https://github.com/Pita/etherpad-lite/pull/204"},"review_comments":{"href":"https://api.github.com/repos/Pita/etherpad-lite/pulls/204/comments"},"self":{"href":"https://api.github.com/repos/Pita/etherpad-lite/pulls/204"}},"review_comments":0,"html_url":"https://github.com/Pita/etherpad-lite/pull/204","issue_url":"https://github.com/Pita/etherpad-lite/issues/204","title":"Implementation of the setHTML API","number":204,"mergeable":null,"id":503637,"changed_files":6,"patch_url":"https://github.com/Pita/etherpad-lite/pull/204.patch","created_at":"2011-11-17T10:02:50Z"},"action":"opened","number":204}