@truto/truto-jsonata 1.0.14 → 1.0.15
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/main.cjs +22 -13
- package/dist/main.cjs.map +1 -1
- package/dist/module.js +22 -13
- package/dist/module.js.map +1 -1
- package/package.json +1 -1
package/dist/main.cjs
CHANGED
|
@@ -642,19 +642,28 @@ const $bc8e7b2fdb012b3a$var$parseMarkedTokenToNotionRequest = (tokens, acc = [])
|
|
|
642
642
|
if (!text) return acc;
|
|
643
643
|
const textToInsert = (0, $5a7cb266718aeaae$export$2e2bcd8739ae039)(text);
|
|
644
644
|
// chunk the text into 2000 character chunks, should handle emojis and multi-byte characters
|
|
645
|
-
const
|
|
646
|
-
(0, $dxT2C$lodashes.
|
|
647
|
-
|
|
648
|
-
|
|
649
|
-
|
|
650
|
-
|
|
651
|
-
|
|
652
|
-
|
|
653
|
-
|
|
654
|
-
|
|
655
|
-
|
|
656
|
-
|
|
657
|
-
|
|
645
|
+
const textSplitByNewLine = textToInsert.split("\n");
|
|
646
|
+
const chunksOfChunks = (0, $dxT2C$lodashes.compact)((0, $dxT2C$lodashes.map)(textSplitByNewLine, (chunk)=>$bc8e7b2fdb012b3a$var$chunkText(chunk)));
|
|
647
|
+
const chunksWithNewLines = (0, $dxT2C$lodashes.flattenDeep)((0, $233848446ca33fe6$export$2e2bcd8739ae039)((0, $dxT2C$lodashes.map)(chunksOfChunks, (chunk)=>{
|
|
648
|
+
return (0, $dxT2C$lodashes.map)(chunk, (_chunk)=>({
|
|
649
|
+
type: "text",
|
|
650
|
+
text: {
|
|
651
|
+
content: _chunk
|
|
652
|
+
},
|
|
653
|
+
...token.type === "codespan" ? {
|
|
654
|
+
annotations: {
|
|
655
|
+
code: true
|
|
656
|
+
}
|
|
657
|
+
} : {}
|
|
658
|
+
}));
|
|
659
|
+
}), {
|
|
660
|
+
type: "text",
|
|
661
|
+
text: {
|
|
662
|
+
content: "\n"
|
|
663
|
+
}
|
|
664
|
+
}));
|
|
665
|
+
(0, $dxT2C$lodashes.each)(chunksWithNewLines, (chunk)=>{
|
|
666
|
+
acc.push(chunk);
|
|
658
667
|
});
|
|
659
668
|
return acc;
|
|
660
669
|
}, acc);
|