_addAnchorNode(
    node: Node,
    blockConfigs: Array<ContentBlockConfig>,
    style: DraftInlineStyle,
  ) {
    // The check has already been made by isValidAnchor but
    // we have to do it again to keep flow happy.
    if (!isHTMLAnchorElement(node)) {
      return;
    }
    const anchor: HTMLAnchorElement = (node: any);
    const entityConfig: {[string]: string} = {};

    anchorAttr.forEach(attr => {
      const anchorAttribute = anchor.getAttribute(attr);
      if (anchorAttribute) {
        entityConfig[attr] = anchorAttribute;
      }
    });

    entityConfig.url = new URI(anchor.href).toString();

    this.contentState = this.contentState.createEntity(
      'LINK',
      'MUTABLE',
      entityConfig || {},
    );
    this.currentEntity = this.contentState.getLastCreatedEntityKey();

    blockConfigs.push(
      ...this._toBlockConfigs(Array.from(node.childNodes), style),
    );
    this.currentEntity = null;
  }
Add the content of an HTML 'a' node to the internal state. Child nodes
(if any) are converted to Block Configs and appended to the provided
blockConfig array.