Skip to content

Commit 1ea3a85

Browse files
committed
only emit an error if file configured in toc is not markdown and is not snippetfile
1 parent 6731a6e commit 1ea3a85

File tree

1 file changed

+2
-1
lines changed

1 file changed

+2
-1
lines changed

src/Elastic.Markdown/IO/Navigation/DocumentationGroup.cs

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -207,7 +207,8 @@ private MarkdownFile ProcessTocItems(BuildContext context,
207207

208208
if (d is not MarkdownFile md)
209209
{
210-
context.EmitError(context.ConfigurationPath, $"{d.RelativePath} is not a Markdown file.");
210+
if (d is not SnippetFile)
211+
context.EmitError(context.ConfigurationPath, $"{d.RelativePath} is not a Markdown file.");
211212
continue;
212213
}
213214

0 commit comments

Comments
 (0)