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

Fix code highlighting bug #1600

Merged
merged 1 commit into from
Sep 30, 2024
Merged

Fix code highlighting bug #1600

merged 1 commit into from
Sep 30, 2024

Conversation

mikaelGusse
Copy link
Collaborator

Currently in Dolos the feature to highlight which fragments are matched in the Matches view is broken. This is due to a small bug in the corresponding code which checks if the hovering/selected match is equal to the match whose decoration we are supposed to be changing.

This PR changes how the equivalence is checked from the JS === to a small helper function called "areMatchesEqual" which checks that two matches have the same values.

Feel free to suggest other solutions to this bug, but this seems to work quite well. I also changed the alpha value of the selected match to be less transparent.

Related issue: #1588

Copy link
Member

@rien rien left a comment

Choose a reason for hiding this comment

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

It seems to work now, thanks!

@rien rien added this pull request to the merge queue Sep 30, 2024
Merged via the queue into dodona-edu:main with commit 97a9bef Sep 30, 2024
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.

2 participants