From 2a0ad20d6057a7a2455b167a47f8d5cb7a660374 Mon Sep 17 00:00:00 2001 From: Scott Arciszewski Date: Sat, 4 Oct 2014 17:20:38 -0400 Subject: [PATCH 1/2] Update diceware.js Prevent whitespace bugs --- app/js/diceware.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/app/js/diceware.js b/app/js/diceware.js index cd3be2d..5bd6257 100644 --- a/app/js/diceware.js +++ b/app/js/diceware.js @@ -25,7 +25,7 @@ Diceware.prototype.load = function(callback) { if (line === '-----BEGIN PGP SIGNATURE-----') { break; } - var myregexp = /^\d+\s*([^\s]+)$/; + var myregexp = /^\s*?\d+\s*([^\s]+)\s*?$/; var match = myregexp.exec(line); if (match != null) { // matched text: match[0] From 8075811b59bab6e4f4c79879e4787b24cdbb260d Mon Sep 17 00:00:00 2001 From: Scott Arciszewski Date: Mon, 6 Oct 2014 11:20:57 -0400 Subject: [PATCH 2/2] Update diceware.js --- app/js/diceware.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/app/js/diceware.js b/app/js/diceware.js index 5bd6257..2cea62a 100644 --- a/app/js/diceware.js +++ b/app/js/diceware.js @@ -25,7 +25,7 @@ Diceware.prototype.load = function(callback) { if (line === '-----BEGIN PGP SIGNATURE-----') { break; } - var myregexp = /^\s*?\d+\s*([^\s]+)\s*?$/; + var myregexp = /^\s*\d+\s*([^\s]+)\s*$/; var match = myregexp.exec(line); if (match != null) { // matched text: match[0]