Skip to content

Commit 75ac81a

Browse files
authored
Glob against relative path, not filename (#386)
1 parent fdeeee7 commit 75ac81a

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

src/Elastic.Markdown/IO/DocumentationSet.cs

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -130,10 +130,10 @@ public async Task ResolveDirectoryTree(Cancel ctx) =>
130130

131131
private DocumentationFile CreateMarkDownFile(IFileInfo file, BuildContext context)
132132
{
133-
if (Configuration.Exclude.Any(g => g.IsMatch(file.Name)))
133+
var relativePath = Path.GetRelativePath(SourcePath.FullName, file.FullName);
134+
if (Configuration.Exclude.Any(g => g.IsMatch(relativePath)))
134135
return new ExcludedFile(file, SourcePath);
135136

136-
var relativePath = Path.GetRelativePath(SourcePath.FullName, file.FullName);
137137
if (Configuration.Files.Contains(relativePath))
138138
return new MarkdownFile(file, SourcePath, MarkdownParser, context);
139139

0 commit comments

Comments
 (0)