Fix timeLabel regex to match decimal values like "45.5 sec"
Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
This commit is contained in:
@@ -523,7 +523,7 @@ function timeLabel(time) {
|
|||||||
// sonar-qube prevent super-linear runtime due to backtracking; change * to ?
|
// sonar-qube prevent super-linear runtime due to backtracking; change * to ?
|
||||||
//
|
//
|
||||||
const label = getTimeLabel(time).replace(/\s+/g, " "); // Collapse all consecutive whitespace into a single space
|
const label = getTimeLabel(time).replace(/\s+/g, " "); // Collapse all consecutive whitespace into a single space
|
||||||
const result = label.match(/^(\d+)\s?([a-zA-Z]+)$/); // add ^ and $ to meet sonar-qube need
|
const result = label.match(/^([\d.]+)\s?([a-zA-Z]+)$/); // add ^ and $ to meet sonar-qube need
|
||||||
return result;
|
return result;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user