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

"pick match" with RegEx flag does not seem to work #549

Closed
djeastm opened this issue Jun 19, 2024 · 1 comment
Closed

"pick match" with RegEx flag does not seem to work #549

djeastm opened this issue Jun 19, 2024 · 1 comment

Comments

@djeastm
Copy link

djeastm commented Jun 19, 2024

When I attempt to use the example in the documentation for the 'pick match' command (https://hyperscript.org/commands/pick/#pick-match), I get a syntax error

This is the example code:

set str to "The quick brown fox jumps over the lazy dog."
pick match of "the (\w+)" | i from str

And the error
image

This part of the source (line 5944) seems to be where there might be an issue:

if (tokens.matchOpToken("|")) {
    flags = tokens.requireToken("identifier").value;
}

I also noticed there was no test of the RegEx flag in /test/command/pick.js

1cg added a commit that referenced this issue Dec 17, 2024
added test for modifiers in pick regex example
@1cg
Copy link
Contributor

1cg commented Dec 17, 2024

added a test for it, appears to be working in the dev branch at least

@1cg 1cg closed this as completed Dec 17, 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

No branches or pull requests

2 participants