fix missing replacement for line continaution in copy to clipboard script
authorDan Allen <dan@opendevise.com>
Mon, 21 Dec 2020 00:23:05 +0000 (17:23 -0700)
committerDan Allen <dan@opendevise.com>
Mon, 21 Dec 2020 00:23:05 +0000 (17:23 -0700)
src/js/06-copy-to-clipboard.js

index ab1de52..155621d 100644 (file)
@@ -47,7 +47,7 @@
     var cleanupRx = /( ) *\\\n *|\\\n( ?) */g
     var cmds = []
     var m
-    while ((m = cmdRx.exec(text))) cmds.push(m[1].replace(cleanupRx, '$1'))
+    while ((m = cmdRx.exec(text))) cmds.push(m[1].replace(cleanupRx, '$1$2'))
     return cmds.join(' && ')
   }