From 5f436963eb22b7840d144e03c950beca1b73682b Mon Sep 17 00:00:00 2001
From: Jonathan Wilkes <jon.w.wilkes@gmail.com>
Date: Thu, 22 Sep 2016 20:53:07 -0400
Subject: [PATCH] fix #114: can't copy-paste ASCII character 160, non-breaking
 space. Now we only remove consecutive \u0020, and leave the non-breaking
 spaces alone

---
 pd/nw/pd_canvas.js | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/pd/nw/pd_canvas.js b/pd/nw/pd_canvas.js
index 54dcace4e..4b2a9e2a4 100644
--- a/pd/nw/pd_canvas.js
+++ b/pd/nw/pd_canvas.js
@@ -38,7 +38,7 @@ function text_to_fudi(text) {
     text = text.replace(/(\$@)/g, "\\$@");         // escape special $@ sign
     text = text.replace(/(?!\\)(,|;)/g, " \\$1 "); // escape "," and ";"
     text = text.replace(/\{|\}/g, "");             // filter "{" and "}"
-    text = text.replace(/\s+/g, " ");              // filter consecutive /s
+    text = text.replace(/\u0020+/g, " ");          // filter consecutive ascii32
     return text;
 }
 
-- 
GitLab