compare50 icon indicating copy to clipboard operation
compare50 copied to clipboard

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

Open dmalan opened this issue 5 years ago • 1 comments

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

dmalan avatar Jul 13 '20 13:07 dmalan

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 avatar Jul 20 '20 16:07 Jelleas