Skip to content

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

@frivoal

Description

@frivoal

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.

Metadata

Metadata

Assignees

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions