Fix value of width
This commit is contained in:
parent
44bc6bf069
commit
225f69b75b
|
@ -86,7 +86,7 @@ module.exports = async ({github, context}) => {
|
||||||
if (shouldModify) {
|
if (shouldModify) {
|
||||||
wasMatchModified = true;
|
wasMatchModified = true;
|
||||||
console.log(`Modifying match '${match}'`);
|
console.log(`Modifying match '${match}'`);
|
||||||
return `<img alt="${g1}" src="${g2}" width=${IMG_MAX_WIDTH_PX} />`;
|
return `<img alt="${g1}" src="${g2}" width=${((IMG_MAX_HEIGHT_PX * probeResult.width) / probeResult.height).toFixed(0)} />`;
|
||||||
}
|
}
|
||||||
|
|
||||||
console.log(`Match '${match}' is ok/will not be modified`);
|
console.log(`Match '${match}' is ok/will not be modified`);
|
||||||
|
|
Loading…
Reference in New Issue