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

Trying to match a long pattern fails #119

Open
adityasaky opened this issue Apr 6, 2021 · 1 comment
Open

Trying to match a long pattern fails #119

adityasaky opened this issue Apr 6, 2021 · 1 comment

Comments

@adityasaky
Copy link

adityasaky commented Apr 6, 2021

Hello! I'm working with some longer pattern values, the value I'm currently testing has len(pattern) = ~800. I noticed that the line here: https://github.com/sergi/go-diff/blob/v1.2.0/diffmatchpatch/match.go#L57 causes an overflow beyond the length of the pattern being 64. I'm happy to help contribute fixes here if someone can point me in the right direction. I understand why it's happening but I haven't studied the algorithm yet to see if we can refactor this to accommodate larger patterns.

Thanks!

@federicotdn
Copy link

I've developed a variant of this library that can match patterns of any length: https://github.com/federicotdn/match2000
maybe it's useful!

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