Skip to content

fix: resolve parse errors in selected R scripts#291

Merged
siriak merged 1 commit intoTheAlgorithms:masterfrom
DiogoRibeiro7:fix-single-parse-error
Apr 2, 2026
Merged

fix: resolve parse errors in selected R scripts#291
siriak merged 1 commit intoTheAlgorithms:masterfrom
DiogoRibeiro7:fix-single-parse-error

Conversation

@DiogoRibeiro7
Copy link
Copy Markdown
Contributor

@DiogoRibeiro7 DiogoRibeiro7 commented Apr 2, 2026

Description

This PR fixes parse errors in a few existing R scripts without changing their intended behavior.

What changed

  • corrected if/else structure in interactive search scripts
  • replaced malformed/non-ASCII text that was contributing to parse failure
  • fixed a mismatched closing delimiter
  • split an invalid combined assignment into valid statements

Verification

Each updated file was checked with Rscript -e 'parse(file=...)'.

Copilot AI review requested due to automatic review settings April 2, 2026 08:51
@DiogoRibeiro7 DiogoRibeiro7 changed the title Fix parse error in z algorithm search fix: resolve parse errors in selected R scripts Apr 2, 2026
Copy link
Copy Markdown

Copilot AI left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull request overview

Fixes an R parse error in the interactive example portion of the Z-algorithm pattern search script by correcting the if/else block syntax.

Changes:

  • Add braces around the if/else block to make it syntactically valid in R.
  • Normalize the “Pattern not found” message string.

Copy link
Copy Markdown
Member

@siriak siriak left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Looks good, thanks!

@siriak siriak merged commit 007a4f6 into TheAlgorithms:master Apr 2, 2026
5 of 6 checks passed
@DiogoRibeiro7 DiogoRibeiro7 deleted the fix-single-parse-error branch April 10, 2026 13:59
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.

3 participants