Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fix typos & handle undefined max_reps #24

Open
wants to merge 3 commits into
base: master
Choose a base branch
from

Conversation

mkatychev
Copy link

@mkatychev mkatychev commented Aug 5, 2024

  • used typos-cli to fix typos in codebase
  • fixed warning when max_reps is undefined in _match_repetition

Comment on lines +423 to +433
function opt_decr(opt_num) =
is_undef(opt_num) ? undef
: opt_num - 1 ;

function _match_repetition(string, regex, min_reps, max_reps, pos, ignore_case=false) =
pos == undef?
undef
: pos > len(string)?
undef
: _null_coalesce(
_match_repetition(string, regex, min_reps-1, max_reps-1,
_match_parsed_rx(string, regex, pos, ignore_case=ignore_case),
_match_repetition(string, regex, opt_decr(min_reps), opt_decr(max_reps),
Copy link
Author

Choose a reason for hiding this comment

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

this is the code change that was done to handle #21

@mkatychev mkatychev changed the title Fix typos & add config Fix typos & handle undefined max_reps Aug 10, 2024
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