diff --git a/src/app/plugin/pluginAPI.js b/src/app/plugin/pluginAPI.js index 1d156e7026..fb9844efd5 100644 --- a/src/app/plugin/pluginAPI.js +++ b/src/app/plugin/pluginAPI.js @@ -97,8 +97,15 @@ module.exports = (pluginManager, fileProviders, fileManager, compiler, udapp) => } }, highlight: (mod, lineColumnPos, filePath, hexColor, cb) => { + var position + try { + position = JSON.parse(lineColumnPos) + } catch (e) { + return cb(e.message) + } highlighter.currentSourceLocation(null) - highlighter.currentSourceLocation(lineColumnPos, filePath, hexColor) + highlighter.currentSourceLocationFromfileName(position, filePath, hexColor) + cb() } } }