From 3945335e6e796ea815ed31df3e13f22eaff1049d Mon Sep 17 00:00:00 2001 From: Jessica McKellar Date: Fri, 12 Apr 2013 18:03:08 -0400 Subject: [PATCH] tutorial: don't let punctuation get in the way of exiting. (imported from commit 7b97f382684bd2ddb92fc3efa6e1a635c4662aef) --- zephyr/static/js/tutorial.js | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/zephyr/static/js/tutorial.js b/zephyr/static/js/tutorial.js index 23f9460d60..edbaea4ee6 100644 --- a/zephyr/static/js/tutorial.js +++ b/zephyr/static/js/tutorial.js @@ -61,7 +61,8 @@ function any_message_to_me(message) { var received_messages = []; exports.message_was_sent = function(message) { - var trimmed_content = message.content.trim().toLowerCase(); + // Don't let casing or stray punctuation get in the way. + var trimmed_content = message.content.substring(0, 4).toLowerCase(); if (any_message_to_me(message) && (trimmed_content === 'exit' || trimmed_content === 'stop')) { sleep(1000).then(function () {