mirror of
https://github.com/n8n-io/n8n.git
synced 2026-10-17 05:29:44 +02:00
docs(core): Tidy the safe-regex comments
Co-Authored-By: Claude Opus 5.5 (1M context) <noreply@anthropic.com>
This commit is contained in:
parent
fcf9b3de88
commit
0eedb938d5
|
|
@ -93,7 +93,7 @@ function nativeEngine(): RegexEngine {
|
|||
warnedAboutBrowserFallback = true;
|
||||
LoggerProxy.warn('Using native regular expression engine without timeout protection');
|
||||
}
|
||||
/* eslint-disable n8n-local-rules/no-dynamic-regexp -- isomorphic native fallback; backend overrides via setInternalRegexEngine */
|
||||
/* eslint-disable n8n-local-rules/no-dynamic-regexp -- isomorphic native fallback */
|
||||
return {
|
||||
exec: (pattern, input, flags) => new RegExp(pattern, flags).exec(input),
|
||||
test: (pattern, input, flags) => new RegExp(pattern, flags).test(input),
|
||||
|
|
@ -186,15 +186,15 @@ export function resetInternalRegexEngine(): void {
|
|||
internalEngine = createDefaultEngine();
|
||||
}
|
||||
|
||||
/** @deprecated Renamed to {@link setInternalRegexEngine}. */
|
||||
/** @deprecated Use {@link setInternalRegexEngine} instead. */
|
||||
export const setSafeRegexEngine = setInternalRegexEngine;
|
||||
|
||||
/** @deprecated Renamed to {@link resetInternalRegexEngine}. */
|
||||
/** @deprecated Use {@link resetInternalRegexEngine} instead. */
|
||||
export const resetSafeRegexEngine = resetInternalRegexEngine;
|
||||
|
||||
internalEngine = createDefaultEngine();
|
||||
|
||||
/** For a pattern n8n itself authored. Always the built-in engine, whatever an instance selects for a user's patterns. */
|
||||
/** For patterns n8n authors, not user-authored ones. */
|
||||
export const safeInternalRegex: RegexEngine = {
|
||||
exec: (pattern, input, flags) => internalEngine.exec(pattern, input, flags),
|
||||
test: (pattern, input, flags) => internalEngine.test(pattern, input, flags),
|
||||
|
|
@ -204,5 +204,5 @@ export const safeInternalRegex: RegexEngine = {
|
|||
split: (pattern, input, flags) => internalEngine.split(pattern, input, flags),
|
||||
};
|
||||
|
||||
/** @deprecated Renamed to {@link safeInternalRegex}. */
|
||||
/** @deprecated Use {@link safeInternalRegex} instead. */
|
||||
export const safeRegex: RegexEngine = safeInternalRegex;
|
||||
|
|
|
|||
Loading…
Reference in New Issue
Block a user