From 5778b3bac856f4894f7b95b01cd1ad3b96df66a2 Mon Sep 17 00:00:00 2001 From: Omar Ajoue Date: Fri, 22 Dec 2023 14:22:05 +0000 Subject: [PATCH] docs: Improve documentation for the toTitleCase function (no-changelog) (#8140) MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit ## Summary Update description of `toTitleCase` to better explain what it does. ## Related tickets and issues https://linear.app/n8n/issue/PAY-857/expressions-totitlecase-fails-to-lowercase-the-non-leading-letters ## Review / Merge checklist - [ ] PR title and summary are descriptive. **Remember, the title automatically goes into the changelog. Use `(no-changelog)` otherwise.** ([conventions](https://github.com/n8n-io/n8n/blob/master/.github/pull_request_title_conventions.md)) - [ ] [Docs updated](https://github.com/n8n-io/n8n-docs) or follow-up ticket created. - [ ] Tests included. --------- Co-authored-by: Iván Ovejero --- packages/workflow/src/Extensions/StringExtensions.ts | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/packages/workflow/src/Extensions/StringExtensions.ts b/packages/workflow/src/Extensions/StringExtensions.ts index 794290d224..6a01279637 100644 --- a/packages/workflow/src/Extensions/StringExtensions.ts +++ b/packages/workflow/src/Extensions/StringExtensions.ts @@ -418,7 +418,8 @@ toSnakeCase.doc = { toTitleCase.doc = { name: 'toTitleCase', - description: 'Formats a string to title case. Example: "This Is a Title".', + description: + 'Formats a string to title case. Example: "This Is a Title". Will not change already uppercase letters to prevent losing information from acronyms and trademarks such as iPhone or FAANG.', returnType: 'string', docURL: 'https://docs.n8n.io/code/builtin/data-transformation-functions/strings/#string-toTitleCase',