{"action":"created","comment":{"url":"https://api.github.com/repos/nzzdev/livingdocs-render-decorator/pulls/comments/28498033","id":28498033,"diff_hunk":"@@ -0,0 +1,292 @@\n+refsInline = true\n+usedRefs = undefined\n+refs = undefined\n+\n+module.exports =\n+\n+  handleComponent: (component, handlers, params) ->\n+    identifier = component.toJson().identifier\n+    if !identifier\n+      return\n+    type = identifier.split('.')[1]\n+    if !(typeof handlers[type] == 'function')\n+      return\n+    handlers[type](component.toJson(), params.metadata)\n+\n+  handleTextComponent: (component) ->\n+    content = component.content\n+    {\n+      'style': 'p'\n+      'text': if content.text then content.text else ''\n+      'boxes': []\n+    }\n+\n+  handleFootnoteComponent : (component) ->\n+    content = component.content\n+    if content.index\n+      component.content.text = \"<sup>#{content.index}</sup> #{content.text}\"\n+    module.exports.handleTextComponent component\n+\n+  handleImageComponent: (component, article) ->\n+    content = component.content\n+    content.image = content.image || {}\n+    if !content.image.url\n+      content.image.url = ''\n+    guid = getLivingdocsImageGuid(content.image.url)","path":"src/renderer/mobile-api/componentHandler.coffee","position":35,"original_position":35,"commit_id":"465effbd32742fc187c0576431dff7d177ba2117","original_commit_id":"465effbd32742fc187c0576431dff7d177ba2117","user":{"login":"marcbachmann","id":431376,"avatar_url":"https://avatars.githubusercontent.com/u/431376?v=3","gravatar_id":"","url":"https://api.github.com/users/marcbachmann","html_url":"https://github.com/marcbachmann","followers_url":"https://api.github.com/users/marcbachmann/followers","following_url":"https://api.github.com/users/marcbachmann/following{/other_user}","gists_url":"https://api.github.com/users/marcbachmann/gists{/gist_id}","starred_url":"https://api.github.com/users/marcbachmann/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/marcbachmann/subscriptions","organizations_url":"https://api.github.com/users/marcbachmann/orgs","repos_url":"https://api.github.com/users/marcbachmann/repos","events_url":"https://api.github.com/users/marcbachmann/events{/privacy}","received_events_url":"https://api.github.com/users/marcbachmann/received_events","type":"User","site_admin":false},"body":"Why do you parse the uuid from the url? Isn't the url itself reliable enough?","created_at":"2015-04-16T10:13:24Z","updated_at":"2015-04-16T10:13:24Z","html_url":"https://github.com/nzzdev/livingdocs-render-decorator/pull/31#discussion_r28498033","pull_request_url":"https://api.github.com/repos/nzzdev/livingdocs-render-decorator/pulls/31","_links":{"self":{"href":"https://api.github.com/repos/nzzdev/livingdocs-render-decorator/pulls/comments/28498033"},"html":{"href":"https://github.com/nzzdev/livingdocs-render-decorator/pull/31#discussion_r28498033"},"pull_request":{"href":"https://api.github.com/repos/nzzdev/livingdocs-render-decorator/pulls/31"}}},"pull_request":{"url":"https://api.github.com/repos/nzzdev/livingdocs-render-decorator/pulls/31","id":32849067,"html_url":"https://github.com/nzzdev/livingdocs-render-decorator/pull/31","diff_url":"https://github.com/nzzdev/livingdocs-render-decorator/pull/31.diff","patch_url":"https://github.com/nzzdev/livingdocs-render-decorator/pull/31.patch","issue_url":"https://api.github.com/repos/nzzdev/livingdocs-render-decorator/issues/31","number":31,"state":"open","locked":false,"title":"WCMS-1113 concept for renderer","user":{"login":"mheiniger","id":835108,"avatar_url":"https://avatars.githubusercontent.com/u/835108?v=3","gravatar_id":"","url":"https://api.github.com/users/mheiniger","html_url":"https://github.com/mheiniger","followers_url":"https://api.github.com/users/mheiniger/followers","following_url":"https://api.github.com/users/mheiniger/following{/other_user}","gists_url":"https://api.github.com/users/mheiniger/gists{/gist_id}","starred_url":"https://api.github.com/users/mheiniger/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/mheiniger/subscriptions","organizations_url":"https://api.github.com/users/mheiniger/orgs","repos_url":"https://api.github.com/users/mheiniger/repos","events_url":"https://api.github.com/users/mheiniger/events{/privacy}","received_events_url":"https://api.github.com/users/mheiniger/received_events","type":"User","site_admin":false},"body":"https://nzzdev.atlassian.net/browse/WCMS-1113\r\n\r\nThis is a first attempt to create a completely different renderer in the render-decorator, which does not produce HTML but JSON output. It could also be a cornerstone for additional channel-renderers like for Atom-Feeds, Plain-Text feeds and others.\r\n\r\n* introduce renderers\r\n* add tests\r\n* update quote component\r\n* add fixtures\r\n* make test run\r\n* add local designs for tests\r\n* integrate removal of header into renderer, because lead-image is still needed in a different place\r\n* create metadata\r\n* adapt fixtures to new requirements for mobile (just width, no height)\r\n* fixed tests\r\n* add moment.js, update shrinkwrap\r\n* remove temporary console.log 's\r\n* fix publication/futurepublication time\r\n* set defaults to '' for metadata\r\n* add `&nbsp;` replacement to stripTags\r\n* add more fixtures for tests\r\n* add time calculations with moment.js\r\n* add morpheus designs 0.5.0 and 0.6.0, remove broken 0.2.1\r\n* calculate department trees\r\n* pass weburl\r\n* fix more tests\r\n* use renders in tests from the \"outside\" like they would be used normally\r\n* pass config to render method\r\n* added test with missing departmentTree\r\n* add some empty-checks\r\n* add emptyImageRemover\r\n* fix for not  defined departments\r\n* additional test\r\n* add defaults\r\n* add empty-checks\r\n* add test\r\n* use timezone\r\n* update package.json & shrinkwrap\r\n* refactoring","created_at":"2015-04-08T11:00:36Z","updated_at":"2015-04-16T10:13:24Z","closed_at":null,"merged_at":null,"merge_commit_sha":"3d1a0a1a6dc056cab3c507e450b267216f35d761","assignee":null,"milestone":null,"commits_url":"https://api.github.com/repos/nzzdev/livingdocs-render-decorator/pulls/31/commits","review_comments_url":"https://api.github.com/repos/nzzdev/livingdocs-render-decorator/pulls/31/comments","review_comment_url":"https://api.github.com/repos/nzzdev/livingdocs-render-decorator/pulls/comments{/number}","comments_url":"https://api.github.com/repos/nzzdev/livingdocs-render-decorator/issues/31/comments","statuses_url":"https://api.github.com/repos/nzzdev/livingdocs-render-decorator/statuses/465effbd32742fc187c0576431dff7d177ba2117","head":{"label":"nzzdev:WCMS-1113-concept-for-renderer","ref":"WCMS-1113-concept-for-renderer","sha":"465effbd32742fc187c0576431dff7d177ba2117","user":{"login":"nzzdev","id":1212529,"avatar_url":"https://avatars.githubusercontent.com/u/1212529?v=3","gravatar_id":"","url":"https://api.github.com/users/nzzdev","html_url":"https://github.com/nzzdev","followers_url":"https://api.github.com/users/nzzdev/followers","following_url":"https://api.github.com/users/nzzdev/following{/other_user}","gists_url":"https://api.github.com/users/nzzdev/gists{/gist_id}","starred_url":"https://api.github.com/users/nzzdev/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/nzzdev/subscriptions","organizations_url":"https://api.github.com/users/nzzdev/orgs","repos_url":"https://api.github.com/users/nzzdev/repos","events_url":"https://api.github.com/users/nzzdev/events{/privacy}","received_events_url":"https://api.github.com/users/nzzdev/received_events","type":"Organization","site_admin":false},"repo":{"id":29530337,"name":"livingdocs-render-decorator","full_name":"nzzdev/livingdocs-render-decorator","owner":{"login":"nzzdev","id":1212529,"avatar_url":"https://avatars.githubusercontent.com/u/1212529?v=3","gravatar_id":"","url":"https://api.github.com/users/nzzdev","html_url":"https://github.com/nzzdev","followers_url":"https://api.github.com/users/nzzdev/followers","following_url":"https://api.github.com/users/nzzdev/following{/other_user}","gists_url":"https://api.github.com/users/nzzdev/gists{/gist_id}","starred_url":"https://api.github.com/users/nzzdev/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/nzzdev/subscriptions","organizations_url":"https://api.github.com/users/nzzdev/orgs","repos_url":"https://api.github.com/users/nzzdev/repos","events_url":"https://api.github.com/users/nzzdev/events{/privacy}","received_events_url":"https://api.github.com/users/nzzdev/received_events","type":"Organization","site_admin":false},"private":false,"html_url":"https://github.com/nzzdev/livingdocs-render-decorator","description":"","fork":false,"url":"https://api.github.com/repos/nzzdev/livingdocs-render-decorator","forks_url":"https://api.github.com/repos/nzzdev/livingdocs-render-decorator/forks","keys_url":"https://api.github.com/repos/nzzdev/livingdocs-render-decorator/keys{/key_id}","collaborators_url":"https://api.github.com/repos/nzzdev/livingdocs-render-decorator/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/nzzdev/livingdocs-render-decorator/teams","hooks_url":"https://api.github.com/repos/nzzdev/livingdocs-render-decorator/hooks","issue_events_url":"https://api.github.com/repos/nzzdev/livingdocs-render-decorator/issues/events{/number}","events_url":"https://api.github.com/repos/nzzdev/livingdocs-render-decorator/events","assignees_url":"https://api.github.com/repos/nzzdev/livingdocs-render-decorator/assignees{/user}","branches_url":"https://api.github.com/repos/nzzdev/livingdocs-render-decorator/branches{/branch}","tags_url":"https://api.github.com/repos/nzzdev/livingdocs-render-decorator/tags","blobs_url":"https://api.github.com/repos/nzzdev/livingdocs-render-decorator/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/nzzdev/livingdocs-render-decorator/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/nzzdev/livingdocs-render-decorator/git/refs{/sha}","trees_url":"https://api.github.com/repos/nzzdev/livingdocs-render-decorator/git/trees{/sha}","statuses_url":"https://api.github.com/repos/nzzdev/livingdocs-render-decorator/statuses/{sha}","languages_url":"https://api.github.com/repos/nzzdev/livingdocs-render-decorator/languages","stargazers_url":"https://api.github.com/repos/nzzdev/livingdocs-render-decorator/stargazers","contributors_url":"https://api.github.com/repos/nzzdev/livingdocs-render-decorator/contributors","subscribers_url":"https://api.github.com/repos/nzzdev/livingdocs-render-decorator/subscribers","subscription_url":"https://api.github.com/repos/nzzdev/livingdocs-render-decorator/subscription","commits_url":"https://api.github.com/repos/nzzdev/livingdocs-render-decorator/commits{/sha}","git_commits_url":"https://api.github.com/repos/nzzdev/livingdocs-render-decorator/git/commits{/sha}","comments_url":"https://api.github.com/repos/nzzdev/livingdocs-render-decorator/comments{/number}","issue_comment_url":"https://api.github.com/repos/nzzdev/livingdocs-render-decorator/issues/comments{/number}","contents_url":"https://api.github.com/repos/nzzdev/livingdocs-render-decorator/contents/{+path}","compare_url":"https://api.github.com/repos/nzzdev/livingdocs-render-decorator/compare/{base}...{head}","merges_url":"https://api.github.com/repos/nzzdev/livingdocs-render-decorator/merges","archive_url":"https://api.github.com/repos/nzzdev/livingdocs-render-decorator/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/nzzdev/livingdocs-render-decorator/downloads","issues_url":"https://api.github.com/repos/nzzdev/livingdocs-render-decorator/issues{/number}","pulls_url":"https://api.github.com/repos/nzzdev/livingdocs-render-decorator/pulls{/number}","milestones_url":"https://api.github.com/repos/nzzdev/livingdocs-render-decorator/milestones{/number}","notifications_url":"https://api.github.com/repos/nzzdev/livingdocs-render-decorator/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/nzzdev/livingdocs-render-decorator/labels{/name}","releases_url":"https://api.github.com/repos/nzzdev/livingdocs-render-decorator/releases{/id}","created_at":"2015-01-20T13:12:21Z","updated_at":"2015-04-07T10:47:44Z","pushed_at":"2015-04-16T09:01:10Z","git_url":"git://github.com/nzzdev/livingdocs-render-decorator.git","ssh_url":"git@github.com:nzzdev/livingdocs-render-decorator.git","clone_url":"https://github.com/nzzdev/livingdocs-render-decorator.git","svn_url":"https://github.com/nzzdev/livingdocs-render-decorator","homepage":null,"size":1215,"stargazers_count":0,"watchers_count":0,"language":"CoffeeScript","has_issues":true,"has_downloads":true,"has_wiki":true,"has_pages":false,"forks_count":0,"mirror_url":null,"open_issues_count":3,"forks":0,"open_issues":3,"watchers":0,"default_branch":"master"}},"base":{"label":"nzzdev:master","ref":"master","sha":"01e8abe21c816fdb0ee09b6b22dc963defed18c6","user":{"login":"nzzdev","id":1212529,"avatar_url":"https://avatars.githubusercontent.com/u/1212529?v=3","gravatar_id":"","url":"https://api.github.com/users/nzzdev","html_url":"https://github.com/nzzdev","followers_url":"https://api.github.com/users/nzzdev/followers","following_url":"https://api.github.com/users/nzzdev/following{/other_user}","gists_url":"https://api.github.com/users/nzzdev/gists{/gist_id}","starred_url":"https://api.github.com/users/nzzdev/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/nzzdev/subscriptions","organizations_url":"https://api.github.com/users/nzzdev/orgs","repos_url":"https://api.github.com/users/nzzdev/repos","events_url":"https://api.github.com/users/nzzdev/events{/privacy}","received_events_url":"https://api.github.com/users/nzzdev/received_events","type":"Organization","site_admin":false},"repo":{"id":29530337,"name":"livingdocs-render-decorator","full_name":"nzzdev/livingdocs-render-decorator","owner":{"login":"nzzdev","id":1212529,"avatar_url":"https://avatars.githubusercontent.com/u/1212529?v=3","gravatar_id":"","url":"https://api.github.com/users/nzzdev","html_url":"https://github.com/nzzdev","followers_url":"https://api.github.com/users/nzzdev/followers","following_url":"https://api.github.com/users/nzzdev/following{/other_user}","gists_url":"https://api.github.com/users/nzzdev/gists{/gist_id}","starred_url":"https://api.github.com/users/nzzdev/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/nzzdev/subscriptions","organizations_url":"https://api.github.com/users/nzzdev/orgs","repos_url":"https://api.github.com/users/nzzdev/repos","events_url":"https://api.github.com/users/nzzdev/events{/privacy}","received_events_url":"https://api.github.com/users/nzzdev/received_events","type":"Organization","site_admin":false},"private":false,"html_url":"https://github.com/nzzdev/livingdocs-render-decorator","description":"","fork":false,"url":"https://api.github.com/repos/nzzdev/livingdocs-render-decorator","forks_url":"https://api.github.com/repos/nzzdev/livingdocs-render-decorator/forks","keys_url":"https://api.github.com/repos/nzzdev/livingdocs-render-decorator/keys{/key_id}","collaborators_url":"https://api.github.com/repos/nzzdev/livingdocs-render-decorator/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/nzzdev/livingdocs-render-decorator/teams","hooks_url":"https://api.github.com/repos/nzzdev/livingdocs-render-decorator/hooks","issue_events_url":"https://api.github.com/repos/nzzdev/livingdocs-render-decorator/issues/events{/number}","events_url":"https://api.github.com/repos/nzzdev/livingdocs-render-decorator/events","assignees_url":"https://api.github.com/repos/nzzdev/livingdocs-render-decorator/assignees{/user}","branches_url":"https://api.github.com/repos/nzzdev/livingdocs-render-decorator/branches{/branch}","tags_url":"https://api.github.com/repos/nzzdev/livingdocs-render-decorator/tags","blobs_url":"https://api.github.com/repos/nzzdev/livingdocs-render-decorator/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/nzzdev/livingdocs-render-decorator/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/nzzdev/livingdocs-render-decorator/git/refs{/sha}","trees_url":"https://api.github.com/repos/nzzdev/livingdocs-render-decorator/git/trees{/sha}","statuses_url":"https://api.github.com/repos/nzzdev/livingdocs-render-decorator/statuses/{sha}","languages_url":"https://api.github.com/repos/nzzdev/livingdocs-render-decorator/languages","stargazers_url":"https://api.github.com/repos/nzzdev/livingdocs-render-decorator/stargazers","contributors_url":"https://api.github.com/repos/nzzdev/livingdocs-render-decorator/contributors","subscribers_url":"https://api.github.com/repos/nzzdev/livingdocs-render-decorator/subscribers","subscription_url":"https://api.github.com/repos/nzzdev/livingdocs-render-decorator/subscription","commits_url":"https://api.github.com/repos/nzzdev/livingdocs-render-decorator/commits{/sha}","git_commits_url":"https://api.github.com/repos/nzzdev/livingdocs-render-decorator/git/commits{/sha}","comments_url":"https://api.github.com/repos/nzzdev/livingdocs-render-decorator/comments{/number}","issue_comment_url":"https://api.github.com/repos/nzzdev/livingdocs-render-decorator/issues/comments{/number}","contents_url":"https://api.github.com/repos/nzzdev/livingdocs-render-decorator/contents/{+path}","compare_url":"https://api.github.com/repos/nzzdev/livingdocs-render-decorator/compare/{base}...{head}","merges_url":"https://api.github.com/repos/nzzdev/livingdocs-render-decorator/merges","archive_url":"https://api.github.com/repos/nzzdev/livingdocs-render-decorator/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/nzzdev/livingdocs-render-decorator/downloads","issues_url":"https://api.github.com/repos/nzzdev/livingdocs-render-decorator/issues{/number}","pulls_url":"https://api.github.com/repos/nzzdev/livingdocs-render-decorator/pulls{/number}","milestones_url":"https://api.github.com/repos/nzzdev/livingdocs-render-decorator/milestones{/number}","notifications_url":"https://api.github.com/repos/nzzdev/livingdocs-render-decorator/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/nzzdev/livingdocs-render-decorator/labels{/name}","releases_url":"https://api.github.com/repos/nzzdev/livingdocs-render-decorator/releases{/id}","created_at":"2015-01-20T13:12:21Z","updated_at":"2015-04-07T10:47:44Z","pushed_at":"2015-04-16T09:01:10Z","git_url":"git://github.com/nzzdev/livingdocs-render-decorator.git","ssh_url":"git@github.com:nzzdev/livingdocs-render-decorator.git","clone_url":"https://github.com/nzzdev/livingdocs-render-decorator.git","svn_url":"https://github.com/nzzdev/livingdocs-render-decorator","homepage":null,"size":1215,"stargazers_count":0,"watchers_count":0,"language":"CoffeeScript","has_issues":true,"has_downloads":true,"has_wiki":true,"has_pages":false,"forks_count":0,"mirror_url":null,"open_issues_count":3,"forks":0,"open_issues":3,"watchers":0,"default_branch":"master"}},"_links":{"self":{"href":"https://api.github.com/repos/nzzdev/livingdocs-render-decorator/pulls/31"},"html":{"href":"https://github.com/nzzdev/livingdocs-render-decorator/pull/31"},"issue":{"href":"https://api.github.com/repos/nzzdev/livingdocs-render-decorator/issues/31"},"comments":{"href":"https://api.github.com/repos/nzzdev/livingdocs-render-decorator/issues/31/comments"},"review_comments":{"href":"https://api.github.com/repos/nzzdev/livingdocs-render-decorator/pulls/31/comments"},"review_comment":{"href":"https://api.github.com/repos/nzzdev/livingdocs-render-decorator/pulls/comments{/number}"},"commits":{"href":"https://api.github.com/repos/nzzdev/livingdocs-render-decorator/pulls/31/commits"},"statuses":{"href":"https://api.github.com/repos/nzzdev/livingdocs-render-decorator/statuses/465effbd32742fc187c0576431dff7d177ba2117"}}}}