Skip to content

Commit df05762

Browse files
committed
Replace variables in h1 titles correctly as well
1 parent 8f394b0 commit df05762

File tree

1 file changed

+2
-0
lines changed

1 file changed

+2
-0
lines changed

src/Elastic.Markdown/IO/MarkdownFile.cs

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -142,6 +142,8 @@ private void ReadDocumentInstructions(MarkdownDocument document)
142142
Title = RelativePath;
143143
Collector.EmitWarning(FilePath, "Document has no title, using file name as title.");
144144
}
145+
else if (Title.AsSpan().ReplaceSubstitutions(subs, out var replacement))
146+
Title = replacement;
145147

146148
var contents = document
147149
.Descendants<HeadingBlock>()

0 commit comments

Comments
 (0)