node_modules/mdast-util-to-hast/lib/failsafe.js
/* Return the content of a reference without definition
 * as markdown. */
Return the content of a reference without definition
as markdown.
Return the content of a reference without definition as markdown .
function failsafe(h, node, definition) {
  var subtype = node.referenceType;
  if (subtype !== 'collapsed' && subtype !== 'full' && !definition) {
    if (node.type === 'imageReference') {
      return u('text', '![' + node.alt + ']');
    }
    return [u('text', '[')].concat(all(h, node), u('text', ']'));
  }
}
function failsafe ( h , node , definition ) { var subtype = node . referenceType ; if ( subtype !== 'collapsed' && subtype !== 'full' && ! definition ) { if ( node . type === 'imageReference' ) { return u ( 'text' , '![' + node . alt + ']' ) ; } return [ u ( 'text' , '[' ) ] . concat ( all ( h , node ) , u ( 'text' , ']' ) ) ; } }
Return the content of a reference without definition
 as markdown.
Return the content of a reference without definition as markdown .