Skip to content

docs: document functionRegex capture nested blocks limitation#1367

Open
majestic-owl448 wants to merge 3 commits into
freeCodeCamp:mainfrom
majestic-owl448:docs/functionregex-nested-blocks-limitation
Open

docs: document functionRegex capture nested blocks limitation#1367
majestic-owl448 wants to merge 3 commits into
freeCodeCamp:mainfrom
majestic-owl448:docs/functionregex-nested-blocks-limitation

Conversation

@majestic-owl448
Copy link
Copy Markdown
Contributor

Checklist:

Related: freeCodeCamp/curriculum-helpers#583

Adds a note to the functionRegex() docs about a known limitation with capture: true: the captured content is truncated at the first } inside the body when the function contains nested blocks (if, try, for, etc.). Includes a code example to make the failure mode concrete.

The existing docs already note the arrow function caveat; this brings the nested-blocks limitation to the same level of visibility.

@majestic-owl448 majestic-owl448 requested a review from a team as a code owner May 30, 2026 11:06
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant