// "inlineMath"
import { createRenderExtension } from "./base";
import { renderFormula } from "../formula/formula";

export const extMath = createRenderExtension({
  renderContent(_controller, content, next) {
    const type = content.type as string;
    if (type === "inlineMath" || type === "math") {
      return renderFormula((content as any).value, type === "math");
    }
    return next();
  },
});
