Uh oh!
There was an error while loading.Please reload this page.
- Notifications
You must be signed in to change notification settings - Fork41
Implement \Z#148
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 ourterms of service andprivacy statement. We’ll occasionally send you account related emails.
Already on GitHub?Sign in to your account
Implement \Z#148
Uh oh!
There was an error while loading.Please reload this page.
Conversation
robinst left a comment• edited
Loading Uh oh!
There was an error while loading.Please reload this page.
edited
Uh oh!
There was an error while loading.Please reload this page.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others.Learn more.
One comment, otherwise LGTM. Thanks!
src/parse.rs Outdated
Box::new(Expr::Delegate { | ||
inner: "\n*$".to_string(), | ||
size: 1, | ||
casei: self.flag(FLAG_CASEI), |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others.Learn more.
I thinksize
should be 0, no? It's a zero-length match. (I don't recall how size for delegates is actually used, but yeah.)
Also, I thinkcasei
should just befalse
here, regardless of the flag. (\n*$
never needs to be wrapped in(?i:
.)
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others.Learn more.
I saw thatsize
seems to get set to 1 in various other places so without really understanding it, I just followed suit:
Line 381 inc1b8a31
size:1, Line 395 inc1b8a31
size:1, Line 426 inc1b8a31
size:1,
Plus the\n*
part means that it could be a non-zero length match.
Good point about the case insensitivity, I will fix that later 🙂
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others.Learn more.
Fixed. Also you were write aboutsize
-it is used to determinemin_size
, so 0 is indeed the correct size to use here.
94852a6
intofancy-regex:mainUh oh!
There was an error while loading.Please reload this page.
closes#147