function plugin() {
    /**
     * @param {MdastRoot} tree
     *   Tree.
     * @returns {undefined}
     *   Nothing.
     */
    return function (tree) {
      visit(tree, function (node) {
        if (
          node.type === 'containerDirective' ||
          node.type === 'leafDirective' ||
          node.type === 'textDirective'
        ) {
          const element = h(node.name, node.attributes || {})
          node.data = {
            hName: element.tagName,
            hProperties: element.properties
          }
        }
      })
    }
  }
@import {Root as MdastRoot} from 'mdast'