This commit is contained in:
Vanessa 2023-06-09 10:43:59 +08:00
parent 1d8fc82fe9
commit e2baff310c

View file

@ -14,6 +14,9 @@ export const previewTemplate = (pathString: string, element: Element, parentId:
};
const mergeElement = (a: Element, b: Element, after = true) => {
if (!a.getAttribute("data-type") || !b.getAttribute("data-type")) {
return false;
}
a.setAttribute("data-type", a.getAttribute("data-type").replace("search-mark", "").trim());
b.setAttribute("data-type", b.getAttribute("data-type").replace("search-mark", "").trim());
const attributes = a.attributes;