Skip to content

[css-highlight-api] CSS.highlights: map vs set? #4590

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

Closed
frivoal opened this issue Dec 13, 2019 · 1 comment
Closed

[css-highlight-api] CSS.highlights: map vs set? #4590

frivoal opened this issue Dec 13, 2019 · 1 comment

Comments

@frivoal
Copy link
Collaborator

frivoal commented Dec 13, 2019

Should we throw some kind of exception if the same highlight range group is registered twice (or more) under different names? If not, isn’t it an isssue that the several custom highlights that share this highlight range group will not only share the same ranges, but also the same priority and style attribute? This could be solved by making the name an attribute of the highlight range group as well, and then turning CSS.highlights into a setlike of HighlightRangeGroup instead of a maplike of String=>HighlightRangeGroup.

If we did that, we could also probably rename HighlightRangeGroup into Highlight.

frivoal added a commit that referenced this issue Dec 20, 2019
Since it's responsibilities have increased to being more than just a
group, a more generic name makes sense.

Part of #4590
@frivoal frivoal self-assigned this Dec 20, 2019
@frivoal
Copy link
Collaborator Author

frivoal commented Dec 20, 2019

Closed based on a discussion with @sanketj

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

No branches or pull requests

1 participant