Skip to content

Commit 02173a7

Browse files
authored
fix: Toc warnings when toc item with TopicUid but name is not specified (#9665)
fix: warnings for tocitem when topicuid specified but name is not specified
1 parent 2928361 commit 02173a7

File tree

1 file changed

+5
-0
lines changed

1 file changed

+5
-0
lines changed

src/Docfx.Build/ManifestProcessor.cs

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -208,8 +208,13 @@ void UpdateTocNameCore(List<TocItemViewModel> items)
208208
{
209209
if (string.IsNullOrEmpty(node.Name))
210210
{
211+
// Try to get title from href
211212
if (node.Href is not null && titles.TryGetValue(UriUtility.GetPath(node.Href), out var title))
212213
node.Name = title;
214+
// If topicUid exists. Name is resolved by TocDocumentProcessor
215+
else if (node.TopicUid != null)
216+
{
217+
}
213218
else
214219
Logger.LogWarning(
215220
$"TOC item ({node}) with empty name found. Missing a name?",

0 commit comments

Comments
 (0)