refactor: Update Mikrotik config validation logic to improve brace counting accuracy and enhance AutoUrlManager UI with consistent card layouts, larger icons, and refined button styles for better user experience.
Publish Fast Tabler Docker image / build-and-push-fast (push) Successful in 1m50s
Publish Fast Tabler Docker image / build-and-push-fast (push) Successful in 1m50s
This commit is contained in:
@@ -39,8 +39,11 @@ function validateMikrotikConfig(config) {
|
||||
inBlock = true;
|
||||
blockName = line.match(/^\/\w+(\s+\w+)*/)?.[0] || '';
|
||||
currentBlockLine = lineNum;
|
||||
braceBalance++;
|
||||
continue;
|
||||
// Считаем скобки только один раз для этой строки (чтобы не дублировать подсчёт ниже)
|
||||
const openBraces = (line.match(/\{/g) || []).length;
|
||||
const closeBraces = (line.match(/\}/g) || []).length;
|
||||
braceBalance += openBraces - closeBraces;
|
||||
continue;
|
||||
}
|
||||
|
||||
// Подсчет фигурных скобок
|
||||
|
||||
Reference in New Issue
Block a user