Fix formatting issue in metricaPlugin
This commit is contained in:
@@ -21,11 +21,9 @@ export function metricaPlugin(data:string, toSystem:'metrics'|'imperial'){
|
|||||||
ratio = 1 / ratio;
|
ratio = 1 / ratio;
|
||||||
}
|
}
|
||||||
if(!c[i][3]){
|
if(!c[i][3]){
|
||||||
if(toSystem === 'metrics'){
|
|
||||||
from = from + ' '
|
from = from + ' '
|
||||||
to = to + ' '
|
to = to + ' '
|
||||||
}
|
}
|
||||||
}
|
|
||||||
const reg = new RegExp(`(\\d+(?:\\.\\d+)?)\\s*${from}`, 'g');
|
const reg = new RegExp(`(\\d+(?:\\.\\d+)?)\\s*${from}`, 'g');
|
||||||
data = data.replace(reg, (_, value) => {
|
data = data.replace(reg, (_, value) => {
|
||||||
// if value is integer, parse it as integer
|
// if value is integer, parse it as integer
|
||||||
|
|||||||
Reference in New Issue
Block a user