mirror of
https://github.com/alexmickelson/canvasManagement.git
synced 2026-03-25 23:28:33 -06:00
moving name out of file, will mirror file system name
This commit is contained in:
@@ -40,8 +40,7 @@ const parseNumberOrThrow = (value: string, label: string): number => {
|
||||
}
|
||||
return parsed;
|
||||
};
|
||||
const getQuizWithOnlySettings = (settings: string): LocalQuiz => {
|
||||
const name = extractLabelValue(settings, "Name");
|
||||
const getQuizWithOnlySettings = (settings: string, name: string): LocalQuiz => {
|
||||
|
||||
const rawShuffleAnswers = extractLabelValue(settings, "ShuffleAnswers");
|
||||
const shuffleAnswers = parseBooleanOrThrow(
|
||||
@@ -136,10 +135,10 @@ Description: ${quiz.description}
|
||||
${questionMarkdown}`;
|
||||
},
|
||||
|
||||
parseMarkdown(input: string): LocalQuiz {
|
||||
parseMarkdown(input: string, name: string): LocalQuiz {
|
||||
const splitInput = input.split("---\n");
|
||||
const settings = splitInput[0];
|
||||
const quizWithoutQuestions = getQuizWithOnlySettings(settings);
|
||||
const quizWithoutQuestions = getQuizWithOnlySettings(settings, name);
|
||||
|
||||
const rawQuestions = splitInput.slice(1);
|
||||
const questions = rawQuestions
|
||||
|
||||
Reference in New Issue
Block a user