got toggle help to still work

This commit is contained in:
2023-11-09 15:27:34 -07:00
parent 4a113fc8ca
commit e4cae72856
3 changed files with 62 additions and 58 deletions

View File

@@ -26,7 +26,10 @@ public record LocalQuizQuestion
: $"[{correctIndicator}] ";
// var textWithSpecificNewline = answer.Text.Replace(Environment.NewLine, Environment.NewLine + " ");
return $"{questionTypeIndicator}{answer.Text}";
var multilineMarkdownCompatibleText = answer.Text.StartsWith("```")
? Environment.NewLine + answer.Text
: answer.Text;
return $"{questionTypeIndicator}{multilineMarkdownCompatibleText}";
});
var answersText = string.Join(Environment.NewLine, answerArray);
var questionTypeIndicator = QuestionType == "essay" || QuestionType == "short_answer" ? QuestionType : "";