From 056330a564c4a3f37db616ef0762ddcef5667bd1 Mon Sep 17 00:00:00 2001 From: nicholas-hoy-champain Date: Fri, 30 Aug 2024 19:58:26 -0400 Subject: [PATCH] fixed replace regex --- .github/workflows/copy-documentation-readme-upwards.yml | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/.github/workflows/copy-documentation-readme-upwards.yml b/.github/workflows/copy-documentation-readme-upwards.yml index 3cab1ec..a7819b9 100644 --- a/.github/workflows/copy-documentation-readme-upwards.yml +++ b/.github/workflows/copy-documentation-readme-upwards.yml @@ -18,10 +18,10 @@ jobs: git config user.name github-actions git config user.email github-actions@github.com $readmeDir = Get-Item -Path "**/Packages/com.*/Documentation~" | Select-Object -ExpandProperty FullName - $readmeDir = $readmeDir.replace('${{ github.workspace }}','') + $readmeDir = $readmeDir.replace('${{ github.workspace }}/','') echo $readmeDir $readmeContent = gc (Get-Item -Path "**/Packages/com.*/Documentation~/README.md") -Raw - $readmeContent = $readmeContent -replace '(\[.*\])\(((?!https?:\/\/).+)\)',('$1('+$readmeDir+'$2)') + $readmeContent = $readmeContent -replace '(\[.*\])\(((?!https?:\/\/).+)\)',('$1('+$readmeDir+'/$2)') echo $readmeContent echo "v.s." $targetContent = gc README.md -Raw