From 5202c3e5c3fc9b538487acf1d73efba2d367f1d6 Mon Sep 17 00:00:00 2001 From: Grandschtroumpf Date: Fri, 1 Feb 2019 10:32:31 +0100 Subject: [PATCH] Update SourceHighlighters to ES6 --- src/app/editor/SourceHighlighters.js | 8 +++++--- 1 file changed, 5 insertions(+), 3 deletions(-) diff --git a/src/app/editor/SourceHighlighters.js b/src/app/editor/SourceHighlighters.js index d484f04689..a00c6f92fd 100644 --- a/src/app/editor/SourceHighlighters.js +++ b/src/app/editor/SourceHighlighters.js @@ -1,7 +1,7 @@ 'use strict' -var SourceHighlighter = require('./sourceHighlighter') +const SourceHighlighter = require('./sourceHighlighter') -module.exports = class SourceHighlighters { +class SourceHighlighters { constructor () { this.highlighters = {} @@ -17,7 +17,7 @@ module.exports = class SourceHighlighters { // TODO what to do with mod? highlight (mod, lineColumnPos, filePath, hexColor, cb) { - var position + let position try { position = JSON.parse(lineColumnPos) } catch (e) { @@ -34,3 +34,5 @@ module.exports = class SourceHighlighters { cb() } } + +module.exports = SourceHighlighters \ No newline at end of file