Secure your code as it's written. Use Snyk Code to scan source code in minutes - no build needed - and fix issues immediately.
const range = this.session.view(solidity.current.sourceRange);
debug("range: %o", range);
// We were splitting on OS.EOL, but it turns out on Windows,
// in some environments (perhaps?) line breaks are still denoted by just \n
const splitLines = str => str.split(/\r?\n/g);
const lines = splitLines(source);
const colorizedLines = splitLines(colorizedSource);
this.config.logger.log("");
//HACK -- the line-pointer formatter doesn't work right with colorized
//lines, so we pass in the uncolored version too
this.config.logger.log(
DebugUtils.formatRangeLines(
colorizedLines,
range.lines,
lines,
contextBefore,
contextAfter
)
);
this.config.logger.log("");
}