Skip to content

Add parentheses to clarify operator precedence in ingredient parser#85

Merged
spe1020 merged 2 commits intofeature/grocery-recipe-integrationfrom
copilot/sub-pr-84
Jan 11, 2026
Merged

Add parentheses to clarify operator precedence in ingredient parser#85
spe1020 merged 2 commits intofeature/grocery-recipe-integrationfrom
copilot/sub-pr-84

Conversation

Copy link
Copy Markdown
Contributor

Copilot AI commented Jan 11, 2026

Addressed code review feedback on operator precedence clarity in the ingredient skip condition.

Changes

  • Added explicit parentheses around (trimmed.startsWith('**') && trimmed.endsWith('**')) in the skip condition

Before:

if (!trimmed || trimmed.startsWith('#') || trimmed.startsWith('**') && trimmed.endsWith('**'))

After:

if (!trimmed || trimmed.startsWith('#') || (trimmed.startsWith('**') && trimmed.endsWith('**')))

The logic is unchanged (operator precedence already evaluated && before ||), but the parentheses make the intent explicit: skip lines that are empty, headers, or bold-formatted subheadings.


💡 You can make Copilot smarter by setting up custom instructions, customizing its development environment and configuring Model Context Protocol (MCP) servers. Learn more Copilot coding agent tips in the docs.

Co-authored-by: spe1020 <140115230+spe1020@users.noreply.github.com>
@cloudflare-workers-and-pages
Copy link
Copy Markdown

cloudflare-workers-and-pages Bot commented Jan 11, 2026

Deploying frontend with  Cloudflare Pages  Cloudflare Pages

Latest commit: aec0419
Status: ✅  Deploy successful!
Preview URL: https://99872e71.frontend-hvd.pages.dev
Branch Preview URL: https://copilot-sub-pr-84.frontend-hvd.pages.dev

View logs

Copilot AI changed the title [WIP] Update recipe-to-grocery-list integration per review feedback Add parentheses to clarify operator precedence in ingredient parser Jan 11, 2026
Copilot AI requested a review from spe1020 January 11, 2026 16:59
@spe1020 spe1020 marked this pull request as ready for review January 11, 2026 17:03
@spe1020 spe1020 merged commit 995a5b6 into feature/grocery-recipe-integration Jan 11, 2026
1 check passed
@spe1020 spe1020 deleted the copilot/sub-pr-84 branch March 1, 2026 22:20
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.

2 participants