From d1e808ee9585786a28a73b66ed1b20a58b63b80a Mon Sep 17 00:00:00 2001 From: "(quasar) nebula" Date: Fri, 16 Apr 2021 13:54:01 -0300 Subject: add end index to node info --- upd8.js | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/upd8.js b/upd8.js index 504cd6d..1781107 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; } -- cgit 1.3.0-6-gf8a5