node_modules/mdsvex/dist/main.es.js
// Add the position to a node.
Add the position to a node.
Add the position to a node .
function update(node, indent) {
        var previous = node.position;
        var start = previous ? previous.start : before;
        var combined = [];
        var n = previous && previous.end.line;
        var l = before.line;
        node.position = new Position(start);
        if (previous && indent && previous.indent) {
          combined = previous.indent;
          if (n < l) {
            while (++n < l) {
              combined.push((offset[n] || 0) + 1);
            }
            combined.push(before.column);
          }
          indent = combined.concat(indent);
        }
        node.position.indent = indent || [];
        return node
      }
function update ( node , indent ) { var previous = node . position ; var start = previous ? previous . start : before ; var combined = [ ] ; var n = previous && previous . end . line ; var l = before . line ; node . position = new Position ( start ) ; if ( previous && indent && previous . indent ) { combined = previous . indent ; if ( n < l ) { while ( ++ n < l ) { combined . push ( ( offset [ n ] || 0 ) + 1 ) ; } combined . push ( before . column ) ; } indent = combined . concat ( indent ) ; } node . position . indent = indent || [ ] ; return node }
Add the position to a node.
Add the position to a node .
// If there was already a `position`, this node was merged.  Fixing // `start` wasn’t hard, but the indent is different.  Especially // because some information, the indent between `n` and `l` wasn’t // tracked.  Luckily, that space is (should be?) empty, so we can // safely check for it now.