From ddf59da0af9d060d975083eb5f89951425cd92fd Mon Sep 17 00:00:00 2001 From: Sandy Armstrong Date: Wed, 5 May 2021 15:01:51 -0700 Subject: [PATCH] Support in-page header links --- action.ps1 | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/action.ps1 b/action.ps1 index 49aa75d..8ec9d07 100644 --- a/action.ps1 +++ b/action.ps1 @@ -149,6 +149,13 @@ Function UpdateFileLinks() Write-Verbose "Link $link is already absolute, nothing to do" return "[$text]($link)" } + + if ($link -like "#*") + { + # Header anchor, no change + Write-Verbose "Link $link is to an anchor within the page (generally a header), nothing to do" + return "[$text]($link)" + } $upDirs = 0 $path = @()