Skip to content

Commit

Permalink
Fixing quote issue
Browse files Browse the repository at this point in the history
  • Loading branch information
alexjpaz committed Jun 13, 2022
1 parent fb4cb9d commit 3143106
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 3 deletions.
3 changes: 2 additions & 1 deletion src/useBabble.js
Original file line number Diff line number Diff line change
Expand Up @@ -95,7 +95,8 @@ export class BabblePlayer {
try {
let words = message
.toLowerCase()
.replace(/[\W_]+/g," ")
.replace(/[']+/g,"")
.replace(/[\W_"]+/g," ")
.trim()
.split(" ");

Expand Down
4 changes: 2 additions & 2 deletions src/useBubble.test.js
Original file line number Diff line number Diff line change
Expand Up @@ -77,9 +77,9 @@ describe("BabblePlayer", () => {
"broadcaster": true,
};

player.onCommand(TEST_USER_1, "say", "hello i, am ALEX.", flags);
player.onCommand(TEST_USER_1, "say", "hello i, am ALEX. won't", flags);

expect(player.enqueue).toBeCalledWith(["hello", "i", "am", "alex"]);
expect(player.enqueue).toBeCalledWith(["hello", "i", "am", "alex", "wont"]);
expect(player.play).toBeCalled();

});
Expand Down

0 comments on commit 3143106

Please sign in to comment.