index.js
function one(config, node) {
  var offset = config.location.toOffset
  var parser = config.parser
  var doc = config.doc
  var type = node.type
  var start = offset(position.start(node))
  var end = offset(position.end(node))

  if (config.ignore.indexOf(type) === -1) {
    if (config.source.indexOf(type) !== -1) {
      return patch(
        config,
        [parser.tokenizeSource(doc.slice(start, end))],
        start
      )
    }

    if (node.children) {
      return all(config, node)
    }

    if (type === 'image' || type === 'imageReference') {
      return patch(config, parser.tokenize(node.alt), start + 2)
    }

    if (type === 'text' || type === 'escape') {
      return patch(config, parser.tokenize(node.value), start)
    }

    if (node.type === 'break') {
      return patch(config, [parser.tokenizeWhiteSpace('\n')], start)
    }
  }

  return null
}
function one(config, node) {
  var offset = config.location.toOffset
  var parser = config.parser
  var doc = config.doc
  var type = node.type
  var start = offset(position.start(node))
  var end = offset(position.end(node))

  if (config.ignore.indexOf(type) === -1) {
    if (config.source.indexOf(type) !== -1) {
      return patch(
        config,
        [parser.tokenizeSource(doc.slice(start, end))],
        start
      )
    }

    if (node.children) {
      return all(config, node)
    }

    if (type === 'image' || type === 'imageReference') {
      return patch(config, parser.tokenize(node.alt), start + 2)
    }

    if (type === 'text' || type === 'escape') {
      return patch(config, parser.tokenize(node.value), start)
    }

    if (node.type === 'break') {
      return patch(config, [parser.tokenizeWhiteSpace('\n')], start)
    }
  }

  return null
}
function one ( config , node ) { var offset = config . location . toOffset var parser = config . parser var doc = config . doc var type = node . type var start = offset ( position . start ( node ) ) var end = offset ( position . end ( node ) ) if ( config . ignore . indexOf ( type ) === - 1 ) { if ( config . source . indexOf ( type ) !== - 1 ) { return patch ( config , [ parser . tokenizeSource ( doc . slice ( start , end ) ) ] , start ) } if ( node . children ) { return all ( config , node ) } if ( type === 'image' || type === 'imageReference' ) { return patch ( config , parser . tokenize ( node . alt ) , start + 2 ) } if ( type === 'text' || type === 'escape' ) { return patch ( config , parser . tokenize ( node . value ) , start ) } if ( node . type === 'break' ) { return patch ( config , [ parser . tokenizeWhiteSpace ( '\n' ) ] , start ) } } return null }
Convert `node` into NLCST.
Convert node into NLCST .