mirror of
https://github.com/atom/atom.git
synced 2026-04-28 03:01:47 -04:00
Allow multiple space-delimited classes for highlight decorations
Fixes #5747
This commit is contained in:
@@ -1171,6 +1171,14 @@ describe "TextEditorComponent", ->
|
||||
regions = componentNode.querySelectorAll('.test-highlight .region')
|
||||
expect(regions.length).toBe 2
|
||||
|
||||
it "allows multiple space-delimited decoration classes", ->
|
||||
decoration.setProperties(type: 'highlight', class: 'foo bar')
|
||||
nextAnimationFrame()
|
||||
expect(componentNode.querySelectorAll('.foo.bar').length).toBe 1
|
||||
decoration.setProperties(type: 'highlight', class: 'bar baz')
|
||||
nextAnimationFrame()
|
||||
expect(componentNode.querySelectorAll('.bar.baz').length).toBe 1
|
||||
|
||||
it "renders classes on the regions directly if 'deprecatedRegionClass' option is defined", ->
|
||||
decoration = editor.decorateMarker(marker, type: 'highlight', class: 'test-highlight', deprecatedRegionClass: 'test-highlight-region')
|
||||
nextAnimationFrame()
|
||||
|
||||
Reference in New Issue
Block a user