diff --git a/src/Elastic.Markdown/IO/DocumentationFile.cs b/src/Elastic.Markdown/IO/DocumentationFile.cs index 5bc44b80a..b4b9dd6b3 100644 --- a/src/Elastic.Markdown/IO/DocumentationFile.cs +++ b/src/Elastic.Markdown/IO/DocumentationFile.cs @@ -53,4 +53,3 @@ public record SnippetFile(IFileInfo SourceFile, IDirectoryInfo RootPath) } public record SnippetAnchors(string[] Anchors, IReadOnlyCollection TableOfContentItems); - diff --git a/src/Elastic.Markdown/Myst/ParserContext.cs b/src/Elastic.Markdown/Myst/ParserContext.cs index c025ea03c..bcf05dbd0 100644 --- a/src/Elastic.Markdown/Myst/ParserContext.cs +++ b/src/Elastic.Markdown/Myst/ParserContext.cs @@ -75,9 +75,11 @@ public ParserContext(ParserState state) CurrentUrlPath = DocumentationFileLookup(parentPath ?? MarkdownSourcePath) is MarkdownFile md ? md.Url - : SkipValidation - ? string.Empty - : throw new Exception($"Unable to find documentation file for {(parentPath ?? MarkdownSourcePath).FullName}"); + : string.Empty; + if (SkipValidation && string.IsNullOrEmpty(CurrentUrlPath)) + { + //TODO investigate this deeper. + } if (YamlFrontMatter?.Properties is not { Count: > 0 }) Substitutions = Configuration.Substitutions;