Skip to content

Commit 8fdf529

Browse files
committed
fix test
1 parent 0571a38 commit 8fdf529

File tree

1 file changed

+2
-5
lines changed

1 file changed

+2
-5
lines changed

src/Elastic.Markdown/IO/MarkdownFile.cs

Lines changed: 2 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -47,7 +47,7 @@ BuildContext build
4747
//todo refactor mutability of MarkdownFile as a whole
4848
ScopeDirectory = build.Configuration.ScopeDirectory;
4949
Products = build.ProductsConfiguration;
50-
Title = FileName.StripMarkdown();
50+
Title = RelativePath;
5151
}
5252

5353
public ProductsConfiguration Products { get; }
@@ -165,11 +165,8 @@ protected void ReadDocumentInstructions(MarkdownDocument document, Func<string,
165165
NavigationTitle = replacement;
166166
}
167167

168-
if (string.IsNullOrEmpty(Title))
169-
{
170-
Title = RelativePath;
168+
if (Title == RelativePath)
171169
Collector.EmitWarning(FilePath, "Document has no title, using file name as title.");
172-
}
173170
else if (Title.AsSpan().ReplaceSubstitutions(subs, Collector, out var replacement))
174171
Title = replacement;
175172

0 commit comments

Comments
 (0)