node_modules/mdsvex/dist/main.es.js
// Transform multiple dots into unicode ellipses.
Transform multiple dots into unicode ellipses.
Transform multiple dots into unicode ellipses .
function ellipses(node, index, parent) {
  var value = node.value;
  var siblings = parent.children;
  var position;
  var nodes;
  var sibling;
  var type;
  var count;
  var queue;
  if (threeFullStopsExpression.test(node.value)) {
    node.value = ellipsis;
    return
  }
  if (!fullStopsExpression.test(value)) {
    return
  }
  nodes = [];
  position = index;
  count = 1;
  while (--position > 0) {
    sibling = siblings[position];
    if (sibling.type !== whiteSpace) {
      break
    }
    queue = sibling;
    sibling = siblings[--position];
    type = sibling && sibling.type;
    if (
      sibling &&
      (type === punctuation || type === symbol) &&
      fullStopsExpression.test(sibling.value)
    ) {
      nodes.push(queue, sibling);
      count++;
      continue
    }
    break
  }
  if (count < 3) {
    return
  }
  siblings.splice(index - nodes.length, nodes.length);
  node.value = ellipsis;
}
function ellipses ( node , index , parent ) { var value = node . value ; var siblings = parent . children ; var position ; var nodes ; var sibling ; var type ; var count ; var queue ; if ( threeFullStopsExpression . test ( node . value ) ) { node . value = ellipsis ; return } if ( ! fullStopsExpression . test ( value ) ) { return } nodes = [ ] ; position = index ; count = 1 ; while ( -- position > 0 ) { sibling = siblings [ position ] ; if ( sibling . type !== whiteSpace ) { break } queue = sibling ; sibling = siblings [ -- position ] ; type = sibling && sibling . type ; if ( sibling && ( type === punctuation || type === symbol ) && fullStopsExpression . test ( sibling . value ) ) { nodes . push ( queue , sibling ) ; count ++ ; continue } break } if ( count < 3 ) { return } siblings . splice ( index - nodes . length , nodes . length ) ; node . value = ellipsis ; }
Transform multiple dots into unicode ellipses.
Transform multiple dots into unicode ellipses .
// Simple node with three dots and without white-space. // Search for dot-nodes with white-space between. // It’s possible that the node is merged with an adjacent word-node.  In that // code, we cannot transform it because there’s no reference to the // grandparent.