Skip to content

Commit

Permalink
Disable index.htm replacement for now
Browse files Browse the repository at this point in the history
  • Loading branch information
GeertvanHorrik committed Jun 28, 2017
1 parent 409e4de commit d099b79
Showing 1 changed file with 11 additions and 5 deletions.
16 changes: 11 additions & 5 deletions src/DocNet/INavigationElementExtensions.cs
Original file line number Diff line number Diff line change
Expand Up @@ -18,12 +18,18 @@ public static string GetFinalTargetUrl(this INavigationElement navigationElement
var targetUrl = navigationElement.GetTargetURL(pathSpecification);
var link = HttpUtility.UrlPathEncode(targetUrl);

if (link.Length > IndexHtmFileName.Length && link.EndsWith(IndexHtmFileName, StringComparison.InvariantCultureIgnoreCase))
{
link = link.Substring(0, link.Length - IndexHtmFileName.Length);
}
// Disabled for now as discussed in #65 (https://github.com/FransBouma/DocNet/pull/65), but
// is required for #44
//if (pathSpecification == PathSpecification.RelativeAsFolder)
//{
// if (link.Length > IndexHtmFileName.Length &&
// link.EndsWith(IndexHtmFileName, StringComparison.InvariantCultureIgnoreCase))
// {
// link = link.Substring(0, link.Length - IndexHtmFileName.Length);
// }
//}

return link;
return link;
}
}
}

0 comments on commit d099b79

Please sign in to comment.