diff options
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 |
commit | d1e808ee9585786a28a73b66ed1b20a58b63b80a (patch) | |
tree | 775b3e74a23b1651323e1b821723b4c801e818c6 | |
parent | 32448fb8ff1c5474e25847c0cae397bdf1c6f5ab (diff) |
add end index to node info
-rwxr-xr-x | upd8.js | 4 |
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; } |