How to use the snapdragon-util.isClose function in snapdragon-util

To help you get started, we’ve selected a few snapdragon-util examples, based on popular ways it is used in public projects.

Secure your code as it's written. Use Snyk Code to scan source code in minutes - no build needed - and fix issues immediately.

github here-be / snapdragon / lib / compiler.js View on Github external
util.addType(this.state, node);
    }

    this.emitter.emit('node', node);

    var fn = this.compilers[node.type] || this.compilers.unknown;
    if (typeof fn !== 'function') {
      throw this.error('compiler "' + node.type + '" is not registered', node);
    }

    var val = fn.call(this, node) || node;
    if (util.isNode(val)) {
      node = val;
    }

    if (util.isClose(node)) {
      util.removeType(this.state, node);
    }
    return node;
  },