@graphteon/juricode
Version:
We are forging the future with lines of digital steel
25 lines • 743 B
JavaScript
;
Object.defineProperty(exports, "__esModule", { value: true });
exports.parseCellContent = void 0;
const parseCellContent = (content, imageUrls) => {
const lines = [];
let currentText = "";
for (const line of content.split("\n")) {
currentText += `${line}\n`;
}
if (currentText) {
lines.push({ type: "plaintext", content: currentText });
}
if (imageUrls && imageUrls.length > 0) {
imageUrls.forEach((url) => {
lines.push({
type: "image",
content: ``,
url,
});
});
}
return lines;
};
exports.parseCellContent = parseCellContent;
//# sourceMappingURL=parse-cell-content.js.map