mirror of
https://github.com/Abdulazizzn/n8n-enterprise-unlocked.git
synced 2025-12-17 18:12:04 +00:00
fix(Notion Node): Allow UUID v8 in notion id checks (#10938)
This commit is contained in:
committed by
GitHub
parent
8db8817851
commit
46beda05f6
@@ -23,6 +23,7 @@ import moment from 'moment-timezone';
|
||||
import { validate as uuidValidate } from 'uuid';
|
||||
import set from 'lodash/set';
|
||||
import { filters } from './descriptions/Filters';
|
||||
import { blockUrlExtractionRegexp } from './constants';
|
||||
|
||||
function uuidValidateWithoutDashes(this: IExecuteFunctions, value: string) {
|
||||
if (uuidValidate(value)) return true;
|
||||
@@ -1152,8 +1153,7 @@ export function extractBlockId(this: IExecuteFunctions, nodeVersion: number, ite
|
||||
const match = (blockIdRLCData.value as string).match(blockRegex);
|
||||
|
||||
if (match === null) {
|
||||
const pageRegex =
|
||||
/(?:https|http):\/\/www\.notion\.so\/(?:[a-z0-9-]{2,}\/)?(?:[a-zA-Z0-9-]{2,}-)?([0-9a-f]{8}[0-9a-f]{4}4[0-9a-f]{3}[89ab][0-9a-f]{3}[0-9a-f]{12})/;
|
||||
const pageRegex = new RegExp(blockUrlExtractionRegexp);
|
||||
const pageMatch = (blockIdRLCData.value as string).match(pageRegex);
|
||||
|
||||
if (pageMatch === null) {
|
||||
|
||||
Reference in New Issue
Block a user