have basic quiz editor implemented

This commit is contained in:
2023-10-10 17:16:08 -06:00
parent 008b85b971
commit e5defbc0cf
8 changed files with 231 additions and 16 deletions

View File

@@ -13,7 +13,7 @@ public record LocalQuizQuestionAnswer
public static LocalQuizQuestionAnswer ParseMarkdown(string input)
{
var isCorrect = input[0] == '*' || input[1] == '*';
string startingQuestionPattern = @"^(?:\*[a-z]\))|\[\s*\]|\[\*\] ";
string startingQuestionPattern = @"^(\*?[a-z]\))|\[\s*\]|\[\*\] ";
var text = Regex.Replace(input, startingQuestionPattern, string.Empty).Trim();
return new LocalQuizQuestionAnswer()
@@ -22,5 +22,4 @@ public record LocalQuizQuestionAnswer
Text=text,
};
}
}