Skip to content

Commit

Permalink
Use forward slash instead of backslash for ToC hrefs
Browse files Browse the repository at this point in the history
  • Loading branch information
Arlodotexe committed Apr 11, 2024
1 parent 9000215 commit 065959a
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions Build-Toolkit-Docs.ps1
Original file line number Diff line number Diff line change
Expand Up @@ -109,7 +109,7 @@ foreach ($componentFolder in Get-ChildItem -Path $componentsRoot -Directory) {
$header = GetTitleFrontMatterFromMarkdownFile $markdownFiles[0]
$mdOutputFile = ProcessMarkdownFile $markdownFiles[0]

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

$tocHref = $mdOutputFile.Trim('/').Replace($OutputDir, '').Trim('\')
$tocHref = $mdOutputFile.Trim('/').Replace($OutputDir, '').Trim('\').Replace('\', '/')
$tocContents += AppendTocItem $header 2 @{ "href" = $tocHref }
}
}
Expand Down

0 comments on commit 065959a

Please sign in to comment.