Skip to content

Commit f486d5a

Browse files
committed
don't lookup anchors in includes that are not found (or are cyclical)
1 parent 1b25050 commit f486d5a

File tree

1 file changed

+1
-0
lines changed

1 file changed

+1
-0
lines changed

src/Elastic.Markdown/IO/MarkdownFile.cs

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -227,6 +227,7 @@ public static List<PageTocItem> GetAnchors(
227227
{
228228
var includeBlocks = document.Descendants<IncludeBlock>().ToArray();
229229
var includes = includeBlocks
230+
.Where(i => i.Found)
230231
.Select(i =>
231232
{
232233
var path = i.IncludePathFromSourceDirectory;

0 commit comments

Comments
 (0)