//#region src/utils/getOrCreateCodeNode.ts
function getOrCreateCodeNode({ code, pre, columnType, rowSpan } = {}) {
	if (code == null) {
		code = document.createElement("code");
		code.dataset.code = "";
		if (columnType != null) code.dataset[columnType] = "";
		pre?.appendChild(code);
	}
	if (rowSpan != null) code.style.setProperty("grid-row", `span ${rowSpan}`);
	else code.style.removeProperty("grid-row");
	return code;
}

//#endregion
export { getOrCreateCodeNode };
//# sourceMappingURL=getOrCreateCodeNode.js.map