docs: changing the way rhymes are calculated for single couplets

This commit is contained in:
Hamid Reza Mohammadi 2022-07-17 22:01:52 +04:30
parent 943a00982f
commit f33a439123

View File

@ -200,18 +200,13 @@ namespace RMuseum.Services.Implementation
}
if (rhyme.Length == 0)
{
if (verseTextList.Count == 2)
if (verses.Count == 2 && verseTextList.Count == 2)
{
var secVerse = PrepareTextForFindingRhyme(verseTextList[1]);
if (secVerse.Length > 0)
return new GanjooRhymeAnalysisResult()
{
return new GanjooRhymeAnalysisResult()
{
Rhyme = $"{secVerse[secVerse.Length - 1]}",
FailVerse = ""
};
}
Rhyme = PrepareTextForFindingRhyme(verseTextList[1]),
FailVerse = "",
};
}
return new GanjooRhymeAnalysisResult()
{