mirror of
https://github.com/Abdulazizzn/n8n-enterprise-unlocked.git
synced 2025-12-17 10:02:05 +00:00
refactor(editor): Boost n8n Form Trigger in nodes-panel search results (#10294)
This commit is contained in:
@@ -139,10 +139,12 @@ function fuzzyMatchRecursive(
|
|||||||
if (matched) {
|
if (matched) {
|
||||||
outScore = 100;
|
outScore = 100;
|
||||||
|
|
||||||
// Apply leading letter penalty
|
// Apply leading letter penalty (if not n8n-prefixed)
|
||||||
let penalty = LEADING_LETTER_PENALTY * matches[0];
|
if (!target.toLowerCase().startsWith('n8n')) {
|
||||||
penalty = penalty < MAX_LEADING_LETTER_PENALTY ? MAX_LEADING_LETTER_PENALTY : penalty;
|
let penalty = LEADING_LETTER_PENALTY * matches[0];
|
||||||
outScore += penalty;
|
penalty = penalty < MAX_LEADING_LETTER_PENALTY ? MAX_LEADING_LETTER_PENALTY : penalty;
|
||||||
|
outScore += penalty;
|
||||||
|
}
|
||||||
|
|
||||||
//Apply unmatched penalty
|
//Apply unmatched penalty
|
||||||
const unmatched = target.length - nextMatch;
|
const unmatched = target.length - nextMatch;
|
||||||
|
|||||||
@@ -3,7 +3,7 @@
|
|||||||
"nodeVersion": "1.0",
|
"nodeVersion": "1.0",
|
||||||
"codexVersion": "1.0",
|
"codexVersion": "1.0",
|
||||||
"categories": ["Core Nodes"],
|
"categories": ["Core Nodes"],
|
||||||
"alias": ["_Form", "form", "table", "submit", "post"],
|
"alias": ["table", "submit", "post"],
|
||||||
"resources": {
|
"resources": {
|
||||||
"primaryDocumentation": [
|
"primaryDocumentation": [
|
||||||
{
|
{
|
||||||
|
|||||||
Reference in New Issue
Block a user