mirror of
https://github.com/alexmickelson/canvasManagement.git
synced 2026-03-26 23:58:31 -06:00
added shorter syntax for multipel choice
This commit is contained in:
@@ -15,7 +15,7 @@ public record LocalQuizQuestionAnswer
|
||||
public static LocalQuizQuestionAnswer ParseMarkdown(string input, string questionType)
|
||||
{
|
||||
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();
|
||||
|
||||
if(questionType == QuestionType.MATCHING)
|
||||
@@ -23,7 +23,7 @@ public record LocalQuizQuestionAnswer
|
||||
{
|
||||
Correct = true,
|
||||
Text = text.Split('-')[0].Trim(),
|
||||
MatchedText = string.Join("", text.Split('-')[1..]).Trim(),
|
||||
MatchedText = string.Join("-", text.Split('-')[1..]).Trim(),
|
||||
};
|
||||
|
||||
return new LocalQuizQuestionAnswer()
|
||||
|
||||
Reference in New Issue
Block a user