{"action":"created","issue":{"url":"https://api.github.com/repos/danxexe/sms-counter/issues/9","labels_url":"https://api.github.com/repos/danxexe/sms-counter/issues/9/labels{/name}","comments_url":"https://api.github.com/repos/danxexe/sms-counter/issues/9/comments","events_url":"https://api.github.com/repos/danxexe/sms-counter/issues/9/events","html_url":"https://github.com/danxexe/sms-counter/issues/9","id":71604258,"number":9,"title":"CRLF","user":{"login":"acurrieclark","id":1306728,"avatar_url":"https://avatars.githubusercontent.com/u/1306728?v=3","gravatar_id":"","url":"https://api.github.com/users/acurrieclark","html_url":"https://github.com/acurrieclark","followers_url":"https://api.github.com/users/acurrieclark/followers","following_url":"https://api.github.com/users/acurrieclark/following{/other_user}","gists_url":"https://api.github.com/users/acurrieclark/gists{/gist_id}","starred_url":"https://api.github.com/users/acurrieclark/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/acurrieclark/subscriptions","organizations_url":"https://api.github.com/users/acurrieclark/orgs","repos_url":"https://api.github.com/users/acurrieclark/repos","events_url":"https://api.github.com/users/acurrieclark/events{/privacy}","received_events_url":"https://api.github.com/users/acurrieclark/received_events","type":"User","site_admin":false},"labels":[],"state":"open","locked":false,"assignee":null,"milestone":null,"comments":1,"created_at":"2015-04-28T14:24:45Z","updated_at":"2015-04-28T14:53:55Z","closed_at":null,"body":"Am I not correct in saying that a return should be counted as 2 characters? I have a fix for this if you like, but I just wanted to check this hadn't been deliberately omitted for any reason."},"comment":{"url":"https://api.github.com/repos/danxexe/sms-counter/issues/comments/97092185","html_url":"https://github.com/danxexe/sms-counter/issues/9#issuecomment-97092185","issue_url":"https://api.github.com/repos/danxexe/sms-counter/issues/9","id":97092185,"user":{"login":"danxexe","id":125711,"avatar_url":"https://avatars.githubusercontent.com/u/125711?v=3","gravatar_id":"","url":"https://api.github.com/users/danxexe","html_url":"https://github.com/danxexe","followers_url":"https://api.github.com/users/danxexe/followers","following_url":"https://api.github.com/users/danxexe/following{/other_user}","gists_url":"https://api.github.com/users/danxexe/gists{/gist_id}","starred_url":"https://api.github.com/users/danxexe/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/danxexe/subscriptions","organizations_url":"https://api.github.com/users/danxexe/orgs","repos_url":"https://api.github.com/users/danxexe/repos","events_url":"https://api.github.com/users/danxexe/events{/privacy}","received_events_url":"https://api.github.com/users/danxexe/received_events","type":"User","site_admin":false},"created_at":"2015-04-28T14:53:55Z","updated_at":"2015-04-28T14:53:55Z","body":"Hi @acurrieclark, it is counted as 2 characters if the text contains both CR and LF:\r\n\r\n```js\r\nSmsCounter.count(\"\\r\\n\").length // 2\r\n```\r\n\r\nBut only one if there's just a LF:\r\n\r\n```js\r\nSmsCounter.count(\"\\n\").length // 1\r\n```\r\n\r\nIt depends on what your text input element actually inserts when you hit return. It may vary between browsers and OSes."}}