sonar 1 left. all regex fixed
This commit is contained in:
@@ -228,7 +228,8 @@ export function formatTime(seconds) {
|
||||
export function formatMaxTwo(times) {
|
||||
const formattedTimes = [];
|
||||
for (let time of times) {
|
||||
let units = time.match(/\d+[dhms]/g); // 匹配數字和單位(天、小時、分鐘、秒)
|
||||
// 匹配數字和單位(天、小時、分鐘、秒), 假設數字不可能大於10位數
|
||||
let units = time.match(/\d{1,10}[dhms]/g);
|
||||
let formattedTime = '';
|
||||
let count = 0;
|
||||
|
||||
|
||||
Reference in New Issue
Block a user