« get me outta code hell

fix final text not being added as node - hsmusic-wiki - HSMusic - static wiki software cataloguing collaborative creation
about summary refs log tree commit diff
diff options
context:
space:
mode:
author(quasar) nebula <towerofnix@gmail.com>2021-04-16 12:43:14 -0300
committer(quasar) nebula <towerofnix@gmail.com>2021-04-16 12:43:14 -0300
commitc6a8b367a5a1a243e5112a33aedee9e9147f7a0f (patch)
tree48b1a0838a524cd75fef237e1871c827dcdd8db0
parentd3311d056ccae94001ae5af083572f2111b61b77 (diff)
fix final text not being added as node
-rwxr-xr-xupd8.js4
1 files changed, 3 insertions, 1 deletions
diff --git a/upd8.js b/upd8.js
index 8d22f64..6986ac8 100755
--- a/upd8.js
+++ b/upd8.js
@@ -1033,6 +1033,9 @@ const replacerSpec = {
             const match = input.slice(i).match(regexp);
 
             if (!match) {
+                iString = i;
+                string = input.slice(i, input.length);
+                pushTextNode();
                 break;
             }
 
@@ -1158,7 +1161,6 @@ const replacerSpec = {
             }
         }
 
-        pushTextNode();
         return nodes;
     };