Commit a56adb9 1 parent a6d9713 commit a56adb9 Copy full SHA for a56adb9
File tree 1 file changed +7
-10
lines changed
1 file changed +7
-10
lines changed Original file line number Diff line number Diff line change @@ -261,16 +261,13 @@ export default class Highlighter {
261
261
const highlights : Highlight [ ] = Object . values ( this . highlights )
262
262
. filter ( ( other : Highlight ) => other . intersects ( range ) ) ;
263
263
264
- if ( highlights . length === 0 ) {
265
- const highlight : Highlight = new Highlight (
266
- range ,
267
- { content : rangeContentsString ( range ) } ,
268
- this . getHighlightOptions ( )
269
- ) ;
270
- onSelect ( highlights , highlight ) ;
271
- } else {
272
- onSelect ( highlights ) ;
273
- }
264
+ // This now allows overlapping highlights
265
+ const highlight : Highlight = new Highlight (
266
+ range ,
267
+ { content : rangeContentsString ( range ) } ,
268
+ this . getHighlightOptions ( )
269
+ ) ;
270
+ onSelect ( highlights , highlight ) ;
274
271
}
275
272
}
276
273
You can’t perform that action at this time.
0 commit comments