« get me outta code hell

add end index to node info - 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 13:54:01 -0300
committer(quasar) nebula <towerofnix@gmail.com>2021-04-16 13:54:01 -0300
commitd1e808ee9585786a28a73b66ed1b20a58b63b80a (patch)
tree775b3e74a23b1651323e1b821723b4c801e818c6
parent32448fb8ff1c5474e25847c0cae397bdf1c6f5ab (diff)
add end index to node info
-rwxr-xr-xupd8.js4
1 files changed, 2 insertions, 2 deletions
diff --git a/upd8.js b/upd8.js
index 504cd6d0..17811076 100755
--- a/upd8.js
+++ b/upd8.js
@@ -1005,7 +1005,7 @@ const replacerSpec = {
 
         const pushTextNode = () => {
             if (string.length) {
-                nodes.push({i: iString, type: 'text', data: string});
+                nodes.push({i: iString, iEnd: i, type: 'text', data: string});
                 string = '';
             }
         };
@@ -1174,7 +1174,7 @@ const replacerSpec = {
                     i = stop_iParse;
                 }
 
-                nodes.push({i: iTag, type: 'tag', data: {replacerKey, replacerValue, hash, args, label}});
+                nodes.push({i: iTag, iEnd: i, type: 'tag', data: {replacerKey, replacerValue, hash, args, label}});
 
                 continue;
             }