import { createHtmlRenderer } from "@comark/html";
import type { Page } from "@playwright/test";
import carousel, { components } from "../packages/carousel/src/html.ts";
import zoom, { components as zoomComponents } from "../packages/zoom/src/html.ts";
export const render = createHtmlRenderer({
plugins: [carousel(), zoom()],
components: { ...components, ...zoomComponents },
});
export const open = async (
page: Page,
markdown: string,
options: { dir?: string; script?: boolean; width?: string; style?: string } = {},
) => {
let html = await render(markdown);
if (options.script === false) html = html.replace(/