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

Comparing .txt yields no result #78

Open
Jelleas opened this issue Aug 5, 2020 · 0 comments
Open

Comparing .txt yields no result #78

Jelleas opened this issue Aug 5, 2020 · 0 comments
Labels

Comments

@Jelleas
Copy link
Contributor

Jelleas commented Aug 5, 2020

To anyone concerned for a quick workaround, simply remove the .txt extension

Even when comparing lengthy identical files compare50 won't find any similarities. Odds are this is due Pygments default lexer for .txt files not breaking up the file. Sensible for syntax highlighting, because there is no syntax in a txt file, but less so for a comparison tool like this.

Not sure what the best approach is here. Perhaps we can hook in our own (or reuse some other) lexer for .txt files, or perhaps introduce a safeguard that breaks a file into words (or some other logical unit) iff there is one token being generated for the entire file.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

2 participants