Fix formatting issue in metricaPlugin

This commit is contained in:
kwaroran
2024-01-15 12:44:09 +09:00
parent ab5f0c075d
commit 59735bb00d

View File

@@ -21,10 +21,8 @@ export function metricaPlugin(data:string, toSystem:'metrics'|'imperial'){
ratio = 1 / ratio;
}
if(!c[i][3]){
if(toSystem === 'metrics'){
from = from + ' '
to = to + ' '
}
from = from + ' '
to = to + ' '
}
const reg = new RegExp(`(\\d+(?:\\.\\d+)?)\\s*${from}`, 'g');
data = data.replace(reg, (_, value) => {