export const convertSpanToDiv = (html: any) => {
    const parser = new DOMParser();
    const doc = parser.parseFromString(html, "text/html");
    const spans = doc.querySelectorAll("span");
    if (!spans.length) {
        return;
    }
    spans.forEach((span: any) => {
        if (span.querySelector("img")) {
            const img = span.querySelector("img");
            span.parentNode.replaceChild(img, span);
        }
    });
    return doc.body.innerHTML;
};
