diff --git a/src/resolve/metadataResolver.ts b/src/resolve/metadataResolver.ts index 3d39cffa0..7c325a6c4 100644 --- a/src/resolve/metadataResolver.ts +++ b/src/resolve/metadataResolver.ts @@ -373,7 +373,16 @@ const parseAsContentMetadataXml = const suffixType = registry.getTypeBySuffix(extName(fsPath)); if (!suffixType) return false; - return fsPath.split(sep).includes(suffixType.directoryName); + const matchesSuffixType = fsPath.split(sep).includes(suffixType.directoryName); + if (matchesSuffixType) return matchesSuffixType; + + // it might be a type that requires strict parent folder name. + const strictFolderSuffixType = registry + .getStrictFolderTypes() + .find((l) => l.suffix === suffixType.suffix && l.directoryName && l.name !== suffixType.name); + if (!strictFolderSuffixType) return false; + + return fsPath.split(sep).includes(strictFolderSuffixType.directoryName); }; /**