node_modules/mdsvex/dist/main.es.js
// Merge words joined by certain punctuation marks.
Merge words joined by certain punctuation marks.
Merge words joined by certain punctuation marks .
function mergeInnerWordSlash(child, index, parent) {
  var siblings = parent.children;
  var prev;
  var next;
  var prevValue;
  var nextValue;
  var queue;
  var tail;
  var count;
  prev = siblings[index - 1];
  next = siblings[index + 1];
  if (
    prev &&
    prev.type === 'WordNode' &&
    (child.type === 'SymbolNode' || child.type === 'PunctuationNode') &&
    nlcstToString_1(child) === slash
  ) {
    prevValue = nlcstToString_1(prev);
    tail = child;
    queue = [child];
    count = 1;
    if (next && next.type === 'WordNode') {
      nextValue = nlcstToString_1(next);
      tail = next;
      queue = queue.concat(next.children);
      count++;
    }
    if (prevValue.length < 3 && (!nextValue || nextValue.length < 3)) {
      prev.children = prev.children.concat(queue);
      siblings.splice(index, count);
      if (prev.position && tail.position) {
        prev.position.end = tail.position.end;
      }
      return index
    }
  }
}
function mergeInnerWordSlash ( child , index , parent ) { var siblings = parent . children ; var prev ; var next ; var prevValue ; var nextValue ; var queue ; var tail ; var count ; prev = siblings [ index - 1 ] ; next = siblings [ index + 1 ] ; if ( prev && prev . type === 'WordNode' && ( child . type === 'SymbolNode' || child . type === 'PunctuationNode' ) && nlcstToString_1 ( child ) === slash ) { prevValue = nlcstToString_1 ( prev ) ; tail = child ; queue = [ child ] ; count = 1 ; if ( next && next . type === 'WordNode' ) { nextValue = nlcstToString_1 ( next ) ; tail = next ; queue = queue . concat ( next . children ) ; count ++ ; } if ( prevValue . length < 3 && ( ! nextValue || nextValue . length < 3 ) ) { prev . children = prev . children . concat ( queue ) ; siblings . splice ( index , count ) ; if ( prev . position && tail . position ) { prev . position . end = tail . position . end ; } return index } } }
Merge words joined by certain punctuation marks.
Merge words joined by certain punctuation marks .
// Add all found tokens to `prev`s children. // Update position. // Next, iterate over the node *now* at the current position.