|
|
@ -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 |