( lines, prevLines = [] )
| 66 | } |
| 67 | |
| 68 | highlightLines( lines, prevLines = [] ) { |
| 69 | const doc = this.editor.codemirror; |
| 70 | const className = 'CodeMirror-linebackground-highlight'; |
| 71 | const arrayDifference = ( array1, array2 ) => array1.filter( value => ! array2.includes( value ) ); |
| 72 | |
| 73 | lines.forEach( line => doc.addLineClass( line, 'background', className ) ); |
| 74 | arrayDifference( prevLines, lines ).forEach( line => doc.removeLineClass( line, 'background', className ) ); |
| 75 | } |
| 76 | |
| 77 | updateLanguageSettings( value ) { |
| 78 | const settings = getLanguageSettings( value ); |
no outgoing calls
no test coverage detected