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

lineBreak() has a capturing group #48

Closed
masih opened this issue Jan 9, 2016 · 1 comment
Closed

lineBreak() has a capturing group #48

masih opened this issue Jan 9, 2016 · 1 comment

Comments

@masih
Copy link
Contributor

masih commented Jan 9, 2016

Hello,
The method lineBreak() contains a capturing group, which results in shifting of group numbers; the following test fails:

    final VerbalExpression expression = VerbalExpression.regex().
                        lineBreak()
                       .capture().find("some").endCapture().then(" text")
                       .build();
        assertEquals("some", expression.getText("\nsome text", 1));

Cheers

@lanwen
Copy link
Contributor

lanwen commented Jan 9, 2016

Thanks for this bug! It will be very helpful of you send PR with the fix and this test for it

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