From 7773e55c0fef47939d7e3f20dc741192e2584c4f Mon Sep 17 00:00:00 2001 From: Patrick Connolly Date: Thu, 4 Feb 2016 13:59:07 -0800 Subject: [PATCH] Don't count unspaced acronym letters as individual words. --- squirt.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/squirt.js b/squirt.js index 270581e..e98fa86 100644 --- a/squirt.js +++ b/squirt.js @@ -240,7 +240,7 @@ sq.host = window.location.search.match('sq-dev') ? return function textToNodes(text) { text = "3\n 2\n 1\n " + text.trim('\n').replace(/\s+\n/g,'\n'); return text - .replace(/[\,\.\!\:\;](?![\"\'\)\]\}])/g, "$& ") + .replace(/[\,\.\!\:\;](?![\"\'\)\]\}\w])/g, "$& ") .split(/[\s]+/g) .filter(function(word){ return word.length; }) .map(wordToNode);