{"action":"opened","issue":{"url":"https://api.github.com/repos/aichaos/rivescript-js/issues/57","labels_url":"https://api.github.com/repos/aichaos/rivescript-js/issues/57/labels{/name}","comments_url":"https://api.github.com/repos/aichaos/rivescript-js/issues/57/comments","events_url":"https://api.github.com/repos/aichaos/rivescript-js/issues/57/events","html_url":"https://github.com/aichaos/rivescript-js/issues/57","id":124122197,"number":57,"title":"Consolidate multiple spaces when formatting user message","user":{"login":"kirsle","id":1663507,"avatar_url":"https://avatars.githubusercontent.com/u/1663507?v=3","gravatar_id":"","url":"https://api.github.com/users/kirsle","html_url":"https://github.com/kirsle","followers_url":"https://api.github.com/users/kirsle/followers","following_url":"https://api.github.com/users/kirsle/following{/other_user}","gists_url":"https://api.github.com/users/kirsle/gists{/gist_id}","starred_url":"https://api.github.com/users/kirsle/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/kirsle/subscriptions","organizations_url":"https://api.github.com/users/kirsle/orgs","repos_url":"https://api.github.com/users/kirsle/repos","events_url":"https://api.github.com/users/kirsle/events{/privacy}","received_events_url":"https://api.github.com/users/kirsle/received_events","type":"User","site_admin":false},"labels":[],"state":"open","locked":false,"assignee":null,"milestone":null,"comments":0,"created_at":"2015-12-28T20:41:00Z","updated_at":"2015-12-28T20:41:00Z","closed_at":null,"body":"Pull request #53 fixed trimming whitespace from the start and end of users' messages after all other punctuation etc. has been stripped off. That issue was also found to affect the Python implementation and probably the others as well.\r\n\r\nAdditionally, if the user inputs two-or-more spaces inside their sentence somewhere it can affect the matchibility of their message. For example:\r\n\r\n```\r\nYou> my  name is noah\r\nBot> Tell me more about that.\r\nYou> my name is noah\r\nBot> Noah, nice to meet you.\r\n```\r\n\r\nIn the first example there were two spaces between the words \"my\" and \"name\" and this caused the match to fail. This is reproducible on both the JS and Python versions and probably the others.\r\n\r\nAction items before this ticket can be closed:\r\n\r\n1. Implement fix #53 on other implementations\r\n2. Consolidate duplicate spaces on all implementations, like `s/\\s+/\\s/g`\r\n\r\nRelevant discussion on chatbots forum: https://www.chatbots.org/ai_zone/viewthread/2314/"}}