Update SourceHighlighters to ES6

pull/3094/head
Grandschtroumpf 6 years ago
parent 9adfa92dce
commit 5202c3e5c3
  1. 8
      src/app/editor/SourceHighlighters.js

@ -1,7 +1,7 @@
'use strict' 'use strict'
var SourceHighlighter = require('./sourceHighlighter') const SourceHighlighter = require('./sourceHighlighter')
module.exports = class SourceHighlighters { class SourceHighlighters {
constructor () { constructor () {
this.highlighters = {} this.highlighters = {}
@ -17,7 +17,7 @@ module.exports = class SourceHighlighters {
// TODO what to do with mod? // TODO what to do with mod?
highlight (mod, lineColumnPos, filePath, hexColor, cb) { highlight (mod, lineColumnPos, filePath, hexColor, cb) {
var position let position
try { try {
position = JSON.parse(lineColumnPos) position = JSON.parse(lineColumnPos)
} catch (e) { } catch (e) {
@ -34,3 +34,5 @@ module.exports = class SourceHighlighters {
cb() cb()
} }
} }
module.exports = SourceHighlighters
Loading…
Cancel
Save