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

Remove ^ and $ markers at the beginning #35

Merged

Conversation

zvirja
Copy link
Contributor

@zvirja zvirja commented Apr 12, 2018

The current approach when characters are removed from the result suffers from the issue that sometimes symbols are the valid parts of result. Therefore, after we remove them, the produced string no longer matches the expected regular expression.

Fixed that by removing markers before regular expression generation.

@moodmosaic
Copy link
Owner

Interesting! :)

Do you have any test cases in mind that we could add to the test suite?

@zvirja
Copy link
Contributor Author

zvirja commented Apr 12, 2018

Actually, this bug fails the existing tests. If you run tests for multiple times, sometimes some of them will fail. After I applied this change, tests stopped to fail (actually, they are still flucky, but due to the different reason 😅).

Do you want me to add test cases which previously failed for each time? ;-)

@moodmosaic
Copy link
Owner

Do you want me to add test cases which previously failed for each time? ;-)

That'd be awesome 👍

The current approach when characters are removed from the result
suffers from the issue that sometimes symbols are the valid
parts of result. Therefore, after we remove them, the produced
string no longer matches the original regular expression.
Fixed that by removing markers _before_ regular expression
generation.
@zvirja zvirja force-pushed the fix-sporadic-failure-due-to-post-trim branch from 78651d5 to 3b84b51 Compare April 12, 2018 11:57
@zvirja
Copy link
Contributor Author

zvirja commented Apr 12, 2018

Added ;-)

Copy link
Owner

@moodmosaic moodmosaic left a comment

Choose a reason for hiding this comment

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

👍

@moodmosaic moodmosaic merged commit 9019475 into moodmosaic:master Apr 12, 2018
@zvirja zvirja deleted the fix-sporadic-failure-due-to-post-trim branch April 12, 2018 12:43
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.

None yet

2 participants