n8n-nodes-notion-advanced 1.2.17-beta → 1.2.18-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.
@@ -459,6 +459,16 @@ class NotionAITool {
|
|
459
459
|
// Skip completely empty lines and XML placeholders (now using dynamic prefix check)
|
460
460
|
if (!trimmedLine || /__XML_[a-f0-9]{8}_\d+__/.test(trimmedLine))
|
461
461
|
continue;
|
462
|
+
// Skip lines that contain XML tag patterns (to prevent double processing)
|
463
|
+
const xmlTagPatterns = [
|
464
|
+
/<[^>]+>/, // Any XML/HTML tag
|
465
|
+
/<[^&]+>/, // HTML-encoded tags
|
466
|
+
/<(h[1-6]|p|ul|ol|li|strong|em|b|i|code|blockquote|callout|todo|image|embed|bookmark|equation|toggle|divider|quote|pre)\b[^>]*>/i,
|
467
|
+
];
|
468
|
+
const hasXmlTags = xmlTagPatterns.some(pattern => pattern.test(trimmedLine));
|
469
|
+
if (hasXmlTags) {
|
470
|
+
continue; // Skip processing this line as it contains XML content that should be handled hierarchically
|
471
|
+
}
|
462
472
|
// Traditional markdown patterns (for backwards compatibility)
|
463
473
|
if (trimmedLine.startsWith('# ')) {
|
464
474
|
blocks.push({
|
@@ -1225,6 +1235,15 @@ class NotionAITool {
|
|
1225
1235
|
fallbackPatterns.forEach(pattern => {
|
1226
1236
|
cleaned = cleaned.replace(pattern, '');
|
1227
1237
|
});
|
1238
|
+
// Remove entire lines containing XML content to prevent double processing
|
1239
|
+
const xmlContentLines = [
|
1240
|
+
/^.*<[^>]+>.*$/gm, // Any line with XML/HTML tags
|
1241
|
+
/^.*<[^&]+>.*$/gm, // HTML-encoded tags
|
1242
|
+
/^.*<(h[1-6]|p|ul|ol|li|strong|em|b|i|code|blockquote|callout|todo|image|embed|bookmark|equation|toggle|divider|quote|pre)\b[^>]*>.*$/gim, // Specific XML content
|
1243
|
+
];
|
1244
|
+
xmlContentLines.forEach(pattern => {
|
1245
|
+
cleaned = cleaned.replace(pattern, '');
|
1246
|
+
});
|
1228
1247
|
// Remove common HTML tags that might be left behind
|
1229
1248
|
const htmlTagsToRemove = [
|
1230
1249
|
/<\/?ul\s*[^>]*>/gi,
|
@@ -1243,6 +1262,18 @@ class NotionAITool {
|
|
1243
1262
|
/<\/?s\s*[^>]*>/gi,
|
1244
1263
|
/<\/?del\s*[^>]*>/gi,
|
1245
1264
|
/<\/?mark\s*[^>]*>/gi,
|
1265
|
+
/<\/?h[1-6]\s*[^>]*>/gi,
|
1266
|
+
/<\/?blockquote\s*[^>]*>/gi,
|
1267
|
+
/<\/?callout\s*[^>]*>/gi,
|
1268
|
+
/<\/?todo\s*[^>]*>/gi,
|
1269
|
+
/<\/?image\s*[^>]*>/gi,
|
1270
|
+
/<\/?embed\s*[^>]*>/gi,
|
1271
|
+
/<\/?bookmark\s*[^>]*>/gi,
|
1272
|
+
/<\/?equation\s*[^>]*>/gi,
|
1273
|
+
/<\/?toggle\s*[^>]*>/gi,
|
1274
|
+
/<\/?quote\s*[^>]*>/gi,
|
1275
|
+
/<\/?pre\s*[^>]*>/gi,
|
1276
|
+
/<\/?divider\s*[^>]*>/gi,
|
1246
1277
|
/<br\s*\/?>/gi,
|
1247
1278
|
];
|
1248
1279
|
htmlTagsToRemove.forEach(regex => {
|
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.18-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
|
"files": [
|