@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 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 chunks = $bc8e7b2fdb012b3a$var$chunkText(textToInsert);
646
- (0, $dxT2C$lodashes.each)(chunks, (chunk)=>{
647
- acc.push({
648
- type: "text",
649
- text: {
650
- content: chunk
651
- },
652
- ...token.type === "codespan" ? {
653
- annotations: {
654
- code: true
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);