Skip to content

Commit f514240

Browse files
Parse MD files coming over http as raw markdown files (Azure#18396)
This will allow us to point our verify-link script at a raw MD file in a github repo and have it parsed correctly for links. Co-authored-by: Wes Haggard <[email protected]>
1 parent eaf5384 commit f514240

File tree

1 file changed

+4
-0
lines changed

1 file changed

+4
-0
lines changed

eng/common/scripts/Verify-Links.ps1

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -330,6 +330,10 @@ function GetLinks([System.Uri]$pageUri)
330330
try {
331331
$response = Invoke-WebRequest -Uri $pageUri -UserAgent $userAgent
332332
$content = $response.Content
333+
334+
if ($pageUri.ToString().EndsWith(".md")) {
335+
$content = (ConvertFrom-MarkDown -InputObject $content).html
336+
}
333337
}
334338
catch {
335339
$statusCode = $_.Exception.Response.StatusCode.value__

0 commit comments

Comments
 (0)