From 7399d4bffc668e4b2649376f8b258a8cf3d03ea4 Mon Sep 17 00:00:00 2001 From: Geert van Horrik Date: Sun, 20 Aug 2017 21:10:15 +0200 Subject: [PATCH] Use custom NavigationContext for search to ensure search works regardless of PathSpecification --- src/DocNet/Config.cs | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/src/DocNet/Config.cs b/src/DocNet/Config.cs index f67046f..8fcbcee 100644 --- a/src/DocNet/Config.cs +++ b/src/DocNet/Config.cs @@ -180,7 +180,10 @@ namespace Docnet searchSimpleElement.ExtraScriptProducerFunc = (e,c,n) => @" "; - searchSimpleElement.GenerateOutput(this, activePath, navigationContext); + + // Force custom navigation context because this should end up in the root + searchSimpleElement.GenerateOutput(this, activePath, new NavigationContext(PathSpecification.Full, UrlFormatting.None, 0, false)); + activePath.Pop(); }