-
Notifications
You must be signed in to change notification settings - Fork 544
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Add JIT compilation to replace relative path ../src with full URL to …
…prepare for docfx (#3909) * update workflow to use main ref * opt for JIT compilation * update the correct env variable for docfx --------- Co-authored-by: Jack He <[email protected]>
- Loading branch information
1 parent
f54cf5a
commit 6903751
Showing
2 changed files
with
30 additions
and
1 deletion.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,23 @@ | ||
# Define the custom link to replace "../src" | ||
$customLink = "https://github.com/microsoft/msquic/tree/main/src" | ||
|
||
# Get the directory of markdown files from the user input | ||
$dir = "./docs" | ||
|
||
# Get all the markdown files in the directory | ||
$files = Get-ChildItem -Path $dir -Filter *.md | ||
|
||
# Loop through each file | ||
foreach ($file in $files) { | ||
# Read the file content as a string | ||
$content = Get-Content -Path $file.FullName -Raw | ||
|
||
# Replace all occurrences of "../src" with the custom link | ||
$content = $content -replace "\.\./src", $customLink | ||
|
||
# Write the modified content back to the file | ||
Set-Content -Path $file.FullName -Value $content | ||
} | ||
|
||
# Write a message to indicate the completion of the task | ||
Write-Host "All done!" |