htmlBuilderDelegate = function(
    group: ParseNode<"supsub">,
    options: Options,
): ?HtmlBuilder<*> {
    const base = group.base;
    if (!base) {
        return null;
    } else if (base.type === "op") {
        // Operators handle supsubs differently when they have limits
        // (e.g. `\displaystyle\sum_2^3`)
        const delegate = base.limits &&
            (options.style.size === Style.DISPLAY.size ||
            base.alwaysHandleSupSub);
        return delegate ? op.htmlBuilder : null;
    } else if (base.type === "operatorname") {
        const delegate = base.alwaysHandleSupSub &&
            (options.style.size === Style.DISPLAY.size || base.limits);
        return delegate ? operatorname.htmlBuilder : null;
    } else if (base.type === "accent") {
        return utils.isCharacterBox(base.base) ? accent.htmlBuilder : null;
    } else if (base.type === "horizBrace") {
        const isSup = !group.sub;
        return isSup === base.isOver ? horizBrace.htmlBuilder : null;
    } else {
        return null;
    }
}
Sometimes, groups perform special rules when they have superscripts or
subscripts attached to them. This function lets the `supsub` group know that
Sometimes, groups perform special rules when they have superscripts or
its inner element should handle the superscripts and subscripts instead of
handling them itself.