Skip to content

Commit 4581ca4

Browse files
committed
fix windows test
1 parent c3a8cd2 commit 4581ca4

File tree

2 files changed

+4
-1
lines changed

2 files changed

+4
-1
lines changed

src/Elastic.Documentation.Navigation/Isolated/FileNavigationLeaf.cs

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -4,6 +4,7 @@
44

55
using System.Diagnostics;
66
using System.IO.Abstractions;
7+
using Elastic.Documentation.Extensions;
78
using Elastic.Documentation.Navigation.Assembler;
89

910
namespace Elastic.Documentation.Navigation.Isolated;
@@ -50,6 +51,7 @@ string DetermineUrl()
5051

5152
// Remove extension while preserving the directory path
5253
var relativePath = relativeToContainer ? args.RelativePathToTableOfContents : args.RelativePathToDocumentationSet;
54+
relativePath = relativePath.OptionalWindowsReplace();
5355
var path = relativePath.EndsWith(".md", StringComparison.OrdinalIgnoreCase)
5456
? relativePath[..^3] // Remove last 3 characters (.md)
5557
: relativePath;

tests/Elastic.Markdown.Tests/DocSet/NestedTocTests.cs

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,6 +2,7 @@
22
// Elasticsearch B.V licenses this file to you under the Apache 2.0 License.
33
// See the LICENSE file in the project root for more information
44

5+
using Elastic.Documentation.Extensions;
56
using Elastic.Documentation.Navigation;
67
using Elastic.Documentation.Navigation.Isolated;
78
using Elastic.Markdown.IO;
@@ -36,7 +37,7 @@ public void InjectsNestedTocsIntoDocumentationSet()
3637
index.Should().NotBeNull();
3738
var fileNav = index as FileNavigationLeaf<MarkdownFile>;
3839
fileNav.Should().NotBeNull();
39-
fileNav.Model.RelativePath.Should().Be("development/index.md");
40+
fileNav.Model.RelativePath.OptionalWindowsReplace().Should().Be("development/index.md");
4041

4142
}
4243
}

0 commit comments

Comments
 (0)