Skip to content
This repository has been archived by the owner on Feb 28, 2022. It is now read-only.

Commit

Permalink
format uid for service
Browse files Browse the repository at this point in the history
  • Loading branch information
ansyral committed Jun 15, 2017
1 parent bc81345 commit f28f292
Showing 1 changed file with 7 additions and 2 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -108,7 +108,7 @@ group v.Value by v.Key.Category into g0
name = service,
href = hrefAndType.Item1,
landingPageType = hrefAndType.Item2,
uid = "azure.java.sdk.landingpage.services." + service,
uid = "azure.java.sdk.landingpage.services." + FormatUid(service),
items = new ServiceMapping(from item in pair.Value
let category = item.Category
let chrefAndType = GetHrefAndType(hrefMapping, GetKey(service, category))
Expand All @@ -117,7 +117,7 @@ group v.Value by v.Key.Category into g0
name = item.Category,
href = chrefAndType.Item1,
landingPageType = chrefAndType.Item2,
uid = "azure.java.sdk.landingpage.services." + service.Replace(" ", "").ToLower() + "." + category,
uid = "azure.java.sdk.landingpage.services." + FormatUid(service) + "." + category,
children = item.Uids.ToList()
})
}).OrderBy(s => s.name))
Expand Down Expand Up @@ -185,5 +185,10 @@ private static string GetKey(string service, string category)
{
return service + "." + category;
}

private static string FormatUid(string service)
{
return service.Replace(" ", "").ToLower();
}
}
}

0 comments on commit f28f292

Please sign in to comment.