docs: function toc(node, options) {
      var settings = options || {};
      var heading = settings.heading ? toExpression(settings.heading) : null;
      var result = search(node, heading, settings.maxDepth || 6);
      var map = result.map;
  
      result.map = map.length === 0 ? null : contents(map, settings.tight);
  
      /* No given heading */
      if (!heading) {
          result.index = null;
          result.endIndex = null;
      }
  
      return result;
  }