diff --git a/src/index.js b/src/index.js index 9a86246..8b49b94 100644 --- a/src/index.js +++ b/src/index.js @@ -82,10 +82,7 @@ function checkResult({ ]; if (dumpInlineDiffToConsole && (supportedInlineTerms.includes(process.env.TERM_PROGRAM) || 'ENABLE_INLINE_DIFF' in process.env)) { - const { receivedHeight, receivedWidth } = result.imageDimensions; - const height = 20; - const width = Math.round(((receivedHeight) / (receivedWidth * 3)) * height); - failure += `\n\n\t\x1b]1337;File=name=${Buffer.from(result.diffOutputPath).toString('base64')};inline=1;height=${height};width=${width}:${result.imgSrcString.replace('data:image/png;base64,', '')}\x07\x1b\n\n`; + failure += `\n\n\t\x1b]1337;File=name=${Buffer.from(result.diffOutputPath).toString('base64')};inline=1;width=40:${result.imgSrcString.replace('data:image/png;base64,', '')}\x07\x1b\n\n`; } else if (dumpDiffToConsole || dumpInlineDiffToConsole) { failure += `\n${chalk.bold.red('Or paste below image diff string to your browser`s URL bar.')}\n ${result.imgSrcString}`; }