docs: making finding rhymes working for single couplets

This commit is contained in:
Hamid Reza Mohammadi 2022-03-23 10:29:01 +04:30
parent 2a685c1ba8
commit 357291e4ca

View File

@ -210,6 +210,25 @@ namespace RMuseum.Services.Implementation
return FindRhyme(verses, true);
}
}
else
{
if (string.IsNullOrEmpty(rhyme))
{
if(verseTextList.Count == 2)
{
var secVerse = PrepareTextForFindingRhyme(verseTextList[1]);
if(secVerse.Length > 0)
{
return new GanjooRhymeAnalysisResult()
{
Rhyme = $"{secVerse[secVerse.Length - 1]}",
FailVerse = ""
};
}
}
}
}
return new GanjooRhymeAnalysisResult()
{