{"action":"closed","issue":{"url":"https://api.github.com/repos/AhanM/Bantr/issues/1","repository_url":"https://api.github.com/repos/AhanM/Bantr","labels_url":"https://api.github.com/repos/AhanM/Bantr/issues/1/labels{/name}","comments_url":"https://api.github.com/repos/AhanM/Bantr/issues/1/comments","events_url":"https://api.github.com/repos/AhanM/Bantr/issues/1/events","html_url":"https://github.com/AhanM/Bantr/issues/1","id":141311784,"number":1,"title":"Flawed Hashtag Extraction from Posts","user":{"login":"AhanM","id":5749094,"avatar_url":"https://avatars.githubusercontent.com/u/5749094?v=3","gravatar_id":"","url":"https://api.github.com/users/AhanM","html_url":"https://github.com/AhanM","followers_url":"https://api.github.com/users/AhanM/followers","following_url":"https://api.github.com/users/AhanM/following{/other_user}","gists_url":"https://api.github.com/users/AhanM/gists{/gist_id}","starred_url":"https://api.github.com/users/AhanM/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/AhanM/subscriptions","organizations_url":"https://api.github.com/users/AhanM/orgs","repos_url":"https://api.github.com/users/AhanM/repos","events_url":"https://api.github.com/users/AhanM/events{/privacy}","received_events_url":"https://api.github.com/users/AhanM/received_events","type":"User","site_admin":false},"labels":[],"state":"closed","locked":false,"assignee":null,"milestone":null,"comments":0,"created_at":"2016-03-16T15:36:20Z","updated_at":"2016-03-17T10:10:57Z","closed_at":"2016-03-17T10:10:57Z","body":"If a post ends with a hashtag the hashtag fails to be added to the HashtagArray. \r\nThis is the code where the issue lies @madhavMathur \r\n\r\n    for(var i=0; i < text.length; i++) {\r\n\r\n            if(text.charAt(i) == '#') {\r\n                 for(var j = i+1; j < text.length; j++) {\r\n\r\n                     if(text.charAt(j) == ' ') {\r\n                           hashtagArray.push(text.slice(i+1,j));\r\n                           console.log(text.slice(i+1,j));\r\n                           i = j;\r\n                           break;\r\n                     }\r\n                 }\r\n            }\r\n    }"}}