n8n-nodes-notion-advanced 1.2.0-beta → 1.2.1-beta
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.
@@ -815,6 +815,134 @@ class NotionAITool {
|
|
815
815
|
return `__XML_BLOCK_${blockCounter++}__`;
|
816
816
|
}
|
817
817
|
},
|
818
|
+
// Paragraphs: <p>content</p>
|
819
|
+
{
|
820
|
+
regex: /<p>(.*?)<\/p>/gis,
|
821
|
+
processor: (match, content) => {
|
822
|
+
blocks.push({
|
823
|
+
type: 'paragraph',
|
824
|
+
paragraph: {
|
825
|
+
rich_text: NotionAITool.parseBasicMarkdown(content.trim()),
|
826
|
+
},
|
827
|
+
});
|
828
|
+
return `__XML_BLOCK_${blockCounter++}__`;
|
829
|
+
}
|
830
|
+
},
|
831
|
+
// Bulleted lists: <ul><li>item</li></ul>
|
832
|
+
{
|
833
|
+
regex: /<ul>(.*?)<\/ul>/gis,
|
834
|
+
processor: (match, listContent) => {
|
835
|
+
// Extract individual list items
|
836
|
+
const items = listContent.match(/<li>(.*?)<\/li>/gis) || [];
|
837
|
+
items.forEach(item => {
|
838
|
+
const itemContent = item.replace(/<\/?li>/gi, '').trim();
|
839
|
+
blocks.push({
|
840
|
+
type: 'bulleted_list_item',
|
841
|
+
bulleted_list_item: {
|
842
|
+
rich_text: NotionAITool.parseBasicMarkdown(itemContent),
|
843
|
+
},
|
844
|
+
});
|
845
|
+
});
|
846
|
+
return `__XML_BLOCK_${blockCounter++}__`;
|
847
|
+
}
|
848
|
+
},
|
849
|
+
// Numbered lists: <ol><li>item</li></ol>
|
850
|
+
{
|
851
|
+
regex: /<ol>(.*?)<\/ol>/gis,
|
852
|
+
processor: (match, listContent) => {
|
853
|
+
// Extract individual list items
|
854
|
+
const items = listContent.match(/<li>(.*?)<\/li>/gis) || [];
|
855
|
+
items.forEach(item => {
|
856
|
+
const itemContent = item.replace(/<\/?li>/gi, '').trim();
|
857
|
+
blocks.push({
|
858
|
+
type: 'numbered_list_item',
|
859
|
+
numbered_list_item: {
|
860
|
+
rich_text: NotionAITool.parseBasicMarkdown(itemContent),
|
861
|
+
},
|
862
|
+
});
|
863
|
+
});
|
864
|
+
return `__XML_BLOCK_${blockCounter++}__`;
|
865
|
+
}
|
866
|
+
},
|
867
|
+
// Standalone list items: <li>content</li>
|
868
|
+
{
|
869
|
+
regex: /<li>(.*?)<\/li>/gis,
|
870
|
+
processor: (match, content) => {
|
871
|
+
blocks.push({
|
872
|
+
type: 'bulleted_list_item',
|
873
|
+
bulleted_list_item: {
|
874
|
+
rich_text: NotionAITool.parseBasicMarkdown(content.trim()),
|
875
|
+
},
|
876
|
+
});
|
877
|
+
return `__XML_BLOCK_${blockCounter++}__`;
|
878
|
+
}
|
879
|
+
},
|
880
|
+
// Blockquotes: <blockquote>content</blockquote>
|
881
|
+
{
|
882
|
+
regex: /<blockquote>(.*?)<\/blockquote>/gis,
|
883
|
+
processor: (match, content) => {
|
884
|
+
blocks.push({
|
885
|
+
type: 'quote',
|
886
|
+
quote: {
|
887
|
+
rich_text: NotionAITool.parseBasicMarkdown(content.trim()),
|
888
|
+
},
|
889
|
+
});
|
890
|
+
return `__XML_BLOCK_${blockCounter++}__`;
|
891
|
+
}
|
892
|
+
},
|
893
|
+
// Preformatted text: <pre>content</pre>
|
894
|
+
{
|
895
|
+
regex: /<pre>(.*?)<\/pre>/gis,
|
896
|
+
processor: (match, content) => {
|
897
|
+
blocks.push({
|
898
|
+
type: 'code',
|
899
|
+
code: {
|
900
|
+
rich_text: [(0, NotionUtils_1.createRichText)(content.trim())],
|
901
|
+
language: 'plain_text',
|
902
|
+
},
|
903
|
+
});
|
904
|
+
return `__XML_BLOCK_${blockCounter++}__`;
|
905
|
+
}
|
906
|
+
},
|
907
|
+
// Strong/Bold: <strong>content</strong> or <b>content</b>
|
908
|
+
{
|
909
|
+
regex: /<(strong|b)>(.*?)<\/(strong|b)>/gis,
|
910
|
+
processor: (match, tag, content) => {
|
911
|
+
blocks.push({
|
912
|
+
type: 'paragraph',
|
913
|
+
paragraph: {
|
914
|
+
rich_text: NotionAITool.parseBasicMarkdown(`**${content.trim()}**`),
|
915
|
+
},
|
916
|
+
});
|
917
|
+
return `__XML_BLOCK_${blockCounter++}__`;
|
918
|
+
}
|
919
|
+
},
|
920
|
+
// Emphasis/Italic: <em>content</em> or <i>content</i>
|
921
|
+
{
|
922
|
+
regex: /<(em|i)>(.*?)<\/(em|i)>/gis,
|
923
|
+
processor: (match, tag, content) => {
|
924
|
+
blocks.push({
|
925
|
+
type: 'paragraph',
|
926
|
+
paragraph: {
|
927
|
+
rich_text: NotionAITool.parseBasicMarkdown(`*${content.trim()}*`),
|
928
|
+
},
|
929
|
+
});
|
930
|
+
return `__XML_BLOCK_${blockCounter++}__`;
|
931
|
+
}
|
932
|
+
},
|
933
|
+
// Line breaks: <br/> or <br>
|
934
|
+
{
|
935
|
+
regex: /<br\s*\/?>/gis,
|
936
|
+
processor: (match) => {
|
937
|
+
blocks.push({
|
938
|
+
type: 'paragraph',
|
939
|
+
paragraph: {
|
940
|
+
rich_text: [(0, NotionUtils_1.createRichText)('')],
|
941
|
+
},
|
942
|
+
});
|
943
|
+
return `__XML_BLOCK_${blockCounter++}__`;
|
944
|
+
}
|
945
|
+
},
|
818
946
|
];
|
819
947
|
// Process each tag type
|
820
948
|
tagProcessors.forEach(({ regex, processor }) => {
|
package/package.json
CHANGED
@@ -1,6 +1,6 @@
|
|
1
1
|
{
|
2
2
|
"name": "n8n-nodes-notion-advanced",
|
3
|
-
"version": "1.2.
|
3
|
+
"version": "1.2.1-beta",
|
4
4
|
"description": "Advanced n8n Notion nodes: Full-featured workflow node + AI Agent Tool for intelligent Notion automation with 25+ block types (BETA)",
|
5
5
|
"scripts": {
|
6
6
|
"build": "echo 'Already built'",
|