Skip to content

Commit

Permalink
Glob against relative path, not filename (#386)
Browse files Browse the repository at this point in the history
  • Loading branch information
Mpdreamz authored Jan 31, 2025
1 parent fdeeee7 commit 75ac81a
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions src/Elastic.Markdown/IO/DocumentationSet.cs
Original file line number Diff line number Diff line change
Expand Up @@ -130,10 +130,10 @@ public async Task ResolveDirectoryTree(Cancel ctx) =>

private DocumentationFile CreateMarkDownFile(IFileInfo file, BuildContext context)
{
if (Configuration.Exclude.Any(g => g.IsMatch(file.Name)))
var relativePath = Path.GetRelativePath(SourcePath.FullName, file.FullName);
if (Configuration.Exclude.Any(g => g.IsMatch(relativePath)))
return new ExcludedFile(file, SourcePath);

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

Expand Down

0 comments on commit 75ac81a

Please sign in to comment.