mirror of
https://github.com/n8n-io/n8n.git
synced 2024-12-24 20:24:05 -08:00
refactor(editor): Boost n8n Form Trigger in nodes-panel search results (#10294)
Some checks are pending
Test Master / install-and-build (push) Waiting to run
Test Master / Unit tests (18.x) (push) Blocked by required conditions
Test Master / Unit tests (20.x) (push) Blocked by required conditions
Test Master / Unit tests (22.4) (push) Blocked by required conditions
Test Master / Lint (push) Blocked by required conditions
Test Master / Notify Slack on failure (push) Blocked by required conditions
Some checks are pending
Test Master / install-and-build (push) Waiting to run
Test Master / Unit tests (18.x) (push) Blocked by required conditions
Test Master / Unit tests (20.x) (push) Blocked by required conditions
Test Master / Unit tests (22.4) (push) Blocked by required conditions
Test Master / Lint (push) Blocked by required conditions
Test Master / Notify Slack on failure (push) Blocked by required conditions
This commit is contained in:
parent
c0bdf3b719
commit
74e154b130
|
@ -139,10 +139,12 @@ function fuzzyMatchRecursive(
|
|||
if (matched) {
|
||||
outScore = 100;
|
||||
|
||||
// Apply leading letter penalty
|
||||
let penalty = LEADING_LETTER_PENALTY * matches[0];
|
||||
penalty = penalty < MAX_LEADING_LETTER_PENALTY ? MAX_LEADING_LETTER_PENALTY : penalty;
|
||||
outScore += penalty;
|
||||
// Apply leading letter penalty (if not n8n-prefixed)
|
||||
if (!target.toLowerCase().startsWith('n8n')) {
|
||||
let penalty = LEADING_LETTER_PENALTY * matches[0];
|
||||
penalty = penalty < MAX_LEADING_LETTER_PENALTY ? MAX_LEADING_LETTER_PENALTY : penalty;
|
||||
outScore += penalty;
|
||||
}
|
||||
|
||||
//Apply unmatched penalty
|
||||
const unmatched = target.length - nextMatch;
|
||||
|
|
|
@ -3,7 +3,7 @@
|
|||
"nodeVersion": "1.0",
|
||||
"codexVersion": "1.0",
|
||||
"categories": ["Core Nodes"],
|
||||
"alias": ["_Form", "form", "table", "submit", "post"],
|
||||
"alias": ["table", "submit", "post"],
|
||||
"resources": {
|
||||
"primaryDocumentation": [
|
||||
{
|
||||
|
|
Loading…
Reference in a new issue