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

Improve specs and docs for the Regex module #13552

Merged
merged 2 commits into from May 12, 2024

Conversation

sabiwara
Copy link
Contributor

@sabiwara sabiwara commented May 12, 2024

I tried to add a couple of additional specs, doc examples and links to increase discoverability for Regex options.

Comment on lines 619 to 622
{:parts, pos_integer() | :infinity}
| {:trim, boolean()}
| {:on, capture_option()}
| {:include_captures, boolean()}
Copy link
Member

Choose a reason for hiding this comment

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

Btw, you can use the keyword syntax. [parts: ..., trim: boolean(), on: ...]

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Oh nice! TIL, I didn't know about this syntax for specs.
Done in 09cf23c.

@sabiwara sabiwara merged commit 67983c0 into elixir-lang:main May 12, 2024
9 checks passed
@sabiwara sabiwara deleted the regex-specs branch May 12, 2024 08:23
sabiwara added a commit to sabiwara/elixir that referenced this pull request May 12, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants