Skip to content

Commit 065959a

Browse files
committed
Use forward slash instead of backslash for ToC hrefs
1 parent 9000215 commit 065959a

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

Build-Toolkit-Docs.ps1

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -109,7 +109,7 @@ foreach ($componentFolder in Get-ChildItem -Path $componentsRoot -Directory) {
109109
$header = GetTitleFrontMatterFromMarkdownFile $markdownFiles[0]
110110
$mdOutputFile = ProcessMarkdownFile $markdownFiles[0]
111111

112-
$tocHref = $mdOutputFile.Trim('/').Replace($OutputDir, '').Trim('\')
112+
$tocHref = $mdOutputFile.Trim('/').Replace($OutputDir, '').Trim('\').Replace('\', '/')
113113
$tocContents += AppendTocItem $header 1 @{ "href" = $tocHref }
114114
}
115115
else {
@@ -120,7 +120,7 @@ foreach ($componentFolder in Get-ChildItem -Path $componentsRoot -Directory) {
120120
$header = GetTitleFrontMatterFromMarkdownFile $markdownFile
121121
$mdOutputFile = ProcessMarkdownFile $markdownFile
122122

123-
$tocHref = $mdOutputFile.Trim('/').Replace($OutputDir, '').Trim('\')
123+
$tocHref = $mdOutputFile.Trim('/').Replace($OutputDir, '').Trim('\').Replace('\', '/')
124124
$tocContents += AppendTocItem $header 2 @{ "href" = $tocHref }
125125
}
126126
}

0 commit comments

Comments
 (0)