mirror of
https://github.com/alexmickelson/canvasManagement.git
synced 2026-03-25 23:28:33 -06:00
refactor
This commit is contained in:
@@ -32,10 +32,9 @@ public record LocalQuizQuestionAnswer
|
|||||||
string startingQuestionPattern = @"^(\*?[a-z]?\))|\[\s*\]|\[\*\]|\^ ";
|
string startingQuestionPattern = @"^(\*?[a-z]?\))|\[\s*\]|\[\*\]|\^ ";
|
||||||
|
|
||||||
int replaceCount = 0;
|
int replaceCount = 0;
|
||||||
var text = Regex.Replace(input, startingQuestionPattern, (m) =>
|
var text = Regex
|
||||||
{
|
.Replace(input, startingQuestionPattern, (m) => replaceCount++ == 0 ? "" : m.Value)
|
||||||
return replaceCount++ == 0 ? "" : m.Value;
|
.Trim();
|
||||||
}).Trim();
|
|
||||||
return new LocalQuizQuestionAnswer()
|
return new LocalQuizQuestionAnswer()
|
||||||
{
|
{
|
||||||
Correct = isCorrect,
|
Correct = isCorrect,
|
||||||
|
|||||||
Reference in New Issue
Block a user