Fix compose config test service parsing
This commit is contained in:
@@ -24,7 +24,7 @@ const traefikSource = [
|
||||
function readComposeServiceBlock(composeSource, serviceName) {
|
||||
const escapedServiceName = serviceName.replace(/[.*+?^${}()|[\]\\]/g, "\\$&");
|
||||
const servicePattern = new RegExp(
|
||||
`^\\s{2}${escapedServiceName}:\\n([\\s\\S]*?)(?=^\\s{2}[A-Za-z0-9_-]+:|^volumes:|^networks:|\\Z)`,
|
||||
`^[ ]{2}${escapedServiceName}:\\r?\\n([\\s\\S]*?)(?=^[ ]{2}[A-Za-z0-9_-]+:|^volumes:|^networks:|(?![\\s\\S]))`,
|
||||
"m"
|
||||
);
|
||||
const match = composeSource.match(servicePattern);
|
||||
|
||||
Reference in New Issue
Block a user