@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/module.js
CHANGED
|
@@ -633,19 +633,28 @@ const $d584c575eabd606d$var$parseMarkedTokenToNotionRequest = (tokens, acc = [])
|
|
|
633
633
|
if (!text) return acc;
|
|
634
634
|
const textToInsert = (0, $e8d3ca61f6a67481$export$2e2bcd8739ae039)(text);
|
|
635
635
|
// chunk the text into 2000 character chunks, should handle emojis and multi-byte characters
|
|
636
|
-
const
|
|
637
|
-
(0, $hgUW1$
|
|
638
|
-
|
|
639
|
-
|
|
640
|
-
|
|
641
|
-
|
|
642
|
-
|
|
643
|
-
|
|
644
|
-
|
|
645
|
-
|
|
646
|
-
|
|
647
|
-
|
|
648
|
-
|
|
636
|
+
const textSplitByNewLine = textToInsert.split("\n");
|
|
637
|
+
const chunksOfChunks = (0, $hgUW1$compact)((0, $hgUW1$map)(textSplitByNewLine, (chunk)=>$d584c575eabd606d$var$chunkText(chunk)));
|
|
638
|
+
const chunksWithNewLines = (0, $hgUW1$flattenDeep)((0, $8f5fb75395ee9099$export$2e2bcd8739ae039)((0, $hgUW1$map)(chunksOfChunks, (chunk)=>{
|
|
639
|
+
return (0, $hgUW1$map)(chunk, (_chunk)=>({
|
|
640
|
+
type: "text",
|
|
641
|
+
text: {
|
|
642
|
+
content: _chunk
|
|
643
|
+
},
|
|
644
|
+
...token.type === "codespan" ? {
|
|
645
|
+
annotations: {
|
|
646
|
+
code: true
|
|
647
|
+
}
|
|
648
|
+
} : {}
|
|
649
|
+
}));
|
|
650
|
+
}), {
|
|
651
|
+
type: "text",
|
|
652
|
+
text: {
|
|
653
|
+
content: "\n"
|
|
654
|
+
}
|
|
655
|
+
}));
|
|
656
|
+
(0, $hgUW1$each)(chunksWithNewLines, (chunk)=>{
|
|
657
|
+
acc.push(chunk);
|
|
649
658
|
});
|
|
650
659
|
return acc;
|
|
651
660
|
}, acc);
|