aboutsummaryrefslogtreecommitdiffhomepage
diff options
context:
space:
mode:
-rw-r--r--scripts/linters/src/Linters/CargoWorkspaceDependencies.php2
-rw-r--r--scripts/linters/src/Linters/SortedDependencies.php2
2 files changed, 2 insertions, 2 deletions
diff --git a/scripts/linters/src/Linters/CargoWorkspaceDependencies.php b/scripts/linters/src/Linters/CargoWorkspaceDependencies.php
index 3ad86b6f..d50b5f42 100644
--- a/scripts/linters/src/Linters/CargoWorkspaceDependencies.php
+++ b/scripts/linters/src/Linters/CargoWorkspaceDependencies.php
@@ -48,7 +48,7 @@ final class CargoWorkspaceDependencies implements Linter
foreach (file($path) as $idx => $rawLine) {
$stripped = trim($rawLine);
- if (preg_match('/\A\[([^\]]+)\]\z/', $stripped, $m)) {
+ if (preg_match('/\A\[\[?([^\[\]]+)\]\]?\z/', $stripped, $m)) {
$currentSection = $m[1];
continue;
}
diff --git a/scripts/linters/src/Linters/SortedDependencies.php b/scripts/linters/src/Linters/SortedDependencies.php
index 78ea0eb2..7a9fe20c 100644
--- a/scripts/linters/src/Linters/SortedDependencies.php
+++ b/scripts/linters/src/Linters/SortedDependencies.php
@@ -62,7 +62,7 @@ final class SortedDependencies implements Linter
foreach (explode("\n", $content) as $line) {
$stripped = rtrim($line, "\r\n");
- if (preg_match('/\A\s*\[([^\]]+)\]\s*\z/', $stripped, $m)) {
+ if (preg_match('/\A\s*\[\[?([^\[\]]+)\]\]?\s*\z/', $stripped, $m)) {
$current = $m[1];
$sections[$current] ??= [];
continue;