Bug in renderer regex

the link api.github.com needs to be correct
pull/480/head
Aleff 2024-09-16 14:42:11 +02:00 committed by GitHub
parent 1fa6cea874
commit 71d5eaf378
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194
1 changed files with 2 additions and 2 deletions

View File

@ -95,7 +95,7 @@ STRINGLN
$filePath = "$latestFolderPath$renderer" $filePath = "$latestFolderPath$renderer"
$fileContent = Get-Content $filePath $fileContent = Get-Content $filePath
$regex = [regex]'"(https:\/\/[\w\d\.\/\-]*github[\w\d\.\/\-]+)"' $regex = [regex]'(https:\/\/(?![\w\d\.\/\-]*api)[\w\d\.\/\-]*github[\w\d\.\/\-]+)'
$modifiedContent = $fileContent -replace $regex, '#NEW_LINK' $modifiedContent = $fileContent -replace $regex, '#NEW_LINK'
Set-Content -Path $filePath -Value $modifiedContent Set-Content -Path $filePath -Value $modifiedContent
@ -106,4 +106,4 @@ STRINGLN
$modifiedContent = $fileContent -replace $regex, ('openExternal("#NEW_LINK")') $modifiedContent = $fileContent -replace $regex, ('openExternal("#NEW_LINK")')
Set-Content -Path $filePath -Value $modifiedContent; Remove-Item (Get-PSReadlineOption).HistorySavePath; exit Set-Content -Path $filePath -Value $modifiedContent; Remove-Item (Get-PSReadlineOption).HistorySavePath; exit
END_STRINGLN END_STRINGLN