Skip to content

Commit

Permalink
fixed replace regex
Browse files Browse the repository at this point in the history
  • Loading branch information
NicholasPerell committed Aug 30, 2024
1 parent e3b585d commit 056330a
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions .github/workflows/copy-documentation-readme-upwards.yml
Original file line number Diff line number Diff line change
Expand Up @@ -18,10 +18,10 @@ jobs:
git config user.name github-actions
git config user.email [email protected]
$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
Expand Down

0 comments on commit 056330a

Please sign in to comment.