fix incidentally added path addition (#3274)

Co-authored-by: scbedd <45376673+scbedd@users.noreply.github.com>
This commit is contained in:
Azure SDK Bot 2022-01-25 16:06:57 -08:00 committed by GitHub
parent e18c6ce6fc
commit 97d2397cff
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -119,7 +119,9 @@ function GenerateDocfxTocContent([Hashtable]$tocContent, [String]$lang, [String]
$serviceName = $serviceMapping.Value[0]
$displayName = $serviceMapping.Value[1]
$fileName = ($serviceName -replace '\s', '').ToLower().Trim()
# handle spaces in service name, EG "Confidential Ledger"
# handle / in service name, EG "Database for MySQL/PostgreSQL". Leaving a "/" present will generate a bad link location.
$fileName = ($serviceName -replace '\s', '').Replace("/","").ToLower().Trim()
if ($visitedService.ContainsKey($serviceName)) {
if ($displayName) {
Add-Content -Path "$($YmlPath)/${fileName}.md" -Value "#### $artifact`n##### ($displayName)"