n8n-nodes-notion-advanced 1.2.22-beta → 1.2.23-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.
@@ -1227,37 +1227,37 @@ class NotionAITool {
|
|
1227
1227
|
});
|
1228
1228
|
return decoded;
|
1229
1229
|
}
|
1230
|
-
// Cleanup function to remove remaining HTML tags and
|
1230
|
+
// Cleanup function to remove remaining HTML tags and placeholder artifacts
|
1231
1231
|
static cleanupRemainingHtml(content, placeholderPrefix) {
|
1232
1232
|
let cleaned = content;
|
1233
|
-
//
|
1233
|
+
// Clean up sequential placeholder format: __BLOCK_N__
|
1234
|
+
const sequentialPlaceholderPatterns = [
|
1235
|
+
/__BLOCK_\d+__/g, // Standard format: __BLOCK_1__, __BLOCK_2__, etc.
|
1236
|
+
/\b\d+__\b/g, // Remnants like "7__"
|
1237
|
+
/__\d+__/g, // Alternative format: __1__, __2__, etc.
|
1238
|
+
];
|
1239
|
+
sequentialPlaceholderPatterns.forEach(pattern => {
|
1240
|
+
cleaned = cleaned.replace(pattern, '');
|
1241
|
+
});
|
1242
|
+
// Legacy placeholder cleanup (for backwards compatibility)
|
1234
1243
|
if (placeholderPrefix) {
|
1235
|
-
// Clean up our specific placeholder format: __XML_{uuid8}_{number}__
|
1236
1244
|
const escapedPrefix = placeholderPrefix.replace(/[.*+?^${}()|[\]\\]/g, '\\$&');
|
1237
1245
|
const placeholderPattern = new RegExp(`${escapedPrefix}\\d+__`, 'g');
|
1238
1246
|
cleaned = cleaned.replace(placeholderPattern, '');
|
1239
1247
|
}
|
1240
|
-
//
|
1241
|
-
const
|
1248
|
+
// Clean up old UUID-based placeholders (for backwards compatibility)
|
1249
|
+
const legacyPlaceholderPatterns = [
|
1242
1250
|
/__XML_[a-f0-9]{8}_\d+__/g, // Standard format: __XML_abc12345_1__
|
1243
1251
|
/\b[A-Z]{2}[a-z0-9]{8,12}_+\b/g, // Variations like "MLb82d670450__"
|
1244
1252
|
/\b[A-Za-z]{2,4}[a-f0-9]{6,12}_+\b/g, // More flexible pattern matching
|
1245
1253
|
/_[a-f0-9]{8,12}_\d+_*/g, // Underscore variations
|
1246
1254
|
/[a-f0-9]{8,12}_\d+__/g, // Without prefix
|
1247
1255
|
];
|
1248
|
-
|
1249
|
-
cleaned = cleaned.replace(pattern, '');
|
1250
|
-
});
|
1251
|
-
// Remove entire lines containing XML content to prevent double processing
|
1252
|
-
const xmlContentLines = [
|
1253
|
-
/^.*<[^>]+>.*$/gm, // Any line with XML/HTML tags
|
1254
|
-
/^.*<[^&]+>.*$/gm, // HTML-encoded tags
|
1255
|
-
/^.*<(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
|
1256
|
-
];
|
1257
|
-
xmlContentLines.forEach(pattern => {
|
1256
|
+
legacyPlaceholderPatterns.forEach(pattern => {
|
1258
1257
|
cleaned = cleaned.replace(pattern, '');
|
1259
1258
|
});
|
1260
|
-
// Remove common HTML tags that might be left behind
|
1259
|
+
// Remove common HTML tags that might be left behind AFTER processing
|
1260
|
+
// Note: We don't remove entire lines here - only clean up leftover tags
|
1261
1261
|
const htmlTagsToRemove = [
|
1262
1262
|
/<\/?ul\s*[^>]*>/gi,
|
1263
1263
|
/<\/?ol\s*[^>]*>/gi,
|
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.23-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": [
|