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

In match_#.html, whitespace isn't always highlighted, even if exact match #58

Open
dmalan opened this issue Jul 13, 2020 · 1 comment
Open
Labels

Comments

@dmalan
Copy link
Member

dmalan commented Jul 13, 2020

Screen Shot 2020-07-13 at 9 41 29 AM

@dmalan dmalan added the bug label Jul 13, 2020
@Jelleas Jelleas added this to the State driven dynamically rendered match view milestone Jul 20, 2020
@Jelleas
Copy link
Contributor

Jelleas commented Jul 20, 2020

This is sadly a feature. In structure whitespace tokens are thrown out entirely. Once compare50 finds a match in code between two submissions, it will try to "expand" that match by adding as many tokens before and after the match until it no longer matches. But, given the whitespace tokens no longer exist, there's actually nothing to expand on. That's why you see a weird gap at line 32 between the matches from 24-31 and 33-...

This can be solved by expanding on tokens first, then jumping back to the file, and expanding on characters from there on out. Effectively jumping down an abstraction level (tokens => characters).

@Jelleas Jelleas removed this from the State driven dynamically rendered match view milestone Jul 20, 2020
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