This commit is contained in:
2024-03-29 14:35:14 -06:00
parent a9cf38ecf2
commit af60bd1e46

View File

@@ -32,10 +32,9 @@ public record LocalQuizQuestionAnswer
string startingQuestionPattern = @"^(\*?[a-z]?\))|\[\s*\]|\[\*\]|\^ ";
int replaceCount = 0;
var text = Regex.Replace(input, startingQuestionPattern, (m) =>
{
return replaceCount++ == 0 ? "" : m.Value;
}).Trim();
var text = Regex
.Replace(input, startingQuestionPattern, (m) => replaceCount++ == 0 ? "" : m.Value)
.Trim();
return new LocalQuizQuestionAnswer()
{
Correct = isCorrect,