docs: #301 issue in TOCs with different order for ه و:
This commit is contained in:
parent
465a00d540
commit
4f3c719391
@ -8,8 +8,8 @@
|
||||
},
|
||||
"AllowedHosts": "*",
|
||||
"GoogleAnalyticsCode": "",
|
||||
"APIRoot": "https://api.ganjoor.net",
|
||||
"GlobalAPIRoot": "https://api.ganjoor.net",
|
||||
"APIRoot": "http://localhost:3439",
|
||||
"GlobalAPIRoot": "http://localhost:3439",
|
||||
"SiteUrl": "http://localhost:33081",
|
||||
"MockSpotify": "False",
|
||||
"Spotify": {
|
||||
|
||||
@ -378,7 +378,15 @@ namespace RMuseum.Services.Implementation
|
||||
}
|
||||
}
|
||||
var fa = new CultureInfo("fa-IR");
|
||||
foundLastChars.Sort((a, b) => fa.CompareInfo.Compare(a, b));
|
||||
if (foundLastChars.Contains("و") && foundLastChars.Contains("ی") && foundLastChars.IndexOf("ه") == (foundLastChars.IndexOf("و") - 1))
|
||||
{
|
||||
foundLastChars.Sort((a, b) => a == "ه" && b == "و" ? -1 : a == "و" && b == "ه" ? 1 : fa.CompareInfo.Compare(a, b));
|
||||
}
|
||||
else
|
||||
{
|
||||
foundLastChars.Sort((a, b) => fa.CompareInfo.Compare(a, b));
|
||||
}
|
||||
|
||||
foreach (var poemLastChar in foundLastChars)
|
||||
{
|
||||
string rep = poemLastChar == "ا" ? "الف" : poemLastChar;
|
||||
|
||||
Loading…
Reference in New Issue
Block a user