{"action":"created","comment":{"url":"https://api.github.com/repos/vladimyr/wolfram-query/pulls/comments/78360513","id":78360513,"diff_hunk":"@@ -6,14 +6,19 @@ const assign = utils.assign;\n const isEmpty = utils.isEmpty;\n const typedVal = utils.typedVal;\n \n-const COLUMN_DELIMITER = ' | ';\n+const COLUMN_DELIMITER = '|';\n \n function processPlaintext(plaintext) {\n   if (!plaintext) return plaintext;\n \n   let lines = plaintext.split('\\n');\n-  return lines.map(line =>\n-    line.split(COLUMN_DELIMITER).map(column => column.trim()));\n+\n+  // Trim whitespace out of individual lines;\n+  // remove empty leftover lines\n+  return lines.map(line => line.split(COLUMN_DELIMITER)\n+                               .map(column => column.trim())\n+                               .filter(column => column))","path":"lib/parse.js","position":18,"original_position":18,"commit_id":"40369c6bd9f3d86156f9b158db30c85b6c7c96c4","original_commit_id":"40369c6bd9f3d86156f9b158db30c85b6c7c96c4","user":{"login":"vladimyr","id":1170440,"avatar_url":"https://avatars.githubusercontent.com/u/1170440?v=3","gravatar_id":"","url":"https://api.github.com/users/vladimyr","html_url":"https://github.com/vladimyr","followers_url":"https://api.github.com/users/vladimyr/followers","following_url":"https://api.github.com/users/vladimyr/following{/other_user}","gists_url":"https://api.github.com/users/vladimyr/gists{/gist_id}","starred_url":"https://api.github.com/users/vladimyr/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/vladimyr/subscriptions","organizations_url":"https://api.github.com/users/vladimyr/orgs","repos_url":"https://api.github.com/users/vladimyr/repos","events_url":"https://api.github.com/users/vladimyr/events{/privacy}","received_events_url":"https://api.github.com/users/vladimyr/received_events","type":"User","site_admin":false},"body":"Extract this column filtering to separate helper, something like:\r\n```js\r\nfunction parseLine(line, columnDelimiter=COLUMN_DELIMITER) {\r\n   let columns = line.split(columnDelimiter).map(column => column.trim());\r\n   return columns.filter(column => column.length > 0);\r\n}\r\n```\r\n\r\nThen you can use it in following manner:\r\n```js\r\nreturn lines.map(line => parseLine(line));\r\n```","created_at":"2016-09-12T12:13:32Z","updated_at":"2016-09-12T12:13:32Z","html_url":"https://github.com/vladimyr/wolfram-query/pull/2#discussion_r78360513","pull_request_url":"https://api.github.com/repos/vladimyr/wolfram-query/pulls/2","_links":{"self":{"href":"https://api.github.com/repos/vladimyr/wolfram-query/pulls/comments/78360513"},"html":{"href":"https://github.com/vladimyr/wolfram-query/pull/2#discussion_r78360513"},"pull_request":{"href":"https://api.github.com/repos/vladimyr/wolfram-query/pulls/2"}}},"pull_request":{"url":"https://api.github.com/repos/vladimyr/wolfram-query/pulls/2","id":84855466,"html_url":"https://github.com/vladimyr/wolfram-query/pull/2","diff_url":"https://github.com/vladimyr/wolfram-query/pull/2.diff","patch_url":"https://github.com/vladimyr/wolfram-query/pull/2.patch","issue_url":"https://api.github.com/repos/vladimyr/wolfram-query/issues/2","number":2,"state":"open","locked":false,"title":"Plaintext subNodes may contain empty elements","user":{"login":"b0rza","id":6151763,"avatar_url":"https://avatars.githubusercontent.com/u/6151763?v=3","gravatar_id":"","url":"https://api.github.com/users/b0rza","html_url":"https://github.com/b0rza","followers_url":"https://api.github.com/users/b0rza/followers","following_url":"https://api.github.com/users/b0rza/following{/other_user}","gists_url":"https://api.github.com/users/b0rza/gists{/gist_id}","starred_url":"https://api.github.com/users/b0rza/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/b0rza/subscriptions","organizations_url":"https://api.github.com/users/b0rza/orgs","repos_url":"https://api.github.com/users/b0rza/repos","events_url":"https://api.github.com/users/b0rza/events{/privacy}","received_events_url":"https://api.github.com/users/b0rza/received_events","type":"User","site_admin":false},"body":"See [issue](https://github.com/vladimyr/wolfram-query/issues/1)","created_at":"2016-09-12T11:29:33Z","updated_at":"2016-09-12T12:13:32Z","closed_at":null,"merged_at":null,"merge_commit_sha":"68e8f594dcedd400a0a407d1c792fb963c223978","assignee":null,"assignees":[],"milestone":null,"commits_url":"https://api.github.com/repos/vladimyr/wolfram-query/pulls/2/commits","review_comments_url":"https://api.github.com/repos/vladimyr/wolfram-query/pulls/2/comments","review_comment_url":"https://api.github.com/repos/vladimyr/wolfram-query/pulls/comments{/number}","comments_url":"https://api.github.com/repos/vladimyr/wolfram-query/issues/2/comments","statuses_url":"https://api.github.com/repos/vladimyr/wolfram-query/statuses/40369c6bd9f3d86156f9b158db30c85b6c7c96c4","head":{"label":"b0rza:issue-1","ref":"issue-1","sha":"40369c6bd9f3d86156f9b158db30c85b6c7c96c4","user":{"login":"b0rza","id":6151763,"avatar_url":"https://avatars.githubusercontent.com/u/6151763?v=3","gravatar_id":"","url":"https://api.github.com/users/b0rza","html_url":"https://github.com/b0rza","followers_url":"https://api.github.com/users/b0rza/followers","following_url":"https://api.github.com/users/b0rza/following{/other_user}","gists_url":"https://api.github.com/users/b0rza/gists{/gist_id}","starred_url":"https://api.github.com/users/b0rza/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/b0rza/subscriptions","organizations_url":"https://api.github.com/users/b0rza/orgs","repos_url":"https://api.github.com/users/b0rza/repos","events_url":"https://api.github.com/users/b0rza/events{/privacy}","received_events_url":"https://api.github.com/users/b0rza/received_events","type":"User","site_admin":false},"repo":{"id":68002751,"name":"wolfram-query","full_name":"b0rza/wolfram-query","owner":{"login":"b0rza","id":6151763,"avatar_url":"https://avatars.githubusercontent.com/u/6151763?v=3","gravatar_id":"","url":"https://api.github.com/users/b0rza","html_url":"https://github.com/b0rza","followers_url":"https://api.github.com/users/b0rza/followers","following_url":"https://api.github.com/users/b0rza/following{/other_user}","gists_url":"https://api.github.com/users/b0rza/gists{/gist_id}","starred_url":"https://api.github.com/users/b0rza/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/b0rza/subscriptions","organizations_url":"https://api.github.com/users/b0rza/orgs","repos_url":"https://api.github.com/users/b0rza/repos","events_url":"https://api.github.com/users/b0rza/events{/privacy}","received_events_url":"https://api.github.com/users/b0rza/received_events","type":"User","site_admin":false},"private":false,"html_url":"https://github.com/b0rza/wolfram-query","description":null,"fork":true,"url":"https://api.github.com/repos/b0rza/wolfram-query","forks_url":"https://api.github.com/repos/b0rza/wolfram-query/forks","keys_url":"https://api.github.com/repos/b0rza/wolfram-query/keys{/key_id}","collaborators_url":"https://api.github.com/repos/b0rza/wolfram-query/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/b0rza/wolfram-query/teams","hooks_url":"https://api.github.com/repos/b0rza/wolfram-query/hooks","issue_events_url":"https://api.github.com/repos/b0rza/wolfram-query/issues/events{/number}","events_url":"https://api.github.com/repos/b0rza/wolfram-query/events","assignees_url":"https://api.github.com/repos/b0rza/wolfram-query/assignees{/user}","branches_url":"https://api.github.com/repos/b0rza/wolfram-query/branches{/branch}","tags_url":"https://api.github.com/repos/b0rza/wolfram-query/tags","blobs_url":"https://api.github.com/repos/b0rza/wolfram-query/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/b0rza/wolfram-query/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/b0rza/wolfram-query/git/refs{/sha}","trees_url":"https://api.github.com/repos/b0rza/wolfram-query/git/trees{/sha}","statuses_url":"https://api.github.com/repos/b0rza/wolfram-query/statuses/{sha}","languages_url":"https://api.github.com/repos/b0rza/wolfram-query/languages","stargazers_url":"https://api.github.com/repos/b0rza/wolfram-query/stargazers","contributors_url":"https://api.github.com/repos/b0rza/wolfram-query/contributors","subscribers_url":"https://api.github.com/repos/b0rza/wolfram-query/subscribers","subscription_url":"https://api.github.com/repos/b0rza/wolfram-query/subscription","commits_url":"https://api.github.com/repos/b0rza/wolfram-query/commits{/sha}","git_commits_url":"https://api.github.com/repos/b0rza/wolfram-query/git/commits{/sha}","comments_url":"https://api.github.com/repos/b0rza/wolfram-query/comments{/number}","issue_comment_url":"https://api.github.com/repos/b0rza/wolfram-query/issues/comments{/number}","contents_url":"https://api.github.com/repos/b0rza/wolfram-query/contents/{+path}","compare_url":"https://api.github.com/repos/b0rza/wolfram-query/compare/{base}...{head}","merges_url":"https://api.github.com/repos/b0rza/wolfram-query/merges","archive_url":"https://api.github.com/repos/b0rza/wolfram-query/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/b0rza/wolfram-query/downloads","issues_url":"https://api.github.com/repos/b0rza/wolfram-query/issues{/number}","pulls_url":"https://api.github.com/repos/b0rza/wolfram-query/pulls{/number}","milestones_url":"https://api.github.com/repos/b0rza/wolfram-query/milestones{/number}","notifications_url":"https://api.github.com/repos/b0rza/wolfram-query/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/b0rza/wolfram-query/labels{/name}","releases_url":"https://api.github.com/repos/b0rza/wolfram-query/releases{/id}","deployments_url":"https://api.github.com/repos/b0rza/wolfram-query/deployments","created_at":"2016-09-12T11:20:42Z","updated_at":"2016-09-12T11:20:43Z","pushed_at":"2016-09-12T11:22:51Z","git_url":"git://github.com/b0rza/wolfram-query.git","ssh_url":"git@github.com:b0rza/wolfram-query.git","clone_url":"https://github.com/b0rza/wolfram-query.git","svn_url":"https://github.com/b0rza/wolfram-query","homepage":null,"size":5,"stargazers_count":0,"watchers_count":0,"language":"JavaScript","has_issues":false,"has_downloads":true,"has_wiki":true,"has_pages":false,"forks_count":0,"mirror_url":null,"open_issues_count":0,"forks":0,"open_issues":0,"watchers":0,"default_branch":"master"}},"base":{"label":"vladimyr:master","ref":"master","sha":"c68e25819ae5391aa9c4cf46cfb3747894cf5af7","user":{"login":"vladimyr","id":1170440,"avatar_url":"https://avatars.githubusercontent.com/u/1170440?v=3","gravatar_id":"","url":"https://api.github.com/users/vladimyr","html_url":"https://github.com/vladimyr","followers_url":"https://api.github.com/users/vladimyr/followers","following_url":"https://api.github.com/users/vladimyr/following{/other_user}","gists_url":"https://api.github.com/users/vladimyr/gists{/gist_id}","starred_url":"https://api.github.com/users/vladimyr/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/vladimyr/subscriptions","organizations_url":"https://api.github.com/users/vladimyr/orgs","repos_url":"https://api.github.com/users/vladimyr/repos","events_url":"https://api.github.com/users/vladimyr/events{/privacy}","received_events_url":"https://api.github.com/users/vladimyr/received_events","type":"User","site_admin":false},"repo":{"id":38657228,"name":"wolfram-query","full_name":"vladimyr/wolfram-query","owner":{"login":"vladimyr","id":1170440,"avatar_url":"https://avatars.githubusercontent.com/u/1170440?v=3","gravatar_id":"","url":"https://api.github.com/users/vladimyr","html_url":"https://github.com/vladimyr","followers_url":"https://api.github.com/users/vladimyr/followers","following_url":"https://api.github.com/users/vladimyr/following{/other_user}","gists_url":"https://api.github.com/users/vladimyr/gists{/gist_id}","starred_url":"https://api.github.com/users/vladimyr/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/vladimyr/subscriptions","organizations_url":"https://api.github.com/users/vladimyr/orgs","repos_url":"https://api.github.com/users/vladimyr/repos","events_url":"https://api.github.com/users/vladimyr/events{/privacy}","received_events_url":"https://api.github.com/users/vladimyr/received_events","type":"User","site_admin":false},"private":false,"html_url":"https://github.com/vladimyr/wolfram-query","description":"","fork":false,"url":"https://api.github.com/repos/vladimyr/wolfram-query","forks_url":"https://api.github.com/repos/vladimyr/wolfram-query/forks","keys_url":"https://api.github.com/repos/vladimyr/wolfram-query/keys{/key_id}","collaborators_url":"https://api.github.com/repos/vladimyr/wolfram-query/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/vladimyr/wolfram-query/teams","hooks_url":"https://api.github.com/repos/vladimyr/wolfram-query/hooks","issue_events_url":"https://api.github.com/repos/vladimyr/wolfram-query/issues/events{/number}","events_url":"https://api.github.com/repos/vladimyr/wolfram-query/events","assignees_url":"https://api.github.com/repos/vladimyr/wolfram-query/assignees{/user}","branches_url":"https://api.github.com/repos/vladimyr/wolfram-query/branches{/branch}","tags_url":"https://api.github.com/repos/vladimyr/wolfram-query/tags","blobs_url":"https://api.github.com/repos/vladimyr/wolfram-query/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/vladimyr/wolfram-query/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/vladimyr/wolfram-query/git/refs{/sha}","trees_url":"https://api.github.com/repos/vladimyr/wolfram-query/git/trees{/sha}","statuses_url":"https://api.github.com/repos/vladimyr/wolfram-query/statuses/{sha}","languages_url":"https://api.github.com/repos/vladimyr/wolfram-query/languages","stargazers_url":"https://api.github.com/repos/vladimyr/wolfram-query/stargazers","contributors_url":"https://api.github.com/repos/vladimyr/wolfram-query/contributors","subscribers_url":"https://api.github.com/repos/vladimyr/wolfram-query/subscribers","subscription_url":"https://api.github.com/repos/vladimyr/wolfram-query/subscription","commits_url":"https://api.github.com/repos/vladimyr/wolfram-query/commits{/sha}","git_commits_url":"https://api.github.com/repos/vladimyr/wolfram-query/git/commits{/sha}","comments_url":"https://api.github.com/repos/vladimyr/wolfram-query/comments{/number}","issue_comment_url":"https://api.github.com/repos/vladimyr/wolfram-query/issues/comments{/number}","contents_url":"https://api.github.com/repos/vladimyr/wolfram-query/contents/{+path}","compare_url":"https://api.github.com/repos/vladimyr/wolfram-query/compare/{base}...{head}","merges_url":"https://api.github.com/repos/vladimyr/wolfram-query/merges","archive_url":"https://api.github.com/repos/vladimyr/wolfram-query/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/vladimyr/wolfram-query/downloads","issues_url":"https://api.github.com/repos/vladimyr/wolfram-query/issues{/number}","pulls_url":"https://api.github.com/repos/vladimyr/wolfram-query/pulls{/number}","milestones_url":"https://api.github.com/repos/vladimyr/wolfram-query/milestones{/number}","notifications_url":"https://api.github.com/repos/vladimyr/wolfram-query/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/vladimyr/wolfram-query/labels{/name}","releases_url":"https://api.github.com/repos/vladimyr/wolfram-query/releases{/id}","deployments_url":"https://api.github.com/repos/vladimyr/wolfram-query/deployments","created_at":"2015-07-07T01:52:08Z","updated_at":"2016-09-06T06:14:01Z","pushed_at":"2016-09-12T11:29:33Z","git_url":"git://github.com/vladimyr/wolfram-query.git","ssh_url":"git@github.com:vladimyr/wolfram-query.git","clone_url":"https://github.com/vladimyr/wolfram-query.git","svn_url":"https://github.com/vladimyr/wolfram-query","homepage":null,"size":5,"stargazers_count":0,"watchers_count":0,"language":"JavaScript","has_issues":true,"has_downloads":true,"has_wiki":true,"has_pages":false,"forks_count":1,"mirror_url":null,"open_issues_count":2,"forks":1,"open_issues":2,"watchers":0,"default_branch":"master"}},"_links":{"self":{"href":"https://api.github.com/repos/vladimyr/wolfram-query/pulls/2"},"html":{"href":"https://github.com/vladimyr/wolfram-query/pull/2"},"issue":{"href":"https://api.github.com/repos/vladimyr/wolfram-query/issues/2"},"comments":{"href":"https://api.github.com/repos/vladimyr/wolfram-query/issues/2/comments"},"review_comments":{"href":"https://api.github.com/repos/vladimyr/wolfram-query/pulls/2/comments"},"review_comment":{"href":"https://api.github.com/repos/vladimyr/wolfram-query/pulls/comments{/number}"},"commits":{"href":"https://api.github.com/repos/vladimyr/wolfram-query/pulls/2/commits"},"statuses":{"href":"https://api.github.com/repos/vladimyr/wolfram-query/statuses/40369c6bd9f3d86156f9b158db30c85b6c7c96c4"}}}}
{"actor":{"display_login":"vladimyr"}}